diff --git a/.Rbuildignore b/.Rbuildignore index 3f92b12..69e16a2 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,18 +1,11 @@ -^README\.Rmd$ -^CONDUCT\.md$ ^.*\.Rproj$ ^\.Rproj\.user$ ^appveyor\.yml$ ^\.travis\.yml$ -cache$ -assets cran-comments.md -preparePackage.R -reviewJOSS.md -reviewROPENSCI.md inst/extdata inst/paper -BugFixing.R _pkgdown.yml -^docs$ +vignettes/rdefra_vignette.R +vignettes/rdefra_vignette.html diff --git a/.gitignore b/.gitignore index 8027317..eea2629 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,3 @@ .Rproj.user .Rhistory -.RData - *.Rproj -*.tar.gz - -*.html - -README_cache/* -vignettes/rdefra_vignette_cache/* -vignettes/*.R -vignettes/*.md -vignettes/figure/* -BugFixing.R - -# Remove docs folder (site builds automatically) -docs/* diff --git a/CONDUCT.md b/CONDUCT.md deleted file mode 100644 index 52a673e..0000000 --- a/CONDUCT.md +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free experience for -everyone, regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. - -Examples of unacceptable behavior by participants include the use of sexual language or -imagery, derogatory comments or personal attacks, trolling, public or private harassment, -insults, or other unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, -commits, code, wiki edits, issues, and other contributions that are not aligned to this -Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed -from the project team. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by -opening an issue or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the Contributor Covenant -(http:contributor-covenant.org), version 1.0.0, available at -http://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION index 844b2a8..5588535 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rdefra Title: Interact with the UK AIR Pollution Database from DEFRA -Version: 0.3.7 +Version: 0.3.8 Authors@R: c(person(given = "Claudia", family = "Vitolo", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index b406521..2a11616 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -rdefra 0.3.7 +rdefra 0.3.8 ============== ## BUG FIXES @@ -6,6 +6,8 @@ rdefra 0.3.7 ## MINOR CHANGES * Removed obsolete packages in 'Suggests' +* Fixed invalid URIs +* The following directory looks like a leftover from knitr rdefra 0.3.6 ============== diff --git a/README.md b/README.md index 28303ab..ab2eaad 100644 --- a/README.md +++ b/README.md @@ -82,13 +82,11 @@ fllowing steps: For an in-depth description of the various functionalities andexample applications, please refer to the package -[vignette](vignettes/rdefra_vignette.md). +[vignette](vignettes/rdefra_vignette.Rmd). ## Meta - - Please note that this project is released with a [Contributor Code - of Conduct](CONDUCT.md). By participating in this project you agree - to abide by its terms. + - This package and functions herein are part of an experimental open-source project. They are provided as is, without any guarantee. - Please [report any issues or bugs](https://github.com/ropensci/rdefra/issues). - License: [GPL-3](https://opensource.org/licenses/GPL-3.0) diff --git a/cran-comments.md b/cran-comments.md index aad17fe..f388c57 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -9,6 +9,8 @@ This is a resubmission due to bug fixing. ## MINOR CHANGES * Removed obsolete packages in 'Suggests' +* Fixed invalid URIs +* The following directory looks like a leftover from knitr ## Test environment * Ubuntu 18.04, R 3.6.3 diff --git a/vignettes/map.png b/vignettes/map.png deleted file mode 100644 index 87ccd2f..0000000 Binary files a/vignettes/map.png and /dev/null differ diff --git a/vignettes/ozone.png b/vignettes/ozone.png deleted file mode 100644 index b1791a8..0000000 Binary files a/vignettes/ozone.png and /dev/null differ diff --git a/vignettes/rdefra_vignette.Rmd b/vignettes/rdefra_vignette.Rmd index 2d0dcb9..8fe52e2 100644 --- a/vignettes/rdefra_vignette.Rmd +++ b/vignettes/rdefra_vignette.Rmd @@ -5,8 +5,8 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{rdefra} - %\VignetteEngine{knitr::knitr} - %\usepackage[UTF-8]{inputenc} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} --- ```{r setup, echo = FALSE} @@ -138,7 +138,7 @@ plot(daily_means, main = "", xlab = "", The above figure \ref{fig:hdata} shows the highest concentrations happen in late spring and at the beginning of summer. In order to check whether this happens every year, we can download multiple years of data and then compare them. -```{r ozone_data, eval = FALSE} +```{r ozone_data, eval = TRUE} # Get 15 years of hourly ozone data from the same monitoring station library("ggplot2") library("dplyr") @@ -157,11 +157,8 @@ df %>% geom_boxplot(aes(x = as.factor(month), y = ozone, group = month), outlier.shape = NA) + xlab("Month of the year") + - ylab(expression(paste("Ozone concentration (", mu, "g/",m^3,")"))) -``` - -```{r ozone, echo = FALSE, eval = TRUE, fig.width = 7, out.width = "600px", fig.cap = "\\label{fig:ozone}15 years of hourly ozone data from London Marylebone Road monitoring station."} -knitr::include_graphics("ozone.png") + ylab(expression(paste("Ozone concentration (", mu, "g/",m^3,")"))) + + ggtitle("15 years of hourly ozone data from London Marylebone Road monitoring station") ``` The above box plots show that the highest concentrations usually occurr during April/May and that these vary year-by-year. @@ -172,13 +169,14 @@ The above box plots show that the highest concentrations usually occurr during A After scraping DEFRA's web pages, almost all the stations have valid coordinates. In the figure below, blue circles show all the stations with valid coordinates, while red circles show stations with available hourly data. -```{r map_data, eval = FALSE} +```{r map_data, eval = TRUE} # Keep only station with coordinates stations_with_coords <- stations[complete.cases(stations[, c("Longitude", "Latitude")]), ] # Keep only station with known SiteID stations_with_SiteID <- which(!is.na(stations_with_coords$SiteID)) +# Blue circles show stations with valid coordinates, while red circles show stations with available hourly data. library("leaflet") leaflet(data = stations_with_coords) %>% addTiles() %>% addCircleMarkers(lng = ~Longitude, @@ -191,10 +189,6 @@ leaflet(data = stations_with_coords) %>% addTiles() %>% popup = ~SiteID[stations_with_SiteID]) ``` -```{r map, echo = FALSE, eval = TRUE, fig.width = 7, out.width = "600px", fig.cap = "\\label{fig:map}Blue circles show stations with valid coordinates, while red circles show stations with available hourly data."} -knitr::include_graphics("map.png") -``` - ### Analyse the spatial distribution of the monitoring stations Below are two plots showing the spatial distribution of the monitoring stations. These are concentrated largely in urban areas and mostly estimate the background level of concentration of pollutants.