From 3f83c195116bae4f00acc61e4f67da28f8dd5207 Mon Sep 17 00:00:00 2001 From: Rob Briers Date: Fri, 17 May 2019 15:25:50 +0100 Subject: [PATCH] minor updates to docs and JOSS submission for 0.4.0 release --- DESCRIPTION | 3 ++- NEWS.md | 13 +++++++++++++ R/utils.r | 3 +-- index.Rmd | 2 +- index.md | 6 +++--- paper/paper.bib | 6 +++--- paper/paper.md | 11 +++++------ 7 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 NEWS.md diff --git a/DESCRIPTION b/DESCRIPTION index bbab24a..da04ed7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: cde Type: Package Title: Download Water Framework Directive (WFD) data from the Environment Agency Catchment Data Explorer (CDE) website -Version: 0.3.0.9000 +Version: 0.4.0 Authors@R: person("Rob", "Briers", email = "r.briers@napier.ac.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0341-1203")) Description: The cde package facilitates searching and download of the @@ -13,6 +13,7 @@ Description: The cde package facilitates searching and download of the https://environment.data.gov.uk/catchment-planning/. The data are made available under the Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). + This package has been peer-reviewed by rOpenSci (v. 0.4.0). Depends: R (>= 3.0.0) License: GPL-3 | file LICENCE diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..f042a84 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,13 @@ +cde 0.4.0 (2019-05-17) +========================= + +### NEW FEATURES + + * Adding `plot` and `print` methods for all output following rOpensci review + * Adding `cde_df` class for output data + +### MINOR IMPROVEMENTS + + * Updating all documentation following review + * Added reference table of all columns returned from CDE site to vignette + diff --git a/R/utils.r b/R/utils.r index fe3a6ef..31e2933 100644 --- a/R/utils.r +++ b/R/utils.r @@ -36,8 +36,7 @@ download_cde <- function(ea_name = NULL, column = NULL, data_type=NULL) { # do search to make sure that name is present search_names(ea_name, column) - # check that this thows out if error given - + # this gives either index number (RBD, MC, OC) or wbid for next bit index<-find_index(column, ea_name) # do download using either zip or plain fread depending on type diff --git a/index.Rmd b/index.Rmd index 57371d5..8aa1d81 100644 --- a/index.Rmd +++ b/index.Rmd @@ -23,7 +23,7 @@ In the UK the Environment Agency (EA) is the competent authority responsible for `cde` is a package for R which facilitates searching and download of the WFD reporting data for all waterbodies from the EA CDE website. -The types of data that can be downloaded are: WFD status classification data (which can also be plotted), Reasons for Not Achieving Good (RNAG) status, objectives set for waterbodies, measures put in place to improve water quality and details of associated protected areas. +The types of data that can be downloaded are: WFD status classification data, Reasons for Not Achieving Good (RNAG) status, objectives set for waterbodies, measures put in place to improve water quality and details of associated protected areas. The CDE data are made available under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) and use of the data accessed by and contained within this package implies acceptance of these licence conditions. diff --git a/index.md b/index.md index 39effbd..d8952e9 100644 --- a/index.md +++ b/index.md @@ -34,9 +34,9 @@ website, . WFD reporting data for all waterbodies from the EA CDE website. The types of data that can be downloaded are: WFD status classification -data (which can also be plotted), Reasons for Not Achieving Good (RNAG) -status, objectives set for waterbodies, measures put in place to improve -water quality and details of associated protected areas. +data, Reasons for Not Achieving Good (RNAG) status, objectives set for +waterbodies, measures put in place to improve water quality and details +of associated protected areas. The CDE data are made available under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) diff --git a/paper/paper.bib b/paper/paper.bib index b7dd812..72c2949 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -31,10 +31,10 @@ @article{Voulvoulis2017 year = {2017} } -@article{RCoreTeam2018, +@article{RCoreTeam2019, author={{R Core Team}}, - year={2018}, - title={R: a language and environment for statistical computing}, + year={2019}, + title={R: A Language and Environment for Statistical Computing}, url={https://www.R-project.org/}, address={Vienna, Austria} } \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index 41e3ca4..6c57212 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -18,24 +18,23 @@ bibliography: paper.bib Globally, issues around water quality and quantity are expected to increase in coming decades, set against a background of already widespread degradation [@WWAPUnitedNationsWorldWaterAssessmentProgramme/UN-Water2018]. Within Europe, the [Water Framework Directive](http://ec.europa.eu/environment/water/water-framework/index_en.html) set EU-wide standards for how the quality of surface- and ground-waters across Europe is assessed and classified [@Communities2000]. Assessment of quality using the WFD is based on a range of elements that vary depending on the type of water being assessed. The elements cover biological, chemical and hydromorphological/quantitative components with a hierarchical structure. These are combined to give an overall classification of waterbodies into five classes(High, Good, Moderate, Poor and Bad) for surface waters and two classes (Good or Poor) for groundwaters. The overall aim of the WFD is that all European surface and ground waters will reach at least Good status by 2027, although there have been a number of issues with implementation [@Voulvoulis2017]. -In the UK the Environment Agency (EA) is the competent authority responsible for monitoring and assessment of water quality within England. The EA have made the reporting data relating to the requirements of the WFD available via the Catchment Data Explorer (CDE) website [https://environment.data.gov.uk/catchment-planning/](https://environment.data.gov.uk/catchment-planning/). The cde package for R [@RCoreTeam2018] provides functions that facilitate the querying and download of the data available on the CDE site, allowing efficient collation of data for the analysis of trends or patterns in water quality and pressures on waterbodies across England. +In the UK the Environment Agency (EA) is the competent authority responsible for monitoring and assessment of water quality within England. The EA have made the reporting data relating to the requirements of the WFD available via the Catchment Data Explorer (CDE) website [https://environment.data.gov.uk/catchment-planning/](https://environment.data.gov.uk/catchment-planning/). The ``cde`` package for R [@RCoreTeam2019] provides functions that facilitate the querying, download and plotting of the data available on the CDE site, allowing efficient collation of data for the analysis of trends or patterns in water quality and pressures on waterbodies across England. The package contains functions to allow users to search for waterbodies, catchments or River Basin Districts that match given search strings. Having identified the relevant sites, the following types of data can be downloaded: -*Status classification data*: either for overall water body classification or at a range of more detailed levels (e.g. ecological, chemical or priority substances). These can be downloaded for specified year ranges and for specific waterbody types (such as lakes). +*Status classification data*: either for overall water body classification or at a range of more detailed levels relating to specific quality elements (e.g. ecological, chemical or priority substances). These can be downloaded for specified year ranges and for specific waterbody types (such as lakes). *Reasons for Not Achieving Good status*: For catchments or River Basin Districts where there are waterbodies that have not achieved Good status, the package provides the functionality to download a summary of the Reasons for Not Achieving Good (RNAG) data. This gives a range of information regarding the relevant pressures identified as contributing to the current status, classified according to a standard hierarchy given on the CDE website. *Objectives for waterbodies*: Where less than Good status has been achieved, data on the objectives that have been set in terms of status aimed for in the longer term can be downloaded, for specific target years and for specified levels of classification. -*Measures to achieve objectives*: Details of actions that have been put in place or are proposed to achieve the objectives set (specifically for the target in 2021). Only data linked to the achievement of a specific outcome in terms of status are included. +*Measures to achieve objectives*: Details of actions that have been put in place or are proposed to achieve the objectives set (currently in relation to the target objective set for 2021). Only data linked to the achievement of a specific outcome in terms of status are included. *Protected areas*: The package also provides a function to download a summary of associated protected areas (such as Special Areas of Conservation or Nitrate Vulnerable Zones), again at a range of levels from individual waterbodies to whole River Basin Districts. -For each of the types of data that can be downloaded, summary plots can also be produced. These differ depending on the type of data, but an example showing the percentage of water bodies in each status class (derived from the 'get_status' function) is show below. - -![A plot of status classification data for the Lark Operational Catchment between 2013 and 2015](lark plot-1.png){ width=80% } +For each of the types of data that can be downloaded, summary plots can also be produced. These differ depending on the type of data, but an example showing the percentage of water bodies in each status class (derived from the ``get_status`` function) is shown in Figure 1 below. +![**Figure 1**: A plot of status classification data for the Lark Operational Catchment between 2013 and 2015](lark plot-1.png){ width=80% } # Acknowledgements