From 875b05018c14853dec3151d17f59c98f0841e0dd Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 9 Jun 2021 14:45:29 +0200 Subject: [PATCH 01/36] Bump dev version number --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 215783c4..8f244bd9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: n2khab Title: Providing Preprocessed Reference Data for Flemish Natura 2000 Habitat Analyses -Version: 0.5.0 +Version: 0.5.0.900 Authors@R: c( person("Floris", "Vanderhaeghe", email = "floris.vanderhaeghe@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6378-6229")), person("Toon", "Westra", email = "toon.westra@inbo.be", role = c("aut"), comment = c(ORCID = "0000-0003-2478-9459")), From 1e52793f6c7efa59c0ad1243d085c4488eeb049a Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 10 Jun 2021 09:35:42 +0200 Subject: [PATCH 02/36] Readme: drop site-devel badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ea93510b..80508098 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3631579.svg)](https://doi.org/10.5281/zenodo.3631579) [![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![R-CMD-check](https://github.com/inbo/n2khab/workflows/R-CMD-check/badge.svg)](https://github.com/inbo/n2khab/actions?query=workflow%3AR-CMD-check) -[![site-devel](https://github.com/inbo/n2khab/workflows/site-devel/badge.svg)](https://github.com/inbo/n2khab/actions?query=workflow%3Asite-devel) ## Welcome From 292655205a59835062b5ce2fe0c30de9196cb57a Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 6 Aug 2021 14:59:30 +0200 Subject: [PATCH 03/36] Vignette 025: minor fixes --- vignettes/v025_geospatial_hab.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vignettes/v025_geospatial_hab.Rmd b/vignettes/v025_geospatial_hab.Rmd index c5201a17..899495ac 100644 --- a/vignettes/v025_geospatial_hab.Rmd +++ b/vignettes/v025_geospatial_hab.Rmd @@ -122,7 +122,7 @@ habitatmap ``` The `habitatmap` object is a very wide dataframe which is not so easy to handle in R. -For analytical work on habitat types and RIBs, you're advised to use the tidied data source `habitatmap_stdized`; see [below](#processed-data-sources). +For analytical work on habitat types and RIBs, you're advised to use the tidied data source `habitatmap_stdized`; see [below](#processed). `read_habitatmap(filter_hab = TRUE)` will only retain the polygons that occur in `habitatmap_stdized`, i.e. those that contain habitat types or RIBs. @@ -268,7 +268,7 @@ habitatquarries2$extra_references These extra references can also be printed to the R console in BibTeX format, when specifying `bibtex = TRUE`. -### Returning processed data sources +### Returning processed data sources {#processed} The reading functions for the three processed data sources will always return a **list**: @@ -529,7 +529,7 @@ wsh$watersurfaces_polygons %>% #> 9 rbbah 517 33716.3 0.1 4.2 10.9 47.0 3748.6 ``` -An strong point of `sf` objects is that the geometry has explicit units. +A strong point of `sf` objects is that the geometry has explicit units. Consequently we can make use of tools like `set_units()` to convert units (e.g. surface area as _are_ (a)). Because the main type code `3130` will mostly boil down to `3130_aom` in the field, a further interpreted flavour can be generated with `read_watersurfaces_hab(interpreted = TRUE)`. From ffd399e935f2a1519fc586aa126b4871d0a87db8 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 10 Aug 2021 12:29:26 +0200 Subject: [PATCH 04/36] read_habitatquarries() docu: unit_id minor fix --- R/read_habitatdata.R | 2 +- man/read_habitatquarries.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/read_habitatdata.R b/R/read_habitatdata.R index 91f26554..56c70c05 100644 --- a/R/read_habitatdata.R +++ b/R/read_habitatdata.R @@ -1540,7 +1540,7 @@ read_habitatsprings <- #' \item \code{polygon_id}: a unique number per polygon. #' \item \code{unit_id}: a unique number for each quarry unit. Quarry units #' consisting of several polygons (= partly outside the Flemish region) -#' have a number greater than 100. +#' have a number greater than or equal to 100. #' \item \code{name}: site name. #' \item \code{code_orig}: original 'habitattype' code in the raw data #' source \code{habitatquarries}. diff --git a/man/read_habitatquarries.Rd b/man/read_habitatquarries.Rd index 65ea3b98..d74d383b 100644 --- a/man/read_habitatquarries.Rd +++ b/man/read_habitatquarries.Rd @@ -43,7 +43,7 @@ type \code{POLYGON}, with attribute variables: \item \code{polygon_id}: a unique number per polygon. \item \code{unit_id}: a unique number for each quarry unit. Quarry units consisting of several polygons (= partly outside the Flemish region) -have a number greater than 100. +have a number greater than or equal to 100. \item \code{name}: site name. \item \code{code_orig}: original 'habitattype' code in the raw data source \code{habitatquarries}. From d370a43382b616a80a01469aa11379ac5955b8e2 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 13 Aug 2021 09:30:32 +0200 Subject: [PATCH 05/36] generate_textdata: always use explicit joins --- misc/generate_textdata/10_types.Rmd | 11 ++++++----- .../30_schemes_and_scheme_types.Rmd | 12 +++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/misc/generate_textdata/10_types.Rmd b/misc/generate_textdata/10_types.Rmd index 62099462..50272413 100644 --- a/misc/generate_textdata/10_types.Rmd +++ b/misc/generate_textdata/10_types.Rmd @@ -26,7 +26,7 @@ source_df <- Writing the namelist a first time: -```{r message=FALSE} +```{r} dummy <- str_c(root, "/", namelist_path, ".*") %>% Sys.glob %>% @@ -48,7 +48,7 @@ source_df %>% "BMF", "Bogs, mires and fens", "RC", "Rocky habitats and caves", "FS", "Forest and scrub" - )) %>% + ), by = "en") %>% gather(key = "lang", value = "name", en:nl) %>% mutate(shortname = NA %>% as.character) %>% write_vc(namelist_path, @@ -80,7 +80,7 @@ source_df %>% Information for tag 1: -```{r message=FALSE} +```{r} source_df %>% distinct(nl = Groepering.niveau.2, en = Groepering.niveau.2.Eng) %>% @@ -95,7 +95,7 @@ source_df %>% "SW", "Standing water", "RW", "Running water", "CT", "Calcareous type" - )) %>% + ), by = "en") %>% gather(key = "lang", value = "name", en:nl) %>% mutate(shortname = NA %>% as.character) %>% bind_rows(read_vc(namelist_path, root), @@ -157,7 +157,8 @@ hc_names %>% pivot_longer(cols = -code, names_to = "lang", names_pattern = "(..)_.+", - values_to = "shortname") + values_to = "shortname"), + by = c("code", "lang") ) %>% bind_rows(read_vc(namelist_path, root), .) %>% diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index b4da5096..e9e6e4fa 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -217,7 +217,7 @@ spat_restr <- Preparing `schemes` with MNE content: -```{r message=FALSE} +```{r} schemes <- schemes_schemetypes %>% distinct(scheme, @@ -226,7 +226,7 @@ schemes <- attribute_2, attribute_3, tag_1) %>% - left_join(spat_restr) %>% + left_join(spat_restr, by = "scheme") %>% mutate(notes = NA %>% as.character, tag_2 = NA %>% as.character, tag_3 = NA %>% as.character @@ -321,12 +321,13 @@ typegroups <- Preparing `scheme_types` with MNE content: -```{r message=FALSE} +```{r} scheme_types <- schemes_schemetypes %>% distinct(scheme, type) %>% - left_join(typegroups) %>% + left_join(typegroups, + by = c("scheme", "type")) %>% arrange(scheme, type) ``` @@ -396,7 +397,8 @@ schemes %>% rename(name_1 = name) %>% left_join(tibble(lang = c("en", "nl"), name_2 = c("environmental pressure", - "milieudruk"))) %>% + "milieudruk")), + by = "lang") %>% left_join(namelist %>% select(-name), by = c("attribute_2" = "code", "lang")) %>% rename(name_3 = shortname) %>% From b198454bc163d3e82a4fb41bda2f1135f66db39f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 13 Aug 2021 09:41:52 +0200 Subject: [PATCH 06/36] generate_textdata: avoid coercion warning --- .../generate_textdata/30_schemes_and_scheme_types.Rmd | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index e9e6e4fa..04e6e7f4 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -64,6 +64,7 @@ schemes_schemetypes <- attribute_2 = Druk, tag_1 = MaxMilieudrukkengroep, type = Vegcode) %>% + mutate(type = as.character(type)) %>% inner_join(types_hc, by = "type") %>% mutate( programme = "MNE" %>% factor, @@ -111,11 +112,11 @@ schemes_schemetypes <- "focal", "secondary") %>% factor, - type = as.character(type) %>% - factor(levels = - types %>% - .$type %>% - levels) + type = factor(type, + levels = + types %>% + .$type %>% + levels) ) %>% select(-hydr_class_expand) %>% distinct() %>% From ace76e3e468510fbaec0b79b6e00467da8451da4 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 20 Sep 2021 17:51:09 +0200 Subject: [PATCH 07/36] generate_textdata: upgrade renv & packages to R 4.1.1 * We still exclude git2rdata since it causes at the same time extensive reordering of namelist --- misc/generate_textdata/renv.lock | 572 +++++++++++-------- misc/generate_textdata/renv/.gitignore | 2 + misc/generate_textdata/renv/activate.R | 687 +++++++++++++++++++---- misc/generate_textdata/renv/settings.dcf | 2 +- 4 files changed, 916 insertions(+), 347 deletions(-) diff --git a/misc/generate_textdata/renv.lock b/misc/generate_textdata/renv.lock index 7a688f42..ac328138 100644 --- a/misc/generate_textdata/renv.lock +++ b/misc/generate_textdata/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "3.6.3", + "Version": "4.1.1", "Repositories": [ { "Name": "RStudio", @@ -17,47 +17,33 @@ ] }, "Packages": { - "BH": { - "Package": "BH", - "Version": "1.72.0-3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f9ce74c6417d61f0782cbae5fd2b7b0" - }, "DBI": { "Package": "DBI", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "4744be45519d675af66c28478720fce5" - }, - "DT": { - "Package": "DT", - "Version": "0.13", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "a16cb2832248c7cff5a6f505e2aea45b" + "Hash": "030aaec5bc6553f35347cbb1e70b1a17" }, "MASS": { "Package": "MASS", - "Version": "7.3-51.5", + "Version": "7.3-54", "Source": "Repository", "Repository": "CRAN", - "Hash": "9efe80472b21189ebab1b74169808c26" + "Hash": "0e59129db205112e3963904db67fd0dc" }, "Matrix": { "Package": "Matrix", - "Version": "1.2-18", + "Version": "1.3-4", "Source": "Repository", "Repository": "CRAN", - "Hash": "08588806cba69f04797dab50627428ed" + "Hash": "4ed05e9c9726267e4a5872e09c04587c" }, "R6": { "Package": "R6", - "Version": "2.4.1", + "Version": "2.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "292b54f8f4b94669b08f94e5acce6be2" + "Hash": "470851b6d5d0ac559e9d01bb352b4021" }, "RColorBrewer": { "Package": "RColorBrewer", @@ -68,10 +54,10 @@ }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.4.6", + "Version": "1.0.7", "Source": "Repository", "Repository": "CRAN", - "Hash": "e652f23d8b1807cc975c51410d05b72f" + "Hash": "dab19adae4440ae55aa8a9d238b246bb" }, "askpass": { "Package": "askpass", @@ -89,10 +75,10 @@ }, "backports": { "Package": "backports", - "Version": "1.1.6", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "3997fd62345a616e59e8161ee0a5816f" + "Hash": "644043219fc24e190c2f620c1a380a69" }, "base64enc": { "Package": "base64enc", @@ -101,12 +87,33 @@ "Repository": "CRAN", "Hash": "543776ae6848fde2f48ff3816d0628bc" }, + "bit": { + "Package": "bit", + "Version": "4.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f36715f14d94678eea9933af927bc15d" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "blob": { + "Package": "blob", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "dc5f7a6598bb025d20d66bb758f12879" + }, "bookdown": { "Package": "bookdown", - "Version": "0.18", + "Version": "0.23", "Source": "Repository", "Repository": "CRAN", - "Hash": "72e9c52caf3f7aacb4e368b75f6ec72a" + "Hash": "bc07f4b5b93bbf21075429e0c7e090f8" }, "brew": { "Package": "brew", @@ -115,19 +122,33 @@ "Repository": "CRAN", "Hash": "92a5f887f9ae3035ac7afde22ba73ee9" }, + "brio": { + "Package": "brio", + "Version": "1.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2f01e16ff9571fe70381c7b9ae560dc4" + }, "broom": { "Package": "broom", - "Version": "0.5.5", + "Version": "0.7.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9b1e2c1f75b349e3ffa7e9c69eec0c52" + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "70ec3aef8a0df13661bf6cc2ff877d61" + "Hash": "648c5b3d71e6a37e3043617489a0a0e9" }, "callr": { "Package": "callr", - "Version": "3.4.3", + "Version": "3.7.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "643163a00cb536454c624883a10ae0bc" + "Hash": "461aa75a11ce2400245190ef5d3995df" }, "cellranger": { "Package": "cellranger", @@ -138,31 +159,24 @@ }, "cli": { "Package": "cli", - "Version": "2.0.2", + "Version": "3.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "ff0becff7bfdfe3f75d29aff8f3172dd" + "Hash": "e3ae5d68dea0c55a12ea12a9fda02e61" }, "clipr": { "Package": "clipr", - "Version": "0.7.0", + "Version": "0.7.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "08cf4045c149a0f0eaf405324c7495bd" - }, - "clisymbols": { - "Package": "clisymbols", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "96c01552bfd5661b9bbdefbc762f4bcd" + "Hash": "ebaa97ac99cc2daf04e77eecc7b781d7" }, "colorspace": { "Package": "colorspace", - "Version": "1.4-1", + "Version": "2.0-2", "Source": "Repository", "Repository": "CRAN", - "Hash": "6b436e95723d1f0e861224dd9b094dfb" + "Hash": "6baccb763ee83c0bd313460fdb8b8a84" }, "commonmark": { "Package": "commonmark", @@ -171,75 +185,96 @@ "Repository": "CRAN", "Hash": "0f22be39ec1d141fd03683c06f3a6e67" }, - "covr": { - "Package": "covr", - "Version": "3.5.0", + "cpp11": { + "Package": "cpp11", + "Version": "0.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "cbc6df1ef6ee576f844f973c1fc04ab4" + "Hash": "e02edab2bc389c5e4b12949b13df44f2" }, "crayon": { "Package": "crayon", - "Version": "1.3.4", + "Version": "1.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d57bc8e27b7ba9e45dba825ebc0de6b" + "Hash": "e75525c55c70e5f4f78c9960a4b402e9" }, - "crosstalk": { - "Package": "crosstalk", - "Version": "1.1.0.1", + "credentials": { + "Package": "credentials", + "Version": "1.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "ae55f5d7c02f0ab43c58dd050694f2b4" + "Hash": "db9463f8f96444ac790bef2076048699" }, "curl": { "Package": "curl", - "Version": "4.3", + "Version": "4.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "022c42d49c28e95d69ca60446dbabf88" + }, + "data.table": { + "Package": "data.table", + "Version": "1.14.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2b7d10581cc730804e9ed178c8374bd6" + "Hash": "d1b8b1a821ee564a3515fa6c6d5c52dc" }, "dbplyr": { "Package": "dbplyr", - "Version": "1.4.2", + "Version": "2.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "022c8630abecb00f22740d021ab89595" + "Hash": "1f37fa4ab2f5f7eded42f78b9a887182" }, "desc": { "Package": "desc", - "Version": "1.2.0", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "6c8fe8fa26a23b79949375d372c7b395" + "Hash": "b6963166f7f10b970af1006c462ce6cd" }, "devtools": { "Package": "devtools", - "Version": "2.2.2", + "Version": "2.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "e12b66f9f6dc41b765b047b4df4b4a38" + "Hash": "048d0b914d2cea61f440d35dd3cbddac" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "feb5b7455eba422a2c110bb89852e6a3" }, "digest": { "Package": "digest", - "Version": "0.6.25", + "Version": "0.6.27", "Source": "Repository", "Repository": "CRAN", - "Hash": "f697db7d92b7028c4b3436e9603fb636" + "Hash": "a0cbe758a531d054b537d16dff4d58a1" }, "dplyr": { "Package": "dplyr", - "Version": "0.8.5", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "36f1ae62f026c8ba9f9b5c9a08c03297" + }, + "dtplyr": { + "Package": "dtplyr", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "57a42ddf80f429764ff7987128c3fd0a" + "Hash": "1e14e4c5b2814de5225312394bc316da" }, "ellipsis": { "Package": "ellipsis", - "Version": "0.3.0", + "Version": "0.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "7067d90c1c780bfe80c0d497e3d7b49d" + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" }, "evaluate": { "Package": "evaluate", @@ -250,59 +285,80 @@ }, "fansi": { "Package": "fansi", - "Version": "0.4.1", + "Version": "0.5.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "7fce217eaaf8016e72065e85c73027b5" + "Hash": "d447b40982c576a72b779f0a3b3da227" }, "farver": { "Package": "farver", - "Version": "2.0.3", + "Version": "2.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "dad6793a5a1f73c8e91f1a1e3e834b05" + "Hash": "c98eb5133d9cb9e1622b8691487f11bb" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8" }, "forcats": { "Package": "forcats", - "Version": "0.5.0", + "Version": "0.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "1cb4279e697650f0bd78cd3601ee7576" + "Hash": "81c3244cab67468aac4c60550832655d" }, "fs": { "Package": "fs", - "Version": "1.4.1", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "44594a07a42e5f91fac9f93fda6d0109" + }, + "gargle": { + "Package": "gargle", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "780713bd2f53156fae001443dcdbdcd5" + "Hash": "9d234e6a87a6f8181792de6dc4a00e39" }, "generics": { "Package": "generics", - "Version": "0.0.2", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4d243a9c10b00589889fe32314ffd902" + }, + "gert": { + "Package": "gert", + "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "b8cff1d1391fd1ad8b65877f4c7f2e53" + "Hash": "72b34cde959b806e86cb99fc12d1ba58" }, "ggplot2": { "Package": "ggplot2", - "Version": "3.3.0", + "Version": "3.3.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "911561e07da928345f1ae2d69f97f3ea" + "Hash": "d7566c471c7b17e095dd023b9ef155ad" }, "gh": { "Package": "gh", - "Version": "1.1.0", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "89ea5998938d1ad55f035c8a86f96b74" + "Hash": "38c2580abbda249bd6afeec00d14f531" }, "git2r": { "Package": "git2r", - "Version": "0.26.1", + "Version": "0.28.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "135db4dbc94ed18f629ff8843a8064b7" + "Hash": "f64fd34026f6025de71a4354800e6d79" }, "git2rdata": { "Package": "git2rdata", @@ -311,19 +367,33 @@ "Repository": "CRAN", "Hash": "bf2d93f0e7af2f7b0017d3718efbbaf6" }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f3aefccc1cc50de6338146b62f115de8" + }, "glue": { "Package": "glue", - "Version": "1.4.0", + "Version": "1.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "2aefa994e8df5da17dc09afd80f924d5" + "Hash": "6efd734b14c6471cfe443345f3e35e29" }, - "googlesheets": { - "Package": "googlesheets", - "Version": "0.3.0", + "googledrive": { + "Package": "googledrive", + "Version": "2.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "270597dd84ec5ef7f59b27b4d28782ee" + "Hash": "c3a25adbbfbb03f12e6f88c5fb1f3024" + }, + "googlesheets4": { + "Package": "googlesheets4", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9a6564184dc4a81daea4f1d7ce357c6a" }, "gtable": { "Package": "gtable", @@ -334,45 +404,45 @@ }, "haven": { "Package": "haven", - "Version": "2.2.0", + "Version": "2.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "e3f662e125e9fdffd1ee4e94baea3451" + "Hash": "10bec8a8264f3eb59531e8c4c0303f96" }, "highr": { "Package": "highr", - "Version": "0.8", + "Version": "0.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "4dc5bb88961e347a0f4d8aad597cbfac" + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4" }, "hms": { "Package": "hms", - "Version": "0.5.3", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "726671f634529d470545f9fd1a9d1869" + "Hash": "e4bf161ccb74a2c1c0e8ac63bbe332b4" }, "htmltools": { "Package": "htmltools", - "Version": "0.4.0", + "Version": "0.5.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "2d7691222f82f41e93f6d30f169bd5e1" + "Hash": "526c484233f42522278ab06fb185cb26" }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.5.1", + "httr": { + "Package": "httr", + "Version": "1.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "41bace23583fbc25089edae324de2dc3" + "Hash": "a525aba14184fec243f9eaec62fbed43" }, - "httr": { - "Package": "httr", - "Version": "1.4.1", + "ids": { + "Package": "ids", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7146fea4685b4252ebf478978c75f597" + "Hash": "99df65cfef20e525ed38c3d2577f7190" }, "ini": { "Package": "ini", @@ -383,73 +453,66 @@ }, "isoband": { "Package": "isoband", - "Version": "0.2.1", + "Version": "0.2.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "9b2f7cf1899f583a36d367702ecf49a3" + "Hash": "7ab57a6de7f48a8dc84910d1eca42883" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5aab57a3bd297eee1c1d862735972182" }, "jsonlite": { "Package": "jsonlite", - "Version": "1.6.1", + "Version": "1.7.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "84b0ee361e2f78d6b7d670db9471c0c5" + "Hash": "98138e0994d41508c7a6b84a0600cfcb" }, "knitr": { "Package": "knitr", - "Version": "1.28", + "Version": "1.33", "Source": "Repository", "Repository": "CRAN", - "Hash": "915a6f0134cdbdf016d7778bc80b2eda" + "Hash": "0bc1b5da1b0eb07cd4b727e95e9ff0b8" }, "labeling": { "Package": "labeling", - "Version": "0.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "73832978c1de350df58108c745ed0e3e" - }, - "later": { - "Package": "later", - "Version": "1.0.0", + "Version": "0.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "6d927978fc658d24175ce37db635f9e5" + "Hash": "3d5108641f47470611a32d0bdf357a72" }, "lattice": { "Package": "lattice", - "Version": "0.20-41", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "fbd9285028b0263d76d18c95ae51a53d" - }, - "lazyeval": { - "Package": "lazyeval", - "Version": "0.2.2", + "Version": "0.20-44", "Source": "Repository", "Repository": "CRAN", - "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + "Hash": "f36bf1a849d9106dc2af72e501f9de41" }, "lifecycle": { "Package": "lifecycle", - "Version": "0.2.0", + "Version": "1.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "361811f31f71f8a617a9a68bf63f1f42" + "Hash": "3471fb65971f1a7b2d4ae7848cf2db8d" }, "lubridate": { "Package": "lubridate", - "Version": "1.7.8", + "Version": "1.7.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "6c04c31012c1be39783bebbbfc27b3a3" + "Hash": "1ebfdc8a3cfe8fe19184f5481972b092" }, "magrittr": { "Package": "magrittr", - "Version": "1.5", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "1bb58822a20301cee84a41678e25d9b7" + "Hash": "41287f1ac7d28a92f0a286ed507928d3" }, "markdown": { "Package": "markdown", @@ -460,31 +523,31 @@ }, "memoise": { "Package": "memoise", - "Version": "1.1.0", + "Version": "2.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "58baa74e4603fcfb9a94401c58c8f9b1" + "Hash": "a0bc51650201a56d00a4798523cc91b3" }, "mgcv": { "Package": "mgcv", - "Version": "1.8-31", + "Version": "1.8-36", "Source": "Repository", "Repository": "CRAN", - "Hash": "4bb7e0c4f3557583e1e8d3c9ffb8ba5c" + "Hash": "93cc747b0e1ad882a4570463c3575c23" }, "mime": { "Package": "mime", - "Version": "0.9", + "Version": "0.11", "Source": "Repository", "Repository": "CRAN", - "Hash": "e87a35ec73b157552814869f45a63aa3" + "Hash": "8974a907200fc9948d636fe7d85ca9fb" }, "modelr": { "Package": "modelr", - "Version": "0.1.6", + "Version": "0.1.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "30a2db10e829133fa0a1e6eaed25bc73" + "Hash": "9fd59716311ee82cba83dc2826fc5577" }, "munsell": { "Package": "munsell", @@ -495,38 +558,38 @@ }, "nlme": { "Package": "nlme", - "Version": "3.1-145", + "Version": "3.1-152", "Source": "Repository", "Repository": "CRAN", - "Hash": "0ed9365684dc39cdd0bb5bd2f316dc67" + "Hash": "35de1ce639f20b5e10f7f46260730c65" }, "openssl": { "Package": "openssl", - "Version": "1.4.1", + "Version": "1.4.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "49f7258fd86ebeaea1df24d9ded00478" + "Hash": "f4dbc5a47fd93d3415249884d31d6791" }, "pander": { "Package": "pander", - "Version": "0.6.3", + "Version": "0.6.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "121198ce37b5a6b5227edc5a38223da4" + "Hash": "0eae8a954e0c51bd356f8c6f0e00e805" }, "pillar": { "Package": "pillar", - "Version": "1.4.3", + "Version": "1.6.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "fa3ed60396b6998d0427c57dab90fba4" + "Hash": "43f228eb4b49093d1c8a5c93cae9efe9" }, "pkgbuild": { "Package": "pkgbuild", - "Version": "1.0.6", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "899835dfe286963471cbdb9591f8f94f" + "Hash": "725fcc30222d4d11ec68efb8ff11a9af" }, "pkgconfig": { "Package": "pkgconfig", @@ -537,17 +600,10 @@ }, "pkgload": { "Package": "pkgload", - "Version": "1.0.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5e655fb54cceead0f095f22d7be33da3" - }, - "plogr": { - "Package": "plogr", - "Version": "0.2.0", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "09eb987710984fc2905c7129c7d85e65" + "Hash": "463642747f81879e6752485aefb831cf" }, "plyr": { "Package": "plyr", @@ -572,10 +628,10 @@ }, "processx": { "Package": "processx", - "Version": "3.4.2", + "Version": "3.5.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "20a082f2bde0ffcd8755779fd476a274" + "Hash": "0cbca2bc4d16525d009c4dbba156b37c" }, "progress": { "Package": "progress", @@ -584,26 +640,26 @@ "Repository": "CRAN", "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" }, - "promises": { - "Package": "promises", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "efbbe62da4709f7040a380c702bc7103" - }, "ps": { "Package": "ps", - "Version": "1.3.2", + "Version": "1.6.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "98777535b61c57d1749344345e2a4ccd" + "Hash": "32620e2001c1dce1af49c49dccbb9420" }, "purrr": { "Package": "purrr", + "Version": "0.3.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "97def703420c8ab10d8f0e6c72101e02" + }, + "rappdirs": { + "Package": "rappdirs", "Version": "0.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "22aca7d1181718e927d403a8c2d69d62" + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, "rcmdcheck": { "Package": "rcmdcheck", @@ -614,10 +670,10 @@ }, "readr": { "Package": "readr", - "Version": "1.3.1", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "af8ab99cd936773a148963905736907b" + "Hash": "34807ea4fb5900386ddef904eef8bdb8" }, "readxl": { "Package": "readxl", @@ -633,96 +689,89 @@ "Repository": "CRAN", "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, "remotes": { "Package": "remotes", - "Version": "2.1.1", + "Version": "2.4.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "57c3009534f805f0f6476ffee68483cc" + "Hash": "a85ebb35721573b196317b49ddd2dfe4" }, "renv": { "Package": "renv", - "Version": "0.9.3", + "Version": "0.14.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "c1a367437d8a8a44bec4b9d4974cb20c" + "Hash": "30e5eba91b67f7f4d75d31de14bbfbdc" }, "reprex": { "Package": "reprex", - "Version": "0.3.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "b06bfb3504cc8a4579fd5567646f745b" - }, - "reshape2": { - "Package": "reshape2", - "Version": "1.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "15a23ad30f51789188e439599559815c" - }, - "rex": { - "Package": "rex", - "Version": "1.1.2", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "6d3dbb5d528c8f726861018472bc668c" + "Hash": "911d101becedc0fde495bd910984bdc8" }, "rlang": { "Package": "rlang", - "Version": "0.4.5", + "Version": "0.4.11", "Source": "Repository", "Repository": "CRAN", - "Hash": "1cc1b38e4db40ea6eb19ab8080bbed3b" + "Hash": "515f341d3affe0de9e4a7f762efb0456" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.1", + "Version": "2.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "9d1c61d476c448350c482d6664e1b28b" + "Hash": "1fb097f233ee98968f8e5d0bcd42df6d" }, "roxygen2": { "Package": "roxygen2", - "Version": "7.1.0", + "Version": "7.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "f173062c04dc8e91d7376d914df6efee" + "Hash": "fcd94e00cc409b25d07ca50f7bf339f5" }, "rprojroot": { "Package": "rprojroot", - "Version": "1.3-2", + "Version": "2.0.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "f6a407ae5dd21f6f80a6708bbb6eb3ae" + "Hash": "249d8cd1e74a8f6a26194a91b47f21d1" }, "rstudioapi": { "Package": "rstudioapi", - "Version": "0.11", + "Version": "0.13", "Source": "Repository", "Repository": "CRAN", - "Hash": "33a5b27a03da82ac4b1d43268f80088a" + "Hash": "06c85365a03fdaf699966cc1d3cf53ea" }, "rversions": { "Package": "rversions", - "Version": "2.0.1", + "Version": "2.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "2aa84e83767ba93ee6415b439fa981d2" + "Hash": "f88fab00907b312f8b23ec13e2d437cb" }, "rvest": { "Package": "rvest", - "Version": "0.3.5", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "6a20c2cdf133ebc7ac45888c9ccc052b" + "Hash": "1db38d6f40e3e09527797ca4226a1b5b" }, "scales": { "Package": "scales", - "Version": "1.1.0", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "a1c68369c629ea3188d0676e37069c65" + "Hash": "6f76f71042411426ec8df6c54f34e6dd" }, "selectr": { "Package": "selectr", @@ -740,10 +789,10 @@ }, "stringi": { "Package": "stringi", - "Version": "1.4.6", + "Version": "1.7.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "e99d8d656980d2dd416a962ae55aec90" + "Hash": "ebaccb577da50829a3bb1b8296f318a5" }, "stringr": { "Package": "stringr", @@ -754,80 +803,108 @@ }, "sys": { "Package": "sys", - "Version": "3.3", + "Version": "3.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "507f3116a38d37ad330a038b3be07b66" + "Hash": "b227d13e29222b4574486cfcbde077fa" }, "testthat": { "Package": "testthat", - "Version": "2.3.2", + "Version": "3.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "0829b987b8961fb07f3b1b64a2fbc495" + "Hash": "575216c9946ca70016c3ffb9c31709ba" }, "tibble": { "Package": "tibble", - "Version": "3.0.0", + "Version": "3.1.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "e742bc8d72071ef9aba29f71f132d773" + "Hash": "5e8ad5621e5c94b24ec07b88eee13df8" }, "tidyr": { "Package": "tidyr", - "Version": "1.0.2", + "Version": "1.1.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "fb73a010ace00d6c584c2b53a21b969c" + "Hash": "450d7dfaedde58e28586b854eeece4fa" }, "tidyselect": { "Package": "tidyselect", - "Version": "1.0.0", + "Version": "1.1.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7d4b0f1ab542d8cb7a40c593a4de2f36" + "Hash": "7243004a708d06d4716717fa1ff5b2fe" }, "tidyverse": { "Package": "tidyverse", - "Version": "1.3.0", + "Version": "1.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "bd51be662f359fa99021f3d51e911490" + "Hash": "fc4c72b6ae9bb283416bd59a3303bbab" }, "tinytex": { "Package": "tinytex", - "Version": "0.21", + "Version": "0.33", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6e0ad90ac5669e35d5456cb61b295acb" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.1.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "02e11a2e5d05f1d5ab19394f19ab2999" + "Hash": "fb2b801053decce71295bb8cb04d438b" }, "usethis": { "Package": "usethis", - "Version": "1.5.1", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "30ee6fa315a020d5db6f28adbb7fea83" + "Hash": "360e904f9e623286e1a0c6ca0a98c5f6" }, "utf8": { "Package": "utf8", - "Version": "1.1.4", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c9c462b759a5cc844ae25b5942654d13" + }, + "uuid": { + "Package": "uuid", + "Version": "0.1-4", "Source": "Repository", "Repository": "CRAN", - "Hash": "4a5081acfb7b81a572e4384a7aaf2af1" + "Hash": "e4169eb989a5d03ccb6b628cad1b1b50" }, "vctrs": { "Package": "vctrs", - "Version": "0.2.4", + "Version": "0.3.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "6c839a149a30cb4ffc70443efa74c197" + "Hash": "ecf749a1b39ea72bd9b51b76292261f1" }, "viridisLite": { "Package": "viridisLite", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "55e157e2aa88161bdb0754218470d204" + }, + "vroom": { + "Package": "vroom", + "Version": "1.5.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1a23013f39e67bb57cbda6f4ddde5470" + }, + "waldo": { + "Package": "waldo", "Version": "0.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "ce4f6271baa94776db692f1cb2055bee" + "Hash": "312b264fae22fdba83b7a74187a24da8" }, "whisker": { "Package": "whisker", @@ -838,24 +915,24 @@ }, "withr": { "Package": "withr", - "Version": "2.1.2", + "Version": "2.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "aa57ed55ff2df4bea697a07df528993d" + "Hash": "ad03909b44677f930fa156d47d7a3aeb" }, "xfun": { "Package": "xfun", - "Version": "0.13", + "Version": "0.25", "Source": "Repository", "Repository": "CRAN", - "Hash": "3c1eeacd705ff1695db94bfd443b8a84" + "Hash": "853d45ffff0a9af1e0af017cd359f75e" }, "xml2": { "Package": "xml2", - "Version": "1.3.1", + "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "921dce7c0ec595ed85e77683d3e6c8b6" + "Hash": "d4d71a75dd3ea9eb5fa28cc21f9585e2" }, "xopen": { "Package": "xopen", @@ -870,6 +947,13 @@ "Source": "Repository", "Repository": "CRAN", "Hash": "2826c5d9efb0a88f657c7a679c7106db" + }, + "zip": { + "Package": "zip", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c7eef2996ac270a18c2715c997a727c5" } } } diff --git a/misc/generate_textdata/renv/.gitignore b/misc/generate_textdata/renv/.gitignore index 82740ba9..993aebff 100644 --- a/misc/generate_textdata/renv/.gitignore +++ b/misc/generate_textdata/renv/.gitignore @@ -1,3 +1,5 @@ +local/ +lock/ library/ python/ staging/ diff --git a/misc/generate_textdata/renv/activate.R b/misc/generate_textdata/renv/activate.R index 4baa934f..304fd900 100644 --- a/misc/generate_textdata/renv/activate.R +++ b/misc/generate_textdata/renv/activate.R @@ -2,10 +2,27 @@ local({ # the requested version of renv - version <- "0.9.3" + version <- "0.14.0" + + # the project directory + project <- getwd() + + # allow environment variable to control activation + activate <- Sys.getenv("RENV_ACTIVATE_PROJECT") + if (!nzchar(activate)) { + + # don't auto-activate when R CMD INSTALL is running + if (nzchar(Sys.getenv("R_INSTALL_PKG"))) + return(FALSE) + + } + + # bail if activation was explicitly disabled + if (tolower(activate) %in% c("false", "f", "0")) + return(FALSE) # avoid recursion - if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA))) + if (nzchar(Sys.getenv("RENV_R_INITIALIZING"))) return(invisible(TRUE)) # signal that we're loading renv during R startup @@ -33,73 +50,215 @@ local({ } - # construct path to renv in library - libpath <- local({ - - root <- Sys.getenv("RENV_PATHS_LIBRARY", unset = "renv/library") - prefix <- paste("R", getRversion()[1, 1:2], sep = "-") - - # include SVN revision for development versions of R - # (to avoid sharing platform-specific artefacts with released versions of R) - devel <- - identical(R.version[["status"]], "Under development (unstable)") || - identical(R.version[["nickname"]], "Unsuffered Consequences") - - if (devel) - prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") - - file.path(root, prefix, R.version$platform) - - }) - - # try to load renv from the project library - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - - # warn if the version of renv loaded does not match - loadedversion <- utils::packageDescription("renv", fields = "Version") - if (version != loadedversion) { - - # assume four-component versions are from GitHub; three-component - # versions are from CRAN - components <- strsplit(loadedversion, "[.-]")[[1]] - remote <- if (length(components) == 4L) - paste("rstudio/renv", loadedversion, sep = "@") - else - paste("renv", loadedversion, sep = "@") - - fmt <- paste( - "renv %1$s was loaded from project library, but renv %2$s is recorded in lockfile.", - "Use `renv::record(\"%3$s\")` to record this version in the lockfile.", - "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" + # load bootstrap tools + bootstrap <- function(version, library) { + + # attempt to download renv + tarball <- tryCatch(renv_bootstrap_download(version), error = identity) + if (inherits(tarball, "error")) + stop("failed to download renv ", version) + + # now attempt to install + status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) + if (inherits(status, "error")) + stop("failed to install renv ", version) + + } + + renv_bootstrap_tests_running <- function() { + getOption("renv.tests.running", default = FALSE) + } + + renv_bootstrap_repos <- function() { + + # check for repos override + repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) + if (!is.na(repos)) + return(repos) + + # if we're testing, re-use the test repositories + if (renv_bootstrap_tests_running()) + return(getOption("renv.tests.repos")) + + # retrieve current repos + repos <- getOption("repos") + + # ensure @CRAN@ entries are resolved + repos[repos == "@CRAN@"] <- getOption( + "renv.repos.cran", + "https://cloud.r-project.org" + ) + + # add in renv.bootstrap.repos if set + default <- c(FALLBACK = "https://cloud.r-project.org") + extra <- getOption("renv.bootstrap.repos", default = default) + repos <- c(repos, extra) + + # remove duplicates that might've snuck in + dupes <- duplicated(repos) | duplicated(names(repos)) + repos[!dupes] + + } + + renv_bootstrap_download <- function(version) { + + # if the renv version number has 4 components, assume it must + # be retrieved via github + nv <- numeric_version(version) + components <- unclass(nv)[[1]] + + methods <- if (length(components) == 4L) { + list( + renv_bootstrap_download_github + ) + } else { + list( + renv_bootstrap_download_cran_latest, + renv_bootstrap_download_cran_archive ) - - msg <- sprintf(fmt, loadedversion, version, remote) - warning(msg, call. = FALSE) - } - - # load the project - return(renv::load()) - + + for (method in methods) { + path <- tryCatch(method(version), error = identity) + if (is.character(path) && file.exists(path)) + return(path) + } + + stop("failed to download renv ", version) + } - - # failed to find renv locally; we'll try to install from GitHub. - # first, set up download options as appropriate (try to use GITHUB_PAT) - install_renv <- function() { - - message("Failed to find installation of renv -- attempting to bootstrap...") - - # ensure .Rprofile doesn't get executed - rpu <- Sys.getenv("R_PROFILE_USER", unset = NA) - Sys.setenv(R_PROFILE_USER = "") - on.exit({ - if (is.na(rpu)) - Sys.unsetenv("R_PROFILE_USER") - else - Sys.setenv(R_PROFILE_USER = rpu) - }, add = TRUE) - + + renv_bootstrap_download_impl <- function(url, destfile) { + + mode <- "wb" + + # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715 + fixup <- + Sys.info()[["sysname"]] == "Windows" && + substring(url, 1L, 5L) == "file:" + + if (fixup) + mode <- "w+b" + + utils::download.file( + url = url, + destfile = destfile, + mode = mode, + quiet = TRUE + ) + + } + + renv_bootstrap_download_cran_latest <- function(version) { + + spec <- renv_bootstrap_download_cran_latest_find(version) + + message("* Downloading renv ", version, " ... ", appendLF = FALSE) + + type <- spec$type + repos <- spec$repos + + info <- tryCatch( + utils::download.packages( + pkgs = "renv", + destdir = tempdir(), + repos = repos, + type = type, + quiet = TRUE + ), + condition = identity + ) + + if (inherits(info, "condition")) { + message("FAILED") + return(FALSE) + } + + # report success and return + message("OK (downloaded ", type, ")") + info[1, 2] + + } + + renv_bootstrap_download_cran_latest_find <- function(version) { + + # check whether binaries are supported on this system + binary <- + getOption("renv.bootstrap.binary", default = TRUE) && + !identical(.Platform$pkgType, "source") && + !identical(getOption("pkgType"), "source") && + Sys.info()[["sysname"]] %in% c("Darwin", "Windows") + + types <- c(if (binary) "binary", "source") + + # iterate over types + repositories + for (type in types) { + for (repos in renv_bootstrap_repos()) { + + # retrieve package database + db <- tryCatch( + as.data.frame( + utils::available.packages(type = type, repos = repos), + stringsAsFactors = FALSE + ), + error = identity + ) + + if (inherits(db, "error")) + next + + # check for compatible entry + entry <- db[db$Package %in% "renv" & db$Version %in% version, ] + if (nrow(entry) == 0) + next + + # found it; return spec to caller + spec <- list(entry = entry, type = type, repos = repos) + return(spec) + + } + } + + # if we got here, we failed to find renv + fmt <- "renv %s is not available from your declared package repositories" + stop(sprintf(fmt, version)) + + } + + renv_bootstrap_download_cran_archive <- function(version) { + + name <- sprintf("renv_%s.tar.gz", version) + repos <- renv_bootstrap_repos() + urls <- file.path(repos, "src/contrib/Archive/renv", name) + destfile <- file.path(tempdir(), name) + + message("* Downloading renv ", version, " ... ", appendLF = FALSE) + + for (url in urls) { + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (identical(status, 0L)) { + message("OK") + return(destfile) + } + + } + + message("FAILED") + return(FALSE) + + } + + renv_bootstrap_download_github <- function(version) { + + enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") + if (!identical(enabled, "TRUE")) + return(FALSE) + # prepare download options pat <- Sys.getenv("GITHUB_PAT") if (nzchar(Sys.which("curl")) && nzchar(pat)) { @@ -115,62 +274,386 @@ local({ options(download.file.method = "wget", download.file.extra = extra) on.exit(do.call(base::options, saved), add = TRUE) } - - # fix up repos - repos <- getOption("repos") - on.exit(options(repos = repos), add = TRUE) - repos[repos == "@CRAN@"] <- "https://cloud.r-project.org" - options(repos = repos) - - # check for renv on CRAN matching this version - db <- as.data.frame(available.packages(), stringsAsFactors = FALSE) - if ("renv" %in% rownames(db)) { - entry <- db["renv", ] - if (identical(entry$Version, version)) { - message("* Installing renv ", version, " ... ", appendLF = FALSE) - dir.create(libpath, showWarnings = FALSE, recursive = TRUE) - utils::install.packages("renv", lib = libpath, quiet = TRUE) - message("Done!") - return(TRUE) - } + + message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) + + url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) + name <- sprintf("renv_%s.tar.gz", version) + destfile <- file.path(tempdir(), name) + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (!identical(status, 0L)) { + message("FAILED") + return(FALSE) } - - # try to download renv - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - prefix <- "https://api.github.com" - url <- file.path(prefix, "repos/rstudio/renv/tarball", version) - destfile <- tempfile("renv-", fileext = ".tar.gz") - on.exit(unlink(destfile), add = TRUE) - utils::download.file(url, destfile = destfile, mode = "wb", quiet = TRUE) - message("Done!") - + + message("OK") + return(destfile) + + } + + renv_bootstrap_install <- function(version, tarball, library) { + # attempt to install it into project library message("* Installing renv ", version, " ... ", appendLF = FALSE) - dir.create(libpath, showWarnings = FALSE, recursive = TRUE) - + dir.create(library, showWarnings = FALSE, recursive = TRUE) + # invoke using system2 so we can capture and report output bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" r <- file.path(bin, exe) - args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(libpath), shQuote(destfile)) + args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(library), shQuote(tarball)) output <- system2(r, args, stdout = TRUE, stderr = TRUE) message("Done!") - + # check for successful install status <- attr(output, "status") if (is.numeric(status) && !identical(status, 0L)) { - text <- c("Error installing renv", "=====================", output) + header <- "Error installing renv:" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- c(header, lines, output) writeLines(text, con = stderr()) } + + status + + } + + renv_bootstrap_platform_prefix <- function() { + + # construct version prefix + version <- paste(R.version$major, R.version$minor, sep = ".") + prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") + + # include SVN revision for development versions of R + # (to avoid sharing platform-specific artefacts with released versions of R) + devel <- + identical(R.version[["status"]], "Under development (unstable)") || + identical(R.version[["nickname"]], "Unsuffered Consequences") + + if (devel) + prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") + + # build list of path components + components <- c(prefix, R.version$platform) + + # include prefix if provided by user + prefix <- renv_bootstrap_platform_prefix_impl() + if (!is.na(prefix) && nzchar(prefix)) + components <- c(prefix, components) + + # build prefix + paste(components, collapse = "/") + + } + + renv_bootstrap_platform_prefix_impl <- function() { + + # if an explicit prefix has been supplied, use it + prefix <- Sys.getenv("RENV_PATHS_PREFIX", unset = NA) + if (!is.na(prefix)) + return(prefix) + + # if the user has requested an automatic prefix, generate it + auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (auto %in% c("TRUE", "True", "true", "1")) + return(renv_bootstrap_platform_prefix_auto()) + + # empty string on failure + "" + + } + + renv_bootstrap_platform_prefix_auto <- function() { + + prefix <- tryCatch(renv_bootstrap_platform_os(), error = identity) + if (inherits(prefix, "error") || prefix %in% "unknown") { + + msg <- paste( + "failed to infer current operating system", + "please file a bug report at https://github.com/rstudio/renv/issues", + sep = "; " + ) + + warning(msg) + + } + + prefix + + } + + renv_bootstrap_platform_os <- function() { + + sysinfo <- Sys.info() + sysname <- sysinfo[["sysname"]] + + # handle Windows + macOS up front + if (sysname == "Windows") + return("windows") + else if (sysname == "Darwin") + return("macos") + + # check for os-release files + for (file in c("/etc/os-release", "/usr/lib/os-release")) + if (file.exists(file)) + return(renv_bootstrap_platform_os_via_os_release(file, sysinfo)) + + # check for redhat-release files + if (file.exists("/etc/redhat-release")) + return(renv_bootstrap_platform_os_via_redhat_release()) + + "unknown" + + } + + renv_bootstrap_platform_os_via_os_release <- function(file, sysinfo) { + + # read /etc/os-release + release <- utils::read.table( + file = file, + sep = "=", + quote = c("\"", "'"), + col.names = c("Key", "Value"), + comment.char = "#", + stringsAsFactors = FALSE + ) + + vars <- as.list(release$Value) + names(vars) <- release$Key + + # get os name + os <- tolower(sysinfo[["sysname"]]) + + # read id + id <- "unknown" + for (field in c("ID", "ID_LIKE")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + id <- vars[[field]] + break + } + } + + # read version + version <- "unknown" + for (field in c("UBUNTU_CODENAME", "VERSION_CODENAME", "VERSION_ID", "BUILD_ID")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + version <- vars[[field]] + break + } + } + + # join together + paste(c(os, id, version), collapse = "-") + + } + + renv_bootstrap_platform_os_via_redhat_release <- function() { + + # read /etc/redhat-release + contents <- readLines("/etc/redhat-release", warn = FALSE) + + # infer id + id <- if (grepl("centos", contents, ignore.case = TRUE)) + "centos" + else if (grepl("redhat", contents, ignore.case = TRUE)) + "redhat" + else + "unknown" + + # try to find a version component (very hacky) + version <- "unknown" + + parts <- strsplit(contents, "[[:space:]]")[[1L]] + for (part in parts) { + + nv <- tryCatch(numeric_version(part), error = identity) + if (inherits(nv, "error")) + next + + version <- nv[1, 1] + break + + } + + paste(c("linux", id, version), collapse = "-") + + } + + renv_bootstrap_library_root_name <- function(project) { + + # use project name as-is if requested + asis <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT_ASIS", unset = "FALSE") + if (asis) + return(basename(project)) + + # otherwise, disambiguate based on project's path + id <- substring(renv_bootstrap_hash_text(project), 1L, 8L) + paste(basename(project), id, sep = "-") + + } + + renv_bootstrap_library_root <- function(project) { + + path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) + if (!is.na(path)) + return(path) + + path <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) + if (!is.na(path)) { + name <- renv_bootstrap_library_root_name(project) + return(file.path(path, name)) + } + + prefix <- renv_bootstrap_profile_prefix() + paste(c(project, prefix, "renv/library"), collapse = "/") + + } + + renv_bootstrap_validate_version <- function(version) { + + loadedversion <- utils::packageDescription("renv", fields = "Version") + if (version == loadedversion) + return(TRUE) + + # assume four-component versions are from GitHub; three-component + # versions are from CRAN + components <- strsplit(loadedversion, "[.-]")[[1]] + remote <- if (length(components) == 4L) + paste("rstudio/renv", loadedversion, sep = "@") + else + paste("renv", loadedversion, sep = "@") + + fmt <- paste( + "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", + "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", + "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", + sep = "\n" + ) + + msg <- sprintf(fmt, loadedversion, version, remote) + warning(msg, call. = FALSE) + + FALSE + + } + + renv_bootstrap_hash_text <- function(text) { + + hashfile <- tempfile("renv-hash-") + on.exit(unlink(hashfile), add = TRUE) + + writeLines(text, con = hashfile) + tools::md5sum(hashfile) + + } + + renv_bootstrap_load <- function(project, libpath, version) { + + # try to load renv from the project library + if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) + return(FALSE) + + # warn if the version of renv loaded does not match + renv_bootstrap_validate_version(version) + + # load the project + renv::load(project) + + TRUE + + } + + renv_bootstrap_profile_load <- function(project) { + + # if RENV_PROFILE is already set, just use that + profile <- Sys.getenv("RENV_PROFILE", unset = NA) + if (!is.na(profile) && nzchar(profile)) + return(profile) + + # check for a profile file (nothing to do if it doesn't exist) + path <- file.path(project, "renv/local/profile") + if (!file.exists(path)) + return(NULL) + + # read the profile, and set it if it exists + contents <- readLines(path, warn = FALSE) + if (length(contents) == 0L) + return(NULL) + + # set RENV_PROFILE + profile <- contents[[1L]] + if (nzchar(profile)) + Sys.setenv(RENV_PROFILE = profile) + + profile + + } + + renv_bootstrap_profile_prefix <- function() { + profile <- renv_bootstrap_profile_get() + if (!is.null(profile)) + return(file.path("renv/profiles", profile)) + } + + renv_bootstrap_profile_get <- function() { + profile <- Sys.getenv("RENV_PROFILE", unset = "") + renv_bootstrap_profile_normalize(profile) + } + + renv_bootstrap_profile_set <- function(profile) { + profile <- renv_bootstrap_profile_normalize(profile) + if (is.null(profile)) + Sys.unsetenv("RENV_PROFILE") + else + Sys.setenv(RENV_PROFILE = profile) + } + + renv_bootstrap_profile_normalize <- function(profile) { + + if (is.null(profile) || profile %in% c("", "default")) + return(NULL) + + profile + + } + # load the renv profile, if any + renv_bootstrap_profile_load(project) - } + # construct path to library root + root <- renv_bootstrap_library_root(project) + + # construct library prefix for platform + prefix <- renv_bootstrap_platform_prefix() + + # construct full libpath + libpath <- file.path(root, prefix) + + # attempt to load + if (renv_bootstrap_load(project, libpath, version)) + return(TRUE) + + # load failed; inform user we're about to bootstrap + prefix <- paste("# Bootstrapping renv", version) + postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "") + header <- paste(prefix, postfix) + message(header) + + # perform bootstrap + bootstrap(version, libpath) - try(install_renv()) + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) # try again to load if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - message("Successfully installed and loaded renv ", version, ".") + message("* Successfully installed and loaded renv ", version, ".") return(renv::load()) } diff --git a/misc/generate_textdata/renv/settings.dcf b/misc/generate_textdata/renv/settings.dcf index bba46f4c..11a53eaf 100644 --- a/misc/generate_textdata/renv/settings.dcf +++ b/misc/generate_textdata/renv/settings.dcf @@ -1,6 +1,6 @@ external.libraries: ignored.packages: package.dependency.fields: Imports, Depends, LinkingTo -snapshot.type: packrat +snapshot.type: implicit use.cache: TRUE vcs.ignore.library: TRUE From 8c6f74501987dce5b393577736d0252a0763de85 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 20 Sep 2021 17:58:23 +0200 Subject: [PATCH 08/36] generate_textdata: migrate to googlesheets4 --- misc/generate_textdata/10_types.Rmd | 29 +++++------ misc/generate_textdata/20_env_pressures.Rmd | 8 +-- .../30_schemes_and_scheme_types.Rmd | 52 +++++++++---------- misc/generate_textdata/index.Rmd | 11 +++- 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/misc/generate_textdata/10_types.Rmd b/misc/generate_textdata/10_types.Rmd index 50272413..98cc90db 100644 --- a/misc/generate_textdata/10_types.Rmd +++ b/misc/generate_textdata/10_types.Rmd @@ -13,15 +13,12 @@ root <- "../.." Reading from the source googlesheet (maintained by Steven De Saeger): ```{r message=FALSE} -# the first time, run: -# gs_auth() -types_source <- gs_key("1dK0S1Tt3RlVEh4WrNF5N_-hn0OXiTUVOvsL2JRhSl78") -# gs_browse(types_source) +# gs4_browse(types_gs_id) source_df <- - types_source %>% - gs_read(ws = 1, - check.names = T, - verbose = FALSE) + types_gs_id %>% + read_sheet(sheet = 1, + .name_repair = make.names) %>% + mutate(across(starts_with("Code"), unlist)) ``` Writing the namelist a first time: @@ -167,18 +164,16 @@ hc_names %>% Groundwater and flood dependency: -```{r} -wdep_ss <- gs_key("1bhXgamK28K--MSWF7goKNOWtWPEI149_QCpU-3V_k_E") -# gs_browse(wdep_ss) +```{r message=FALSE} +# gs4_browse(wdep_gs_id) type_wdep <- - wdep_ss %>% - gs_read(ws = "Waterafhankelijke HT en RBB", - verbose = FALSE, + wdep_gs_id %>% + read_sheet(sheet = "Waterafhankelijke HT en RBB", skip = 2, col_names = FALSE) %>% - select(type = X1, - groundw_dep = X9, - flood_dep = X10) %>% + select(type = ...1, + groundw_dep = ...9, + flood_dep = ...10) %>% mutate(groundw_dep = case_when(str_detect(groundw_dep, "alle") ~ "GD2", str_detect(groundw_dep, "niet") ~ "GD0", TRUE ~ "GD1") %>% diff --git a/misc/generate_textdata/20_env_pressures.Rmd b/misc/generate_textdata/20_env_pressures.Rmd index c96e9ca5..98b31ac7 100644 --- a/misc/generate_textdata/20_env_pressures.Rmd +++ b/misc/generate_textdata/20_env_pressures.Rmd @@ -5,13 +5,9 @@ Reading from the source googlesheet: ```{r message=FALSE} -ep_source <- gs_key("1PH6InqJk0ijQF_N7v7IZjarijlqHRBCKhTbDn44skZU") source_df <- - ep_source %>% - gs_read(ws = gs_ws_ls(ep_source) %>% - head(1), - check.names = T, - verbose = FALSE) + ep_gs_id %>% + read_sheet(sheet = sheet_names(ep_gs_id)[1]) ``` Adding multilingual EP names and abbreviations to `namelist`: diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index 04e6e7f4..f5bd2feb 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -19,12 +19,10 @@ schemes_types_nl <- Reading a link between older Dutch codes of environmental pressures and the current ep_codes: ```{r message=FALSE} -ws_list <- gs_ws_ls(ep_source) +ws_list <- sheet_names(ep_gs_id) ep_codes <- - ep_source %>% - gs_read(ws = ws_list[str_detect(ws_list, "\\ 1.0\\ ")], - check.names = T, - verbose = FALSE) %>% + ep_gs_id %>% + read_sheet(sheet = ws_list[str_detect(ws_list, "\\ 1.0\\ ")]) %>% select(ep_code = Environmental_pressure_code, ep_code_nl = Environmental_pressure_code_NL_OLD) %>% mutate(ep_code = factor(ep_code, @@ -250,15 +248,13 @@ schemes <- Collecting typegroup information to join on type: ```{r message=FALSE} -tg_source <- gs_key("1n2ohvuLEK_anX37gxlanQXRGotweMVonFxKxtfTcuZI") -ws_list <- gs_ws_ls(tg_source) +ws_list <- sheet_names(tg_gs_id) typegroups <- - tg_source %>% - gs_read(ws = ws_list[str_detect(ws_list, "Eutrofiëring")], - check.names = T, - verbose = FALSE) %>% + tg_gs_id %>% + read_sheet(sheet = ws_list[str_detect(ws_list, "Eutrofiëring")], + .name_repair = make.names) %>% slice(2:n()) %>% expand_grid(scheme = c("GW_03.3", "SURF_03.4_lentic") @@ -268,10 +264,9 @@ typegroups <- typegroup = Cluster.voedselrijkdom) %>% bind_rows( - tg_source %>% - gs_read(ws = ws_list[str_detect(ws_list, "GW_05\\.1")], - check.names = T, - verbose = FALSE) %>% + tg_gs_id %>% + read_sheet(sheet = "GW_05.1 (XG3)", + .name_repair = make.names) %>% filter(Type %in% (schemes_schemetypes %>% filter(scheme == "GW_05.1_terr") %>% @@ -284,10 +279,9 @@ typegroups <- ) %>% bind_rows( - tg_source %>% - gs_read(ws = ws_list[str_detect(ws_list, "ATM_03\\.1")], - check.names = T, - verbose = FALSE) %>% + tg_gs_id %>% + read_sheet(sheet = ws_list[str_detect(ws_list, "ATM_03\\.1")], + .name_repair = make.names) %>% mutate(scheme = "ATM_03.1") %>% select(scheme, type = Type, @@ -295,10 +289,9 @@ typegroups <- ) %>% bind_rows( - tg_source %>% - gs_read(ws = ws_list[str_detect(ws_list, "ATM_04\\.1")], - check.names = T, - verbose = FALSE) %>% + tg_gs_id %>% + read_sheet(sheet = ws_list[str_detect(ws_list, "ATM_04\\.1")], + .name_repair = make.names) %>% mutate(scheme = "ATM_04.1") %>% select(scheme, type = Type, @@ -495,8 +488,9 @@ tribble(~nr, ~lang, ~name, ~shortname, Writing `schemes`. ```{r message=FALSE} -schemes_MHQ <- gs_key("1PU9MDyJKZz2DOrKqb-SIIVmSaR1mh4Ke6v0WCqhr8t4") %>% - gs_read(ws = 1) %>% +schemes_MHQ <- + mhq_gs_id %>% + read_sheet(sheet = 1) %>% mutate(attribute_1 = ifelse(attribute_1 == 91, "91E0", as.character(attribute_1)), @@ -545,9 +539,11 @@ schemes %>% Writing `scheme_types`. ```{r} -scheme_type_MHQ <- gs_key("1PU9MDyJKZz2DOrKqb-SIIVmSaR1mh4Ke6v0WCqhr8t4") %>% - gs_read(ws = 2) %>% - mutate(scheme = factor(scheme)) +scheme_type_MHQ <- + mhq_gs_id %>% + read_sheet(sheet = 2) %>% + mutate(scheme = factor(scheme), + type = unlist(type)) scheme_types %>% bind_rows(scheme_type_MHQ) %>% diff --git a/misc/generate_textdata/index.Rmd b/misc/generate_textdata/index.Rmd index 497562e0..61a2525b 100644 --- a/misc/generate_textdata/index.Rmd +++ b/misc/generate_textdata/index.Rmd @@ -42,7 +42,8 @@ options(stringsAsFactors = FALSE) library(tidyverse) library(stringr) library(knitr) -library(googlesheets) +library(googlesheets4) +local_gs4_quiet() library(git2rdata) opts_chunk$set( echo = TRUE, @@ -52,6 +53,14 @@ opts_chunk$set( **Note: this is a bookdown project, supposed to be run from within the `misc/generate_textdata` subfolder. You can use the `generate_textdata.Rproj` RStudio project file in this subfolder to run it, and run `bookdown::render_book("index.Rmd", "bookdown::html_document2")`. To run in a separate R session, use RStudio's build button, or (for older renv libraries) with R or Rscript (use the right version) in a shell.** +```{r} +# IDs of all involved googlesheets +types_gs_id <- "1dK0S1Tt3RlVEh4WrNF5N_-hn0OXiTUVOvsL2JRhSl78" +wdep_gs_id <- "1bhXgamK28K--MSWF7goKNOWtWPEI149_QCpU-3V_k_E" +ep_gs_id <- "1PH6InqJk0ijQF_N7v7IZjarijlqHRBCKhTbDn44skZU" +tg_gs_id <- "1n2ohvuLEK_anX37gxlanQXRGotweMVonFxKxtfTcuZI" +mhq_gs_id <- "1PU9MDyJKZz2DOrKqb-SIIVmSaR1mh4Ke6v0WCqhr8t4" +``` From 86bd48ca4a2b6ad4386f01efd1e61b2a97e6dacc Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 20 Sep 2021 18:14:02 +0200 Subject: [PATCH 09/36] generate_textdata: update schemes, scheme_types, namelist * - A few type name updates by S. De Saeger - Scheme HQ2190 has been split in two schemes. Note that this currently poses an error in the namelist (see last line). --- inst/textdata/namelist.tsv | 9 +++++---- inst/textdata/namelist.yml | 2 +- inst/textdata/scheme_types.tsv | 5 +++-- inst/textdata/scheme_types.yml | 10 ++++++---- inst/textdata/schemes.tsv | 3 ++- inst/textdata/schemes.yml | 16 ++++++++++------ 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index 3d63e557..cfdfa94e 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -153,7 +153,7 @@ HQ2130 en Habitat quality scheme: Grey dunes Habitat quality scheme 2130 HQ2160 en Habitat quality scheme: Hippophae rhamnoides dunes Habitat quality scheme 2160 HQ2170 en Habitat quality scheme: Salix repens dunes Habitat quality scheme 2170 HQ2180 en Habitat quality scheme: Wooded dunes Habitat quality scheme 2180 -HQ2190 en Habitat quality scheme: Humid dune slacks Habitat quality scheme 2190 +HQ2190_aq en Habitat quality scheme: Dune slack ponds Habitat quality scheme 2190_a HQ2310 en Habitat quality scheme: Psammophylic heath Habitat quality scheme 2310 HQ2330 en Habitat quality scheme: Inland shifting dunes Habitat quality scheme 2330 HQ3110 en Habitat quality scheme: Barely buffered standing waters Habitat quality scheme 3110 @@ -276,10 +276,10 @@ rbbhfl en Tall herb communities with Lysimachia vulgaris and Calamagrostis canes rbbkam en Cynosurion grasslands Cynosurion grasslands rbbkam+ en Species-rich Cynosurion grasslands Species-rich Cynosurion grasslands rbbmc en Tall sedges communities Tall sedges communities -rbbmr en Reed beds and other Phragmites communities (no habitat type 6430) Reed beds and other Phragmites communities (not 6430) +rbbmr en Reed beds and other Phragmites communities Reed beds and other Phragmites communities rbbms en Small sedge communities (no habitat type 7140) Small sedge communities (not 7140) rbbppm en Old, structure rich Pinus sylvestris forest Old, structure rich Pinus sylvestris forest -rbbsf en Wet Salix scrubs on nutrient rich soil (no habitat type 91E0) Wet Salix scrubs on nutrient rich soil (not 91E0) +rbbsf en Wet Salix scrubs on nutrient rich soil Wet Salix scrubs on nutrient rich soil rbbsg en Cytisus and Ulex scrub Cytisus and Ulex scrubs rbbsm en Myrica gale scrubs Myrica gale scrubs rbbso en Wet Salix scrubs on acid peaty soil Wet Salix scrubs on acid peaty soil @@ -444,7 +444,7 @@ HQ2130 nl Meetnet habitatkwaliteit: vastgelegde duinen Meetnet habitatkwaliteit HQ2160 nl Meetnet habitatkwaliteit: duindoornstruwelen Meetnet habitatkwaliteit 2160 HQ2170 nl Meetnet habitatkwaliteit: kruipwilgstruwelen Meetnet habitatkwaliteit 2170 HQ2180 nl Meetnet habitatkwaliteit: duinbossen Meetnet habitatkwaliteit 2180 -HQ2190 nl Meetnet habitatkwaliteit: vochtige duinvalleien Meetnet habitatkwaliteit 2190 +HQ2190_aq nl Meetnet habitatkwaliteit: duinplassen Meetnet habitatkwaliteit 2190_a HQ2310 nl Meetnet habitatkwaliteit: droge heide op landduinen Meetnet habitatkwaliteit 2310 HQ2330 nl Meetnet habitatkwaliteit: open grasland op landduinen Meetnet habitatkwaliteit 2330 HQ3110 nl Meetnet habitatkwaliteit: zeer zwakgebufferde vennen Meetnet habitatkwaliteit 3110 @@ -609,3 +609,4 @@ rbbzil nl zilverschoongrasland zilverschoongrasland rbbzil+ nl soortenrijk zilverschoongrasland soortenrijk zilverschoongrasland secondary nl Secundair meetnet NA terr nl terrestrisch NA +HQ2190_terr NA NA NA NA 2190_terr diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index 71c8234e..ed6cce4b 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 9ff48efd56e6679ba60c12c46cc76853aa21d404 + data_hash: 58d7ef69f04229b92d03b892ba079f4616e4b4ca code: class: character lang: diff --git a/inst/textdata/scheme_types.tsv b/inst/textdata/scheme_types.tsv index 675d3ab1..e9534ca6 100644 --- a/inst/textdata/scheme_types.tsv +++ b/inst/textdata/scheme_types.tsv @@ -726,8 +726,9 @@ scheme type typegroup 37 13 NA 38 14 NA 39 15 NA -40 17 NA -40 18 NA +61 16 NA +65 17 NA +65 18 NA 41 19 NA 42 20 NA 43 22 NA diff --git a/inst/textdata/scheme_types.yml b/inst/textdata/scheme_types.yml index 68634c55..cd1d540b 100644 --- a/inst/textdata/scheme_types.yml +++ b/inst/textdata/scheme_types.yml @@ -5,8 +5,8 @@ sorting: - scheme - type - hash: ae0fdabc80affdd71a60d85c35080afb337894c3 - data_hash: 5214841794ac5e42efeec807c67afe4746ad01c1 + hash: 996b90ba309ada058fd4c3cf59ef4521bfd9c4be + data_hash: 254b130bf1724301703284797b3adb326c1db1e0 scheme: class: factor labels: @@ -52,7 +52,8 @@ scheme: - HQ2160 - HQ2170 - HQ2180 - - HQ2190 + - HQ2190_aq + - HQ2190_terr - HQ2310 - HQ2330 - HQ3110 @@ -116,7 +117,8 @@ scheme: - 37 - 38 - 39 - - 40 + - 61 + - 65 - 41 - 42 - 43 diff --git a/inst/textdata/schemes.tsv b/inst/textdata/schemes.tsv index 4a9d7b83..cb561a9d 100644 --- a/inst/textdata/schemes.tsv +++ b/inst/textdata/schemes.tsv @@ -41,7 +41,8 @@ scheme programme attribute_1 attribute_2 attribute_3 spatial_restriction notes t 37 2 8 NA NA NA NA 4 NA NA 38 2 9 NA NA NA NA 4 NA NA 39 2 10 NA NA NA NA 4 NA NA -40 2 11 NA NA NA NA 4 NA NA +61 2 33 NA NA NA NA 3 NA NA +65 2 34 NA NA NA NA 4 NA NA 41 2 12 NA NA NA NA 4 NA NA 42 2 13 NA NA NA NA 4 NA NA 43 2 14 NA NA NA NA 3 NA NA diff --git a/inst/textdata/schemes.yml b/inst/textdata/schemes.yml index 8def8b0c..eb35998b 100644 --- a/inst/textdata/schemes.yml +++ b/inst/textdata/schemes.yml @@ -5,8 +5,8 @@ sorting: - programme - scheme - hash: d189d370cad2f6ca5b708b73f4c2d6285333b8fa - data_hash: ce2a4c8602fc4205b55dcedd93e891015cc39afb + hash: b28a62b443678796a29db126dcb4b1e774c20377 + data_hash: ed075ef64e0a7fbf4ab772afd586e02e2d2e2b87 scheme: class: factor labels: @@ -52,7 +52,8 @@ scheme: - HQ2160 - HQ2170 - HQ2180 - - HQ2190 + - HQ2190_aq + - HQ2190_terr - HQ2310 - HQ2330 - HQ3110 @@ -116,7 +117,8 @@ scheme: - 37 - 38 - 39 - - 40 + - 61 + - 65 - 41 - 42 - 43 @@ -161,7 +163,8 @@ attribute_1: - '2160' - '2170' - '2180' - - '2190' + - 2190_a + - 2190_terr - '2310' - '2330' - '3110' @@ -194,7 +197,8 @@ attribute_1: - 8 - 9 - 10 - - 11 + - 33 + - 34 - 12 - 13 - 14 From bdf84f479d9735d335946fa55c96066f6306aebc Mon Sep 17 00:00:00 2001 From: WESTRA Date: Thu, 23 Sep 2021 09:20:10 +0200 Subject: [PATCH 10/36] use 2190 as attribute value for HQ2190 instead of 2190_terr --- inst/textdata/schemes.tsv | 2 +- inst/textdata/schemes.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inst/textdata/schemes.tsv b/inst/textdata/schemes.tsv index cb561a9d..f7950e5f 100644 --- a/inst/textdata/schemes.tsv +++ b/inst/textdata/schemes.tsv @@ -42,7 +42,7 @@ scheme programme attribute_1 attribute_2 attribute_3 spatial_restriction notes t 38 2 9 NA NA NA NA 4 NA NA 39 2 10 NA NA NA NA 4 NA NA 61 2 33 NA NA NA NA 3 NA NA -65 2 34 NA NA NA NA 4 NA NA +65 2 11 NA NA NA NA 4 NA NA 41 2 12 NA NA NA NA 4 NA NA 42 2 13 NA NA NA NA 4 NA NA 43 2 14 NA NA NA NA 3 NA NA diff --git a/inst/textdata/schemes.yml b/inst/textdata/schemes.yml index eb35998b..bb38655c 100644 --- a/inst/textdata/schemes.yml +++ b/inst/textdata/schemes.yml @@ -5,8 +5,8 @@ sorting: - programme - scheme - hash: b28a62b443678796a29db126dcb4b1e774c20377 - data_hash: ed075ef64e0a7fbf4ab772afd586e02e2d2e2b87 + hash: a7161d9fe68befeb9feec626e0d5b0e3710eca97 + data_hash: 031ed7c381ae9a8bc4c70dab750d4b4b24a1e2ae scheme: class: factor labels: @@ -163,8 +163,8 @@ attribute_1: - '2160' - '2170' - '2180' + - '2190' - 2190_a - - 2190_terr - '2310' - '2330' - '3110' @@ -197,8 +197,8 @@ attribute_1: - 8 - 9 - 10 + - 11 - 33 - - 34 - 12 - 13 - 14 From dba9c3d45e2ec63472896fdc839c97c27231ae96 Mon Sep 17 00:00:00 2001 From: WESTRA Date: Thu, 23 Sep 2021 09:24:34 +0200 Subject: [PATCH 11/36] define that col_types are characters when reading google sheet; add '(terrestrial)' to name of scheme HQ2190_terr and '(terr)' to short name in namelist --- .../30_schemes_and_scheme_types.Rmd | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index f5bd2feb..5e7530e2 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -490,7 +490,7 @@ Writing `schemes`. ```{r message=FALSE} schemes_MHQ <- mhq_gs_id %>% - read_sheet(sheet = 1) %>% + read_sheet(sheet = 1, col_types = "c") %>% mutate(attribute_1 = ifelse(attribute_1 == 91, "91E0", as.character(attribute_1)), @@ -577,11 +577,20 @@ schemes_MHQ_names <- schemes_MHQ %>% mutate(name = paste(ifelse(lang == "en", "Habitat quality scheme:", "Meetnet habitatkwaliteit:"), - shortname), + shortname, + ifelse(scheme == "HQ2190_terr", + ifelse(lang == "en", + "(terrestrial)", "(terrestrisch)"), + "") + ), shortname = paste(ifelse(lang == "en", "Habitat quality scheme", "Meetnet habitatkwaliteit"), - attribute_1)) %>% + attribute_1, + ifelse(scheme == "HQ2190_terr", + "(terr)", + "")) + ) %>% select(code = scheme, lang, name, shortname) namelist %>% From ca8ee8c7e06bd2f195ae4c57220240ad72779b53 Mon Sep 17 00:00:00 2001 From: WESTRA Date: Thu, 23 Sep 2021 09:25:56 +0200 Subject: [PATCH 12/36] change name and short name of HQ2190_terr --- inst/textdata/namelist.tsv | 111 +++++++++++++++++++------------------ inst/textdata/namelist.yml | 2 +- 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index cfdfa94e..549880ed 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -147,33 +147,34 @@ HC12 en Dry to moist + Temporarily to permanently wet Dry + Wet HC2 en Temporarily to permanently wet Wet HC23 en Temporarily to permanently wet + Surface water Wet + Surface water HC3 en Surface water Surface water -HQ1330 en Habitat quality scheme: Atlantic salt meadows Habitat quality scheme 1330 -HQ2120 en Habitat quality scheme: White dunes Habitat quality scheme 2120 -HQ2130 en Habitat quality scheme: Grey dunes Habitat quality scheme 2130 -HQ2160 en Habitat quality scheme: Hippophae rhamnoides dunes Habitat quality scheme 2160 -HQ2170 en Habitat quality scheme: Salix repens dunes Habitat quality scheme 2170 -HQ2180 en Habitat quality scheme: Wooded dunes Habitat quality scheme 2180 -HQ2190_aq en Habitat quality scheme: Dune slack ponds Habitat quality scheme 2190_a -HQ2310 en Habitat quality scheme: Psammophylic heath Habitat quality scheme 2310 -HQ2330 en Habitat quality scheme: Inland shifting dunes Habitat quality scheme 2330 -HQ3110 en Habitat quality scheme: Barely buffered standing waters Habitat quality scheme 3110 -HQ3130 en Habitat quality scheme: Poorly buffered standing waters Habitat quality scheme 3130 -HQ3140 en Habitat quality scheme: Standing waters with Chara Habitat quality scheme 3140 -HQ3150 en Habitat quality scheme: Lakes with Stratiotes and Potamogeton Habitat quality scheme 3150 -HQ3160 en Habitat quality scheme: Dystrophic standing waters Habitat quality scheme 3160 -HQ3270 en Habitat quality scheme: Rivers with muddy banks Habitat quality scheme 3270 -HQ4010 en Habitat quality scheme: Wet heaths Habitat quality scheme 4010 -HQ4030 en Habitat quality scheme: Dry heaths Habitat quality scheme 4030 -HQ6120 en Habitat quality scheme: Pioneer calcareous sand swards Habitat quality scheme 6120 -HQ6230 en Habitat quality scheme: Nardus grasslands Habitat quality scheme 6230 -HQ6410 en Habitat quality scheme: Molinion grasslands Habitat quality scheme 6410 -HQ6510 en Habitat quality scheme: Arrhenaterion and Alopecurion grasslands Habitat quality scheme 6510 -HQ7140 en Habitat quality scheme: Transition mires and quaking bogs Habitat quality scheme 7140 -HQ9120 en Habitat quality scheme: Beech-oak forests with Ilex Habitat quality scheme 9120 -HQ9130 en Habitat quality scheme: Neutrophilic beech forest Habitat quality scheme 9130 -HQ9160 en Habitat quality scheme: Oak-hornbeam forests Habitat quality scheme 9160 -HQ9190 en Habitat quality scheme: Old oak forests Habitat quality scheme 9190 -HQ91E0 en Habitat quality scheme: Alluvial forests Habitat quality scheme 91E0 +HQ1330 en Habitat quality scheme: Atlantic salt meadows Habitat quality scheme 1330 +HQ2120 en Habitat quality scheme: White dunes Habitat quality scheme 2120 +HQ2130 en Habitat quality scheme: Grey dunes Habitat quality scheme 2130 +HQ2160 en Habitat quality scheme: Hippophae rhamnoides dunes Habitat quality scheme 2160 +HQ2170 en Habitat quality scheme: Salix repens dunes Habitat quality scheme 2170 +HQ2180 en Habitat quality scheme: Wooded dunes Habitat quality scheme 2180 +HQ2190_aq en Habitat quality scheme: Dune slack ponds Habitat quality scheme 2190_a +HQ2190_terr en Habitat quality scheme: Humid dune slacks (terrestrial) Habitat quality scheme 2190 (terr) +HQ2310 en Habitat quality scheme: Psammophylic heath Habitat quality scheme 2310 +HQ2330 en Habitat quality scheme: Inland shifting dunes Habitat quality scheme 2330 +HQ3110 en Habitat quality scheme: Barely buffered standing waters Habitat quality scheme 3110 +HQ3130 en Habitat quality scheme: Poorly buffered standing waters Habitat quality scheme 3130 +HQ3140 en Habitat quality scheme: Standing waters with Chara Habitat quality scheme 3140 +HQ3150 en Habitat quality scheme: Lakes with Stratiotes and Potamogeton Habitat quality scheme 3150 +HQ3160 en Habitat quality scheme: Dystrophic standing waters Habitat quality scheme 3160 +HQ3270 en Habitat quality scheme: Rivers with muddy banks Habitat quality scheme 3270 +HQ4010 en Habitat quality scheme: Wet heaths Habitat quality scheme 4010 +HQ4030 en Habitat quality scheme: Dry heaths Habitat quality scheme 4030 +HQ6120 en Habitat quality scheme: Pioneer calcareous sand swards Habitat quality scheme 6120 +HQ6230 en Habitat quality scheme: Nardus grasslands Habitat quality scheme 6230 +HQ6410 en Habitat quality scheme: Molinion grasslands Habitat quality scheme 6410 +HQ6510 en Habitat quality scheme: Arrhenaterion and Alopecurion grasslands Habitat quality scheme 6510 +HQ7140 en Habitat quality scheme: Transition mires and quaking bogs Habitat quality scheme 7140 +HQ9120 en Habitat quality scheme: Beech-oak forests with Ilex Habitat quality scheme 9120 +HQ9130 en Habitat quality scheme: Neutrophilic beech forest Habitat quality scheme 9130 +HQ9160 en Habitat quality scheme: Oak-hornbeam forests Habitat quality scheme 9160 +HQ9190 en Habitat quality scheme: Old oak forests Habitat quality scheme 9190 +HQ91E0 en Habitat quality scheme: Alluvial forests Habitat quality scheme 91E0 HS en Temperate heath and scrub NA ID en Inland dunes NA INUN en Inundationwater monitoring NA @@ -438,33 +439,34 @@ HC12 nl Droog tot vochtig + Tijdelijk tot permanent nat Droog + Nat HC2 nl Tijdelijk tot permanent nat Nat HC23 nl Tijdelijk tot permanent nat + Oppervlaktewater Nat + Oppervlaktewater HC3 nl Oppervlaktewater Oppervlaktewater -HQ1330 nl Meetnet habitatkwaliteit: Atlantische schorren Meetnet habitatkwaliteit 1330 -HQ2120 nl Meetnet habitatkwaliteit: wandelende duinen Meetnet habitatkwaliteit 2120 -HQ2130 nl Meetnet habitatkwaliteit: vastgelegde duinen Meetnet habitatkwaliteit 2130 -HQ2160 nl Meetnet habitatkwaliteit: duindoornstruwelen Meetnet habitatkwaliteit 2160 -HQ2170 nl Meetnet habitatkwaliteit: kruipwilgstruwelen Meetnet habitatkwaliteit 2170 -HQ2180 nl Meetnet habitatkwaliteit: duinbossen Meetnet habitatkwaliteit 2180 -HQ2190_aq nl Meetnet habitatkwaliteit: duinplassen Meetnet habitatkwaliteit 2190_a -HQ2310 nl Meetnet habitatkwaliteit: droge heide op landduinen Meetnet habitatkwaliteit 2310 -HQ2330 nl Meetnet habitatkwaliteit: open grasland op landduinen Meetnet habitatkwaliteit 2330 -HQ3110 nl Meetnet habitatkwaliteit: zeer zwakgebufferde vennen Meetnet habitatkwaliteit 3110 -HQ3130 nl Meetnet habitatkwaliteit: zwakgebufferde vennen Meetnet habitatkwaliteit 3130 -HQ3140 nl Meetnet habitatkwaliteit: kranswierwateren Meetnet habitatkwaliteit 3140 -HQ3150 nl Meetnet habitatkwaliteit: van nature eutrofe wateren Meetnet habitatkwaliteit 3150 -HQ3160 nl Meetnet habitatkwaliteit: dystrofe vennen Meetnet habitatkwaliteit 3160 -HQ3270 nl Meetnet habitatkwaliteit: voedselrijke slikoevers met bepaalde eenjarige planten Meetnet habitatkwaliteit 3270 -HQ4010 nl Meetnet habitatkwaliteit: vochtige heide Meetnet habitatkwaliteit 4010 -HQ4030 nl Meetnet habitatkwaliteit: droge heide Meetnet habitatkwaliteit 4030 -HQ6120 nl Meetnet habitatkwaliteit: stroomdalgraslanden Meetnet habitatkwaliteit 6120 -HQ6230 nl Meetnet habitatkwaliteit: heischrale graslanden Meetnet habitatkwaliteit 6230 -HQ6410 nl Meetnet habitatkwaliteit: blauwgraslanden Meetnet habitatkwaliteit 6410 -HQ6510 nl Meetnet habitatkwaliteit: soortenrijke glanshavergraslanden Meetnet habitatkwaliteit 6510 -HQ7140 nl Meetnet habitatkwaliteit: overgangs- en trilveen Meetnet habitatkwaliteit 7140 -HQ9120 nl Meetnet habitatkwaliteit: beuken-eikenbossen op zure bodem Meetnet habitatkwaliteit 9120 -HQ9130 nl Meetnet habitatkwaliteit: eiken-beukenbossen met wilde hyacint en parelgras-beukenbossen Meetnet habitatkwaliteit 9130 -HQ9160 nl Meetnet habitatkwaliteit: eiken-haagbeukenbossen Meetnet habitatkwaliteit 9160 -HQ9190 nl Meetnet habitatkwaliteit: oude eiken-berkenbossen Meetnet habitatkwaliteit 9190 -HQ91E0 nl Meetnet habitatkwaliteit: vochtige alluviale bossen Meetnet habitatkwaliteit 91E0 +HQ1330 nl Meetnet habitatkwaliteit: Atlantische schorren Meetnet habitatkwaliteit 1330 +HQ2120 nl Meetnet habitatkwaliteit: wandelende duinen Meetnet habitatkwaliteit 2120 +HQ2130 nl Meetnet habitatkwaliteit: vastgelegde duinen Meetnet habitatkwaliteit 2130 +HQ2160 nl Meetnet habitatkwaliteit: duindoornstruwelen Meetnet habitatkwaliteit 2160 +HQ2170 nl Meetnet habitatkwaliteit: kruipwilgstruwelen Meetnet habitatkwaliteit 2170 +HQ2180 nl Meetnet habitatkwaliteit: duinbossen Meetnet habitatkwaliteit 2180 +HQ2190_aq nl Meetnet habitatkwaliteit: duinplassen Meetnet habitatkwaliteit 2190_a +HQ2190_terr nl Meetnet habitatkwaliteit: vochtige duinvalleien (terrestrisch) Meetnet habitatkwaliteit 2190 (terr) +HQ2310 nl Meetnet habitatkwaliteit: droge heide op landduinen Meetnet habitatkwaliteit 2310 +HQ2330 nl Meetnet habitatkwaliteit: open grasland op landduinen Meetnet habitatkwaliteit 2330 +HQ3110 nl Meetnet habitatkwaliteit: zeer zwakgebufferde vennen Meetnet habitatkwaliteit 3110 +HQ3130 nl Meetnet habitatkwaliteit: zwakgebufferde vennen Meetnet habitatkwaliteit 3130 +HQ3140 nl Meetnet habitatkwaliteit: kranswierwateren Meetnet habitatkwaliteit 3140 +HQ3150 nl Meetnet habitatkwaliteit: van nature eutrofe wateren Meetnet habitatkwaliteit 3150 +HQ3160 nl Meetnet habitatkwaliteit: dystrofe vennen Meetnet habitatkwaliteit 3160 +HQ3270 nl Meetnet habitatkwaliteit: voedselrijke slikoevers met bepaalde eenjarige planten Meetnet habitatkwaliteit 3270 +HQ4010 nl Meetnet habitatkwaliteit: vochtige heide Meetnet habitatkwaliteit 4010 +HQ4030 nl Meetnet habitatkwaliteit: droge heide Meetnet habitatkwaliteit 4030 +HQ6120 nl Meetnet habitatkwaliteit: stroomdalgraslanden Meetnet habitatkwaliteit 6120 +HQ6230 nl Meetnet habitatkwaliteit: heischrale graslanden Meetnet habitatkwaliteit 6230 +HQ6410 nl Meetnet habitatkwaliteit: blauwgraslanden Meetnet habitatkwaliteit 6410 +HQ6510 nl Meetnet habitatkwaliteit: soortenrijke glanshavergraslanden Meetnet habitatkwaliteit 6510 +HQ7140 nl Meetnet habitatkwaliteit: overgangs- en trilveen Meetnet habitatkwaliteit 7140 +HQ9120 nl Meetnet habitatkwaliteit: beuken-eikenbossen op zure bodem Meetnet habitatkwaliteit 9120 +HQ9130 nl Meetnet habitatkwaliteit: eiken-beukenbossen met wilde hyacint en parelgras-beukenbossen Meetnet habitatkwaliteit 9130 +HQ9160 nl Meetnet habitatkwaliteit: eiken-haagbeukenbossen Meetnet habitatkwaliteit 9160 +HQ9190 nl Meetnet habitatkwaliteit: oude eiken-berkenbossen Meetnet habitatkwaliteit 9190 +HQ91E0 nl Meetnet habitatkwaliteit: vochtige alluviale bossen Meetnet habitatkwaliteit 91E0 HS nl Heiden NA ID nl Binnenlandse duinen NA INUN nl Inundatiemeetnet NA @@ -609,4 +611,3 @@ rbbzil nl zilverschoongrasland zilverschoongrasland rbbzil+ nl soortenrijk zilverschoongrasland soortenrijk zilverschoongrasland secondary nl Secundair meetnet NA terr nl terrestrisch NA -HQ2190_terr NA NA NA NA 2190_terr diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index ed6cce4b..5fcabdf0 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 58d7ef69f04229b92d03b892ba079f4616e4b4ca + data_hash: 83489b3b819896d9a4c9591b477d7702290cfca5 code: class: character lang: From 5f65d1d3cc4fc20f9e679456c7c4d173859611fe Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 23 Sep 2021 16:18:28 +0200 Subject: [PATCH 13/36] generate_textdata: fix trailing space in MHQ scheme names --- inst/textdata/namelist.tsv | 108 +++++++++--------- inst/textdata/namelist.yml | 2 +- .../30_schemes_and_scheme_types.Rmd | 16 +-- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index 549880ed..40711662 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -147,34 +147,34 @@ HC12 en Dry to moist + Temporarily to permanently wet Dry + Wet HC2 en Temporarily to permanently wet Wet HC23 en Temporarily to permanently wet + Surface water Wet + Surface water HC3 en Surface water Surface water -HQ1330 en Habitat quality scheme: Atlantic salt meadows Habitat quality scheme 1330 -HQ2120 en Habitat quality scheme: White dunes Habitat quality scheme 2120 -HQ2130 en Habitat quality scheme: Grey dunes Habitat quality scheme 2130 -HQ2160 en Habitat quality scheme: Hippophae rhamnoides dunes Habitat quality scheme 2160 -HQ2170 en Habitat quality scheme: Salix repens dunes Habitat quality scheme 2170 -HQ2180 en Habitat quality scheme: Wooded dunes Habitat quality scheme 2180 -HQ2190_aq en Habitat quality scheme: Dune slack ponds Habitat quality scheme 2190_a +HQ1330 en Habitat quality scheme: Atlantic salt meadows Habitat quality scheme 1330 +HQ2120 en Habitat quality scheme: White dunes Habitat quality scheme 2120 +HQ2130 en Habitat quality scheme: Grey dunes Habitat quality scheme 2130 +HQ2160 en Habitat quality scheme: Hippophae rhamnoides dunes Habitat quality scheme 2160 +HQ2170 en Habitat quality scheme: Salix repens dunes Habitat quality scheme 2170 +HQ2180 en Habitat quality scheme: Wooded dunes Habitat quality scheme 2180 +HQ2190_aq en Habitat quality scheme: Dune slack ponds Habitat quality scheme 2190_a HQ2190_terr en Habitat quality scheme: Humid dune slacks (terrestrial) Habitat quality scheme 2190 (terr) -HQ2310 en Habitat quality scheme: Psammophylic heath Habitat quality scheme 2310 -HQ2330 en Habitat quality scheme: Inland shifting dunes Habitat quality scheme 2330 -HQ3110 en Habitat quality scheme: Barely buffered standing waters Habitat quality scheme 3110 -HQ3130 en Habitat quality scheme: Poorly buffered standing waters Habitat quality scheme 3130 -HQ3140 en Habitat quality scheme: Standing waters with Chara Habitat quality scheme 3140 -HQ3150 en Habitat quality scheme: Lakes with Stratiotes and Potamogeton Habitat quality scheme 3150 -HQ3160 en Habitat quality scheme: Dystrophic standing waters Habitat quality scheme 3160 -HQ3270 en Habitat quality scheme: Rivers with muddy banks Habitat quality scheme 3270 -HQ4010 en Habitat quality scheme: Wet heaths Habitat quality scheme 4010 -HQ4030 en Habitat quality scheme: Dry heaths Habitat quality scheme 4030 -HQ6120 en Habitat quality scheme: Pioneer calcareous sand swards Habitat quality scheme 6120 -HQ6230 en Habitat quality scheme: Nardus grasslands Habitat quality scheme 6230 -HQ6410 en Habitat quality scheme: Molinion grasslands Habitat quality scheme 6410 -HQ6510 en Habitat quality scheme: Arrhenaterion and Alopecurion grasslands Habitat quality scheme 6510 -HQ7140 en Habitat quality scheme: Transition mires and quaking bogs Habitat quality scheme 7140 -HQ9120 en Habitat quality scheme: Beech-oak forests with Ilex Habitat quality scheme 9120 -HQ9130 en Habitat quality scheme: Neutrophilic beech forest Habitat quality scheme 9130 -HQ9160 en Habitat quality scheme: Oak-hornbeam forests Habitat quality scheme 9160 -HQ9190 en Habitat quality scheme: Old oak forests Habitat quality scheme 9190 -HQ91E0 en Habitat quality scheme: Alluvial forests Habitat quality scheme 91E0 +HQ2310 en Habitat quality scheme: Psammophylic heath Habitat quality scheme 2310 +HQ2330 en Habitat quality scheme: Inland shifting dunes Habitat quality scheme 2330 +HQ3110 en Habitat quality scheme: Barely buffered standing waters Habitat quality scheme 3110 +HQ3130 en Habitat quality scheme: Poorly buffered standing waters Habitat quality scheme 3130 +HQ3140 en Habitat quality scheme: Standing waters with Chara Habitat quality scheme 3140 +HQ3150 en Habitat quality scheme: Lakes with Stratiotes and Potamogeton Habitat quality scheme 3150 +HQ3160 en Habitat quality scheme: Dystrophic standing waters Habitat quality scheme 3160 +HQ3270 en Habitat quality scheme: Rivers with muddy banks Habitat quality scheme 3270 +HQ4010 en Habitat quality scheme: Wet heaths Habitat quality scheme 4010 +HQ4030 en Habitat quality scheme: Dry heaths Habitat quality scheme 4030 +HQ6120 en Habitat quality scheme: Pioneer calcareous sand swards Habitat quality scheme 6120 +HQ6230 en Habitat quality scheme: Nardus grasslands Habitat quality scheme 6230 +HQ6410 en Habitat quality scheme: Molinion grasslands Habitat quality scheme 6410 +HQ6510 en Habitat quality scheme: Arrhenaterion and Alopecurion grasslands Habitat quality scheme 6510 +HQ7140 en Habitat quality scheme: Transition mires and quaking bogs Habitat quality scheme 7140 +HQ9120 en Habitat quality scheme: Beech-oak forests with Ilex Habitat quality scheme 9120 +HQ9130 en Habitat quality scheme: Neutrophilic beech forest Habitat quality scheme 9130 +HQ9160 en Habitat quality scheme: Oak-hornbeam forests Habitat quality scheme 9160 +HQ9190 en Habitat quality scheme: Old oak forests Habitat quality scheme 9190 +HQ91E0 en Habitat quality scheme: Alluvial forests Habitat quality scheme 91E0 HS en Temperate heath and scrub NA ID en Inland dunes NA INUN en Inundationwater monitoring NA @@ -439,34 +439,34 @@ HC12 nl Droog tot vochtig + Tijdelijk tot permanent nat Droog + Nat HC2 nl Tijdelijk tot permanent nat Nat HC23 nl Tijdelijk tot permanent nat + Oppervlaktewater Nat + Oppervlaktewater HC3 nl Oppervlaktewater Oppervlaktewater -HQ1330 nl Meetnet habitatkwaliteit: Atlantische schorren Meetnet habitatkwaliteit 1330 -HQ2120 nl Meetnet habitatkwaliteit: wandelende duinen Meetnet habitatkwaliteit 2120 -HQ2130 nl Meetnet habitatkwaliteit: vastgelegde duinen Meetnet habitatkwaliteit 2130 -HQ2160 nl Meetnet habitatkwaliteit: duindoornstruwelen Meetnet habitatkwaliteit 2160 -HQ2170 nl Meetnet habitatkwaliteit: kruipwilgstruwelen Meetnet habitatkwaliteit 2170 -HQ2180 nl Meetnet habitatkwaliteit: duinbossen Meetnet habitatkwaliteit 2180 -HQ2190_aq nl Meetnet habitatkwaliteit: duinplassen Meetnet habitatkwaliteit 2190_a +HQ1330 nl Meetnet habitatkwaliteit: Atlantische schorren Meetnet habitatkwaliteit 1330 +HQ2120 nl Meetnet habitatkwaliteit: wandelende duinen Meetnet habitatkwaliteit 2120 +HQ2130 nl Meetnet habitatkwaliteit: vastgelegde duinen Meetnet habitatkwaliteit 2130 +HQ2160 nl Meetnet habitatkwaliteit: duindoornstruwelen Meetnet habitatkwaliteit 2160 +HQ2170 nl Meetnet habitatkwaliteit: kruipwilgstruwelen Meetnet habitatkwaliteit 2170 +HQ2180 nl Meetnet habitatkwaliteit: duinbossen Meetnet habitatkwaliteit 2180 +HQ2190_aq nl Meetnet habitatkwaliteit: duinplassen Meetnet habitatkwaliteit 2190_a HQ2190_terr nl Meetnet habitatkwaliteit: vochtige duinvalleien (terrestrisch) Meetnet habitatkwaliteit 2190 (terr) -HQ2310 nl Meetnet habitatkwaliteit: droge heide op landduinen Meetnet habitatkwaliteit 2310 -HQ2330 nl Meetnet habitatkwaliteit: open grasland op landduinen Meetnet habitatkwaliteit 2330 -HQ3110 nl Meetnet habitatkwaliteit: zeer zwakgebufferde vennen Meetnet habitatkwaliteit 3110 -HQ3130 nl Meetnet habitatkwaliteit: zwakgebufferde vennen Meetnet habitatkwaliteit 3130 -HQ3140 nl Meetnet habitatkwaliteit: kranswierwateren Meetnet habitatkwaliteit 3140 -HQ3150 nl Meetnet habitatkwaliteit: van nature eutrofe wateren Meetnet habitatkwaliteit 3150 -HQ3160 nl Meetnet habitatkwaliteit: dystrofe vennen Meetnet habitatkwaliteit 3160 -HQ3270 nl Meetnet habitatkwaliteit: voedselrijke slikoevers met bepaalde eenjarige planten Meetnet habitatkwaliteit 3270 -HQ4010 nl Meetnet habitatkwaliteit: vochtige heide Meetnet habitatkwaliteit 4010 -HQ4030 nl Meetnet habitatkwaliteit: droge heide Meetnet habitatkwaliteit 4030 -HQ6120 nl Meetnet habitatkwaliteit: stroomdalgraslanden Meetnet habitatkwaliteit 6120 -HQ6230 nl Meetnet habitatkwaliteit: heischrale graslanden Meetnet habitatkwaliteit 6230 -HQ6410 nl Meetnet habitatkwaliteit: blauwgraslanden Meetnet habitatkwaliteit 6410 -HQ6510 nl Meetnet habitatkwaliteit: soortenrijke glanshavergraslanden Meetnet habitatkwaliteit 6510 -HQ7140 nl Meetnet habitatkwaliteit: overgangs- en trilveen Meetnet habitatkwaliteit 7140 -HQ9120 nl Meetnet habitatkwaliteit: beuken-eikenbossen op zure bodem Meetnet habitatkwaliteit 9120 -HQ9130 nl Meetnet habitatkwaliteit: eiken-beukenbossen met wilde hyacint en parelgras-beukenbossen Meetnet habitatkwaliteit 9130 -HQ9160 nl Meetnet habitatkwaliteit: eiken-haagbeukenbossen Meetnet habitatkwaliteit 9160 -HQ9190 nl Meetnet habitatkwaliteit: oude eiken-berkenbossen Meetnet habitatkwaliteit 9190 -HQ91E0 nl Meetnet habitatkwaliteit: vochtige alluviale bossen Meetnet habitatkwaliteit 91E0 +HQ2310 nl Meetnet habitatkwaliteit: droge heide op landduinen Meetnet habitatkwaliteit 2310 +HQ2330 nl Meetnet habitatkwaliteit: open grasland op landduinen Meetnet habitatkwaliteit 2330 +HQ3110 nl Meetnet habitatkwaliteit: zeer zwakgebufferde vennen Meetnet habitatkwaliteit 3110 +HQ3130 nl Meetnet habitatkwaliteit: zwakgebufferde vennen Meetnet habitatkwaliteit 3130 +HQ3140 nl Meetnet habitatkwaliteit: kranswierwateren Meetnet habitatkwaliteit 3140 +HQ3150 nl Meetnet habitatkwaliteit: van nature eutrofe wateren Meetnet habitatkwaliteit 3150 +HQ3160 nl Meetnet habitatkwaliteit: dystrofe vennen Meetnet habitatkwaliteit 3160 +HQ3270 nl Meetnet habitatkwaliteit: voedselrijke slikoevers met bepaalde eenjarige planten Meetnet habitatkwaliteit 3270 +HQ4010 nl Meetnet habitatkwaliteit: vochtige heide Meetnet habitatkwaliteit 4010 +HQ4030 nl Meetnet habitatkwaliteit: droge heide Meetnet habitatkwaliteit 4030 +HQ6120 nl Meetnet habitatkwaliteit: stroomdalgraslanden Meetnet habitatkwaliteit 6120 +HQ6230 nl Meetnet habitatkwaliteit: heischrale graslanden Meetnet habitatkwaliteit 6230 +HQ6410 nl Meetnet habitatkwaliteit: blauwgraslanden Meetnet habitatkwaliteit 6410 +HQ6510 nl Meetnet habitatkwaliteit: soortenrijke glanshavergraslanden Meetnet habitatkwaliteit 6510 +HQ7140 nl Meetnet habitatkwaliteit: overgangs- en trilveen Meetnet habitatkwaliteit 7140 +HQ9120 nl Meetnet habitatkwaliteit: beuken-eikenbossen op zure bodem Meetnet habitatkwaliteit 9120 +HQ9130 nl Meetnet habitatkwaliteit: eiken-beukenbossen met wilde hyacint en parelgras-beukenbossen Meetnet habitatkwaliteit 9130 +HQ9160 nl Meetnet habitatkwaliteit: eiken-haagbeukenbossen Meetnet habitatkwaliteit 9160 +HQ9190 nl Meetnet habitatkwaliteit: oude eiken-berkenbossen Meetnet habitatkwaliteit 9190 +HQ91E0 nl Meetnet habitatkwaliteit: vochtige alluviale bossen Meetnet habitatkwaliteit 91E0 HS nl Heiden NA ID nl Binnenlandse duinen NA INUN nl Inundatiemeetnet NA diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index 5fcabdf0..8627637e 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 83489b3b819896d9a4c9591b477d7702290cfca5 + data_hash: 86231058edcd58321f0230b0ab6716affc0d9122 code: class: character lang: diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index 5e7530e2..45dcd804 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -574,21 +574,21 @@ namelist <- read_vc(namelist_path, root) schemes_MHQ_names <- schemes_MHQ %>% left_join(namelist, by = c("attribute_1" = "code")) %>% - mutate(name = paste(ifelse(lang == "en", - "Habitat quality scheme:", - "Meetnet habitatkwaliteit:"), + mutate(name = paste0(ifelse(lang == "en", + "Habitat quality scheme: ", + "Meetnet habitatkwaliteit: "), shortname, ifelse(scheme == "HQ2190_terr", ifelse(lang == "en", - "(terrestrial)", "(terrestrisch)"), + " (terrestrial)", " (terrestrisch)"), "") ), - shortname = paste(ifelse(lang == "en", - "Habitat quality scheme", - "Meetnet habitatkwaliteit"), + shortname = paste0(ifelse(lang == "en", + "Habitat quality scheme ", + "Meetnet habitatkwaliteit "), attribute_1, ifelse(scheme == "HQ2190_terr", - "(terr)", + " (terr)", "")) ) %>% select(code = scheme, lang, name, shortname) From fa60f846cf76171ba44a1f06b9cfb7c53641d926 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 13 Aug 2021 10:37:21 +0200 Subject: [PATCH 14/36] scheme_types: add typegroups for GW_05.1_aq --- inst/textdata/namelist.tsv | 10 +++++++ inst/textdata/namelist.yml | 2 +- inst/textdata/scheme_types.tsv | 20 ++++++------- inst/textdata/scheme_types.yml | 14 +++++++-- .../30_schemes_and_scheme_types.Rmd | 30 +++++++++++++++++++ 5 files changed, 63 insertions(+), 13 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index 40711662..d54e2e2e 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -132,6 +132,11 @@ GW_03.3_group3 en types from weakly eutrophic environments weakly eutrophic GW_03.3_group4 en types from moderately eutrophic to eutrophic environments (moderately) eutrophic GW_04.2 en Groundwater monitoring: environmental pressure 04.2_acidif_gw GW: 04.2_acidif_gw GW_05.1_aq en Groundwater monitoring: environmental pressure 05.1_des_gw: partim aquatic GW: 05.1_des_gw: aq +GW_05.1_aq_group1 en types from springbrooks springbrooks +GW_05.1_aq_group2 en lentic types with stable groundwater table lentic with stable groundwater +GW_05.1_aq_group3 en types from lowland rivers lowland rivers +GW_05.1_aq_group4 en types from dune lakes (moderate groundwater dynamics) dune lakes +GW_05.1_aq_group5 en types from softwater lakes with dynamic groundwater table dynamic softwater lakes GW_05.1_quarries en Groundwater monitoring: environmental pressure 05.1_des_gw: partim marl quarries GW: 05.1_des_gw: quarries GW_05.1_terr en Groundwater monitoring: environmental pressure 05.1_des_gw: partim terrestrial GW: 05.1_des_gw: terr GW_05.1_terr_group1 en types from very wet environments very wet @@ -424,6 +429,11 @@ GW_03.3_group3 nl types van zwak eutroof milieu zwak eutroof GW_03.3_group4 nl types van matig eutroof tot eutroof milieu (matig) eutroof GW_04.2 nl Grondwatermeetnet: milieudruk 04.2_verzu_gw GW: 04.2_verzu_gw GW_05.1_aq nl Grondwatermeetnet: milieudruk 05.1_verdro_gw: partim aquatisch GW: 05.1_verdro_gw: aq +GW_05.1_aq_group1 nl types van bronbeken bronbeken +GW_05.1_aq_group2 nl types van stilstaand water met stabiel grondwaterregime plassen stabiel grondwater +GW_05.1_aq_group3 nl types van laaglandrivieren laaglandrivieren +GW_05.1_aq_group4 nl types van duinplassen (middelmatig grondwaterregime) duinplassen +GW_05.1_aq_group5 nl types van vennen met dynamisch grondwaterregime dynamische vennen GW_05.1_quarries nl Grondwatermeetnet: milieudruk 05.1_verdro_gw: partim mergelgroeven GW: 05.1_verdro_gw: quarries GW_05.1_terr nl Grondwatermeetnet: milieudruk 05.1_verdro_gw: partim terrestrisch GW: 05.1_verdro_gw: terr GW_05.1_terr_group1 nl types van zeer nat milieu zeer nat diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index 8627637e..b91d8ced 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 86231058edcd58321f0230b0ab6716affc0d9122 + data_hash: 4052b0860e943a46132f1aea2f70076d0b3e58cd code: class: character lang: diff --git a/inst/textdata/scheme_types.tsv b/inst/textdata/scheme_types.tsv index e9534ca6..1a537adb 100644 --- a/inst/textdata/scheme_types.tsv +++ b/inst/textdata/scheme_types.tsv @@ -272,16 +272,16 @@ scheme type typegroup 7 43 NA 7 44 NA 7 54 NA -8 16 NA -8 22 NA -8 23 NA -8 24 NA -8 25 NA -8 26 NA -8 27 NA -8 28 NA -8 30 NA -8 66 NA +8 16 28 +8 22 29 +8 23 29 +8 24 29 +8 25 26 +8 26 26 +8 27 26 +8 28 27 +8 30 26 +8 66 25 64 71 NA 9 2 18 9 3 16 diff --git a/inst/textdata/scheme_types.yml b/inst/textdata/scheme_types.yml index cd1d540b..cfa3bb16 100644 --- a/inst/textdata/scheme_types.yml +++ b/inst/textdata/scheme_types.yml @@ -5,8 +5,8 @@ sorting: - scheme - type - hash: 996b90ba309ada058fd4c3cf59ef4521bfd9c4be - data_hash: 254b130bf1724301703284797b3adb326c1db1e0 + hash: 1d16af60f0fb182574a03255abb68d40909e1c07 + data_hash: f407d7564b783d0704a3ddb2757cbffb2ea16c0c scheme: class: factor labels: @@ -385,6 +385,11 @@ typegroup: - GW_03.3_group2 - GW_03.3_group3 - GW_03.3_group4 + - GW_05.1_aq_group1 + - GW_05.1_aq_group2 + - GW_05.1_aq_group3 + - GW_05.1_aq_group4 + - GW_05.1_aq_group5 - GW_05.1_terr_group1 - GW_05.1_terr_group2 - GW_05.1_terr_group3 @@ -410,6 +415,11 @@ typegroup: - 13 - 14 - 15 + - 25 + - 26 + - 27 + - 28 + - 29 - 16 - 17 - 18 diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index 45dcd804..9b8bf657 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -278,6 +278,21 @@ typegroups <- typegroup = Typegroep) ) %>% + bind_rows( + tg_gs_id %>% + read_sheet(sheet = "GW_05.1_aq (XG3)", + .name_repair = make.names) %>% + filter(Type %in% + (schemes_schemetypes %>% + filter(scheme == "GW_05.1_aq") %>% + .$type) + ) %>% + mutate(scheme = "GW_05.1_aq") %>% + select(scheme, + type = Type, + typegroup = Typegroep) + ) %>% + bind_rows( tg_gs_id %>% read_sheet(sheet = ws_list[str_detect(ws_list, "ATM_03\\.1")], @@ -476,6 +491,21 @@ tribble(~nr, ~lang, ~name, ~shortname, ) %>% mutate(code = str_c("GW_05.1_terr_group", code)) ) %>% + bind_rows( + tribble(~code, ~lang, ~name, ~shortname, + 1, "en", "types from springbrooks", "springbrooks", + 1, "nl", "types van bronbeken", "bronbeken", + 2, "en", "lentic types with stable groundwater table", "lentic with stable groundwater", + 2, "nl", "types van stilstaand water met stabiel grondwaterregime", "plassen stabiel grondwater", + 3, "en", "types from lowland rivers", "lowland rivers", + 3, "nl", "types van laaglandrivieren", "laaglandrivieren", + 4, "en", "types from dune lakes (moderate groundwater dynamics)", "dune lakes", + 4, "nl", "types van duinplassen (middelmatig grondwaterregime)", "duinplassen", + 5, "en", "types from softwater lakes with dynamic groundwater table", "dynamic softwater lakes", + 5, "nl", "types van vennen met dynamisch grondwaterregime", "dynamische vennen" + ) %>% + mutate(code = str_c("GW_05.1_aq_group", code)) + ) %>% bind_rows(read_vc(namelist_path, root), .) %>% write_vc(namelist_path, root) From ec732610ffae0ac41888b4da0deedd0d047488b9 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 23 Sep 2021 16:51:11 +0200 Subject: [PATCH 15/36] scheme_types: update typegroup names for GW_05.1_aq * Following comments from @anleyssen and L. Denys. --- inst/textdata/namelist.tsv | 8 ++++---- inst/textdata/namelist.yml | 2 +- misc/generate_textdata/30_schemes_and_scheme_types.Rmd | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index d54e2e2e..58c00be0 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -132,8 +132,8 @@ GW_03.3_group3 en types from weakly eutrophic environments weakly eutrophic GW_03.3_group4 en types from moderately eutrophic to eutrophic environments (moderately) eutrophic GW_04.2 en Groundwater monitoring: environmental pressure 04.2_acidif_gw GW: 04.2_acidif_gw GW_05.1_aq en Groundwater monitoring: environmental pressure 05.1_des_gw: partim aquatic GW: 05.1_des_gw: aq -GW_05.1_aq_group1 en types from springbrooks springbrooks -GW_05.1_aq_group2 en lentic types with stable groundwater table lentic with stable groundwater +GW_05.1_aq_group1 en types from spring-fed brooks spring-fed brooks +GW_05.1_aq_group2 en types from lakes with stable groundwater table stable lakes GW_05.1_aq_group3 en types from lowland rivers lowland rivers GW_05.1_aq_group4 en types from dune lakes (moderate groundwater dynamics) dune lakes GW_05.1_aq_group5 en types from softwater lakes with dynamic groundwater table dynamic softwater lakes @@ -430,8 +430,8 @@ GW_03.3_group4 nl types van matig eutroof tot eutroof milieu (matig) eutroof GW_04.2 nl Grondwatermeetnet: milieudruk 04.2_verzu_gw GW: 04.2_verzu_gw GW_05.1_aq nl Grondwatermeetnet: milieudruk 05.1_verdro_gw: partim aquatisch GW: 05.1_verdro_gw: aq GW_05.1_aq_group1 nl types van bronbeken bronbeken -GW_05.1_aq_group2 nl types van stilstaand water met stabiel grondwaterregime plassen stabiel grondwater -GW_05.1_aq_group3 nl types van laaglandrivieren laaglandrivieren +GW_05.1_aq_group2 nl types van stilstaand water met stabiel grondwaterregime stabiele plassen +GW_05.1_aq_group3 nl types van laaglandbeken laaglandbeken GW_05.1_aq_group4 nl types van duinplassen (middelmatig grondwaterregime) duinplassen GW_05.1_aq_group5 nl types van vennen met dynamisch grondwaterregime dynamische vennen GW_05.1_quarries nl Grondwatermeetnet: milieudruk 05.1_verdro_gw: partim mergelgroeven GW: 05.1_verdro_gw: quarries diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index b91d8ced..57be3724 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 4052b0860e943a46132f1aea2f70076d0b3e58cd + data_hash: 42e1bbb3da062bfbe96c9e9a93df0d58fd6318e9 code: class: character lang: diff --git a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd index 9b8bf657..75d56516 100644 --- a/misc/generate_textdata/30_schemes_and_scheme_types.Rmd +++ b/misc/generate_textdata/30_schemes_and_scheme_types.Rmd @@ -493,12 +493,12 @@ tribble(~nr, ~lang, ~name, ~shortname, ) %>% bind_rows( tribble(~code, ~lang, ~name, ~shortname, - 1, "en", "types from springbrooks", "springbrooks", + 1, "en", "types from spring-fed brooks", "spring-fed brooks", 1, "nl", "types van bronbeken", "bronbeken", - 2, "en", "lentic types with stable groundwater table", "lentic with stable groundwater", - 2, "nl", "types van stilstaand water met stabiel grondwaterregime", "plassen stabiel grondwater", + 2, "en", "types from lakes with stable groundwater table", "stable lakes", + 2, "nl", "types van stilstaand water met stabiel grondwaterregime", "stabiele plassen", 3, "en", "types from lowland rivers", "lowland rivers", - 3, "nl", "types van laaglandrivieren", "laaglandrivieren", + 3, "nl", "types van laaglandbeken", "laaglandbeken", 4, "en", "types from dune lakes (moderate groundwater dynamics)", "dune lakes", 4, "nl", "types van duinplassen (middelmatig grondwaterregime)", "duinplassen", 5, "en", "types from softwater lakes with dynamic groundwater table", "dynamic softwater lakes", From b3eb3351311c68d07fcad84998fda2a9e8c9a505 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 15 Oct 2021 16:18:05 +0200 Subject: [PATCH 16/36] Readme: recommend installation from r-universe --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80508098..80c9218c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,16 @@ The standard reference data include: checklists, spatial habitat distribution, a ## Installing and using the _n2khab_ package -To install, run: +To install the current package version from the `master` branch (latest stable release), run: + +```r +install.packages("n2khab", repos = "https://inbo.r-universe.dev") +``` + +The above provides a pre-compiled package for Windows and Mac, which should be faster than below approach. +INBO staff should have the INBO repository enabled already (check with `getOption("repos")`), in which case **`install.packages("n2khab")`** is all you need! + +If you want to install from the source repository, run: ```r Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = "true") # as a precaution From b5e58cd7eb0346d5c3927ae1f394463fd18866c1 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 15 Oct 2021 16:18:20 +0200 Subject: [PATCH 17/36] Readme: add badges for r-universe --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 80c9218c..5a1087e7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3631579.svg)](https://doi.org/10.5281/zenodo.3631579) [![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![R-CMD-check](https://github.com/inbo/n2khab/workflows/R-CMD-check/badge.svg)](https://github.com/inbo/n2khab/actions?query=workflow%3AR-CMD-check) +[![inbo r-universe-name](https://inbo.r-universe.dev/badges/:name?color=pink)](https://inbo.r-universe.dev) +[![inbo r-universe n2khab status](https://inbo.r-universe.dev/badges/n2khab)](https://inbo.r-universe.dev) ## Welcome From f65f7dd9a00e1c15a0c00bda409286bf7d07e784 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 18 Oct 2021 09:15:37 +0200 Subject: [PATCH 18/36] Readme: minor badge updates --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a1087e7..d5bb5832 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3631579.svg)](https://doi.org/10.5281/zenodo.3631579) [![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![R-CMD-check](https://github.com/inbo/n2khab/workflows/R-CMD-check/badge.svg)](https://github.com/inbo/n2khab/actions?query=workflow%3AR-CMD-check) -[![inbo r-universe-name](https://inbo.r-universe.dev/badges/:name?color=pink)](https://inbo.r-universe.dev) -[![inbo r-universe n2khab status](https://inbo.r-universe.dev/badges/n2khab)](https://inbo.r-universe.dev) +[![inbo r-universe-name](https://inbo.r-universe.dev/badges/:name?color=c04384)](https://inbo.r-universe.dev) +[![inbo r-universe package status](https://inbo.r-universe.dev/badges/n2khab)](https://inbo.r-universe.dev) ## Welcome From fb4ebda43daf5cd3b87a698c8ec49f6871a67a6c Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 18 Oct 2021 09:15:55 +0200 Subject: [PATCH 19/36] Readme: minor update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5bb5832..2a385213 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ To install the current package version from the `master` branch (latest stable r install.packages("n2khab", repos = "https://inbo.r-universe.dev") ``` -The above provides a pre-compiled package for Windows and Mac, which should be faster than below approach. +The above provides a pre-compiled package for Windows and macOS, which should be faster than below approach. INBO staff should have the INBO repository enabled already (check with `getOption("repos")`), in which case **`install.packages("n2khab")`** is all you need! If you want to install from the source repository, run: From 6ca7a17f06d452324c85cdca1f01635c7f1934c1 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 8 Nov 2021 14:00:10 +0100 Subject: [PATCH 20/36] namelist: updated explanation of env pressure 7.{2,4} --- inst/textdata/namelist.tsv | 4 ++-- inst/textdata/namelist.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/textdata/namelist.tsv b/inst/textdata/namelist.tsv index 58c00be0..2d6c1152 100644 --- a/inst/textdata/namelist.tsv +++ b/inst/textdata/namelist.tsv @@ -559,11 +559,11 @@ ep_066_explan nl Een afname van de golfslagwerking ter hoogte van de beschouwde ep_07.1 nl 7.1 Verzoeting via het grondwater 07.1_verzoet_gw ep_07.1_explan nl Afname van het chloridegehalte van de standplaats, door regime- of kwaliteitswijzigingen van het betrokken grondwaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. NA ep_07.2 nl 7.2 Verzoeting via het oppervlaktewater (incl. overstromingswater) 07.2_verzoet_ow -ep_07.2_explan nl Afname van het chloridegehalte van de standplaats, door regime- of kwaliteitswijzigingen van het betrokken oppervlaktewaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. NA +ep_07.2_explan nl Afname van het chloridegehalte van de standplaats, door hydromorfologische, regime- of kwaliteitswijzigingen van het betrokken oppervlaktewaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. NA ep_07.3 nl 7.3 Verzilting via het grondwater 07.3_verzilt_gw ep_07.3_explan nl Toename van het chloridegehalte van de standplaats, door regime- of kwaliteitswijzigingen van het betrokken grondwaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. Het chloride is daarbij afkomstig uit het natuurlijk milieu (toevoeging van zouten valt onder milieudrukklasse 8). NA ep_07.4 nl 7.4 Verzilting via het oppervlaktewater (incl. overstromingswater) 07.4_verzilt_ow -ep_07.4_explan nl Toename van het chloridegehalte van de standplaats, door regime- of kwaliteitswijzigingen van het betrokken oppervlaktewaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. Het chloride is daarbij afkomstig uit het natuurlijk milieu (toevoeging van zouten valt onder milieudrukklasse 8). NA +ep_07.4_explan nl Toename van het chloridegehalte van de standplaats, door hydromorfologische, regime- of kwaliteitswijzigingen van het betrokken oppervlaktewaterlichaam, in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. Het chloride is daarbij afkomstig uit het natuurlijk milieu (toevoeging van zouten valt onder milieudrukklasse 8). NA ep_08.1 nl 8.1 Verontreiniging via de lucht 08.1_verontr_atm ep_08.1_explan nl Toename van stoffen (excl. eutrofiërende of verzurende stoffen), in zodanige mate dat dit leidt tot een achteruitgang van de levensgemeenschap. De stoffen komen de standplaats binnen via de lucht (depositie). NA ep_08.2 nl 8.2 Verontreiniging via de bodem 08.2_verontr_bod diff --git a/inst/textdata/namelist.yml b/inst/textdata/namelist.yml index 57be3724..420410a8 100644 --- a/inst/textdata/namelist.yml +++ b/inst/textdata/namelist.yml @@ -6,7 +6,7 @@ - lang - code hash: 3345146f5a5902a684bc1b965f00486c82952d94 - data_hash: 42e1bbb3da062bfbe96c9e9a93df0d58fd6318e9 + data_hash: 9ec8ec863c772c23634368d79ab612fb54d19cb3 code: class: character lang: From 51ea647e3108e05363a7a84d42cd33f81441ed95 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 15 Dec 2021 15:13:33 +0100 Subject: [PATCH 21/36] Documentation update: due to roxygen2 update --- DESCRIPTION | 2 +- man/n2khab-package.Rd | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8f244bd9..cd3d5468 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -45,7 +45,7 @@ Imports: withr Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Suggests: bib2df, curl, diff --git a/man/n2khab-package.Rd b/man/n2khab-package.Rd index dede0180..a152e7de 100644 --- a/man/n2khab-package.Rd +++ b/man/n2khab-package.Rd @@ -6,10 +6,7 @@ \alias{n2khab-package} \title{n2khab: Providing Preprocessed Reference Data for Flemish Natura 2000 Habitat Analyses} \description{ -The n2khab package is an R package with - preprocessing functions and standard reference data, useful for - analyses regarding Flemish Natura 2000 habitats and regionally - important biotopes (RIBs). +The n2khab package is an R package with preprocessing functions and standard reference data, useful for analyses regarding Flemish Natura 2000 habitats and regionally important biotopes (RIBs). } \details{ See the \href{00Index.html}{Index} for vignettes and From 29d98ad009f4a779ec106bdb99389d995b92a88b Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 15 Dec 2021 15:35:15 +0100 Subject: [PATCH 22/36] Apply family for environmental datasets to 3 functions --- R/read_habitatdata.R | 2 +- R/read_soilmap.R | 2 ++ R/read_watercourses.R | 1 + man/read_soilmap.Rd | 6 ++++++ man/read_watercourse_100mseg.Rd | 6 ++++++ man/read_watersurfaces.Rd | 6 +++++- 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/R/read_habitatdata.R b/R/read_habitatdata.R index 56c70c05..18da5c89 100644 --- a/R/read_habitatdata.R +++ b/R/read_habitatdata.R @@ -471,7 +471,7 @@ read_watersurfaces_hab <- #' } #' #' @family functions involved in processing the 'watersurfaces' data source -#' @family functions returning important environmental data sets +#' @family functions returning environmental data sets #' #' @references #' diff --git a/R/read_soilmap.R b/R/read_soilmap.R index 65097d05..34882647 100644 --- a/R/read_soilmap.R +++ b/R/read_soilmap.R @@ -204,6 +204,8 @@ #' #' (*) Included in the `soilmap_simple` data source. #' +#' @family functions returning environmental data sets +#' #' @references #' - Ampe C. (2013). Databank aardewerk Vlaanderen 2010. #' Omzetten (zeer) oude legende bodemkartering naar legende bodemkaart diff --git a/R/read_watercourses.R b/R/read_watercourses.R index ebee5aae..f971bf1e 100644 --- a/R/read_watercourses.R +++ b/R/read_watercourses.R @@ -78,6 +78,7 @@ #' Optionally, only one of these \code{sf} objects is returned. #' #' @family functions involved in processing the 'watercourses' data source +#' @family functions returning environmental data sets #' #' @examples #' \dontrun{ diff --git a/man/read_soilmap.Rd b/man/read_soilmap.Rd index a3b8e687..ea334019 100644 --- a/man/read_soilmap.Rd +++ b/man/read_soilmap.Rd @@ -278,3 +278,9 @@ bodemkaart van Vlaanderen (schaal 1: 20000). Universiteit Gent, Laboratorium voor Bodemkunde, Ghent, 361 p. URL: \url{http://hdl.handle.net/1854/LU-125899}. } } +\seealso{ +Other functions returning environmental data sets: +\code{\link{read_watercourse_100mseg}()}, +\code{\link{read_watersurfaces}()} +} +\concept{functions returning environmental data sets} diff --git a/man/read_watercourse_100mseg.Rd b/man/read_watercourse_100mseg.Rd index 96e6c0e5..fe288def 100644 --- a/man/read_watercourse_100mseg.Rd +++ b/man/read_watercourse_100mseg.Rd @@ -113,5 +113,11 @@ repository. str(read_watercourse_100mseg(), give.attr = FALSE) } +} +\seealso{ +Other functions returning environmental data sets: +\code{\link{read_soilmap}()}, +\code{\link{read_watersurfaces}()} } \concept{functions involved in processing the 'watercourses' data source} +\concept{functions returning environmental data sets} diff --git a/man/read_watersurfaces.Rd b/man/read_watersurfaces.Rd index d2cfc574..ed7fca2b 100644 --- a/man/read_watersurfaces.Rd +++ b/man/read_watersurfaces.Rd @@ -105,6 +105,10 @@ Uitgave 2020. Rapporten van het Instituut voor Natuur- en Bosonderzoek 2020 \seealso{ Other functions involved in processing the 'watersurfaces' data source: \code{\link{read_watersurfaces_hab}()} + +Other functions returning environmental data sets: +\code{\link{read_soilmap}()}, +\code{\link{read_watercourse_100mseg}()} } \concept{functions involved in processing the 'watersurfaces' data source} -\concept{functions returning important environmental data sets} +\concept{functions returning environmental data sets} From c490a0861e2fee9f03c5b3ecce9b076ae78b245d Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 15 Dec 2021 15:23:11 +0100 Subject: [PATCH 23/36] Add new function: read_shallowgroundwater --- NAMESPACE | 1 + R/read_shallowgroundwater.R | 45 ++++++++++++++++++++++++++++++++++ man/read_shallowgroundwater.Rd | 43 ++++++++++++++++++++++++++++++++ pkgdown/_pkgdown.yml | 1 + 4 files changed, 90 insertions(+) create mode 100644 R/read_shallowgroundwater.R create mode 100644 man/read_shallowgroundwater.Rd diff --git a/NAMESPACE b/NAMESPACE index bb6a63c6..69470902 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -24,6 +24,7 @@ export(read_namelist) export(read_raster_runif) export(read_scheme_types) export(read_schemes) +export(read_shallowgroundwater) export(read_soilmap) export(read_types) export(read_watercourse_100mseg) diff --git a/R/read_shallowgroundwater.R b/R/read_shallowgroundwater.R new file mode 100644 index 00000000..f42941f3 --- /dev/null +++ b/R/read_shallowgroundwater.R @@ -0,0 +1,45 @@ +#' Return the data source \code{shallowgroundwater} as an \code{sf} +#' multipolygon layer +#' +#' Returns the raw data source \code{shallowgroundwater} +#' as an \code{sf} multipolygon +#' layer. +#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' (EPSG-code \href{https://epsg.io/31370}{31370}). +#' +#' The R code for creating the \code{shallowgroundwater} data source, +#' starting from a manually composed layer, can be found in the +#' \href{https://github.com/inbo/n2khab-preprocessing}{n2khab-preprocessing} +#' repository. +#' +#' @inheritParams read_habitatmap_stdized +#' +#' @return +#' A Simple feature collection of geometry type \code{MULTIPOLYGON}. +#' +#' @examples +#' \dontrun{ +#' shallowgroundwater <- read_shallowgroundwater() +#' shallowgroundwater +#' } +#' +#' @importFrom assertthat +#' assert_that +#' @importFrom sf +#' read_sf +#' @export +read_shallowgroundwater <- + function(file = file.path(fileman_up("n2khab_data"), + "10_raw/shallowgroundwater/shallowgroundwater.gpkg")){ + + assert_that(file.exists(file)) + + shallowgroundwater <- + suppressWarnings( + read_sf(file, + crs = 31370) + ) + + return(shallowgroundwater) + + } diff --git a/man/read_shallowgroundwater.Rd b/man/read_shallowgroundwater.Rd new file mode 100644 index 00000000..15098893 --- /dev/null +++ b/man/read_shallowgroundwater.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/read_shallowgroundwater.R +\name{read_shallowgroundwater} +\alias{read_shallowgroundwater} +\title{Return the data source \code{shallowgroundwater} as an \code{sf} +multipolygon layer} +\usage{ +read_shallowgroundwater( + file = file.path(fileman_up("n2khab_data"), + "10_raw/shallowgroundwater/shallowgroundwater.gpkg") +) +} +\arguments{ +\item{file}{The absolute or relative file path of the data source. +The default follows the data management advice in the +vignette on data storage (run \code{vignette("v020_datastorage")}). +It uses the first \code{n2khab_data} folder that is found when +sequentially climbing up 0 to 10 levels in the file system hierarchy, +starting from the working directory.} +} +\value{ +A Simple feature collection of geometry type \code{MULTIPOLYGON}. +} +\description{ +Returns the raw data source \code{shallowgroundwater} +as an \code{sf} multipolygon +layer. +The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +(EPSG-code \href{https://epsg.io/31370}{31370}). +} +\details{ +The R code for creating the \code{shallowgroundwater} data source, +starting from a manually composed layer, can be found in the +\href{https://github.com/inbo/n2khab-preprocessing}{n2khab-preprocessing} +repository. +} +\examples{ +\dontrun{ +shallowgroundwater <- read_shallowgroundwater() +shallowgroundwater +} + +} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 6f27fda2..d28c54ef 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -37,6 +37,7 @@ reference: contents: - read_admin_areas - read_ecoregions + - read_shallowgroundwater - read_soilmap - read_watersurfaces - read_watercourse_100mseg From a902c67d722635cedde1139b26f04aa294918b29 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 15 Dec 2021 15:56:20 +0100 Subject: [PATCH 24/36] read_shallowgroundwater(): add to family environmental --- R/read_shallowgroundwater.R | 2 ++ man/read_shallowgroundwater.Rd | 7 +++++++ man/read_soilmap.Rd | 1 + man/read_watercourse_100mseg.Rd | 1 + man/read_watersurfaces.Rd | 1 + 5 files changed, 12 insertions(+) diff --git a/R/read_shallowgroundwater.R b/R/read_shallowgroundwater.R index f42941f3..83c30b19 100644 --- a/R/read_shallowgroundwater.R +++ b/R/read_shallowgroundwater.R @@ -17,6 +17,8 @@ #' @return #' A Simple feature collection of geometry type \code{MULTIPOLYGON}. #' +#' @family functions returning environmental data sets +#' #' @examples #' \dontrun{ #' shallowgroundwater <- read_shallowgroundwater() diff --git a/man/read_shallowgroundwater.Rd b/man/read_shallowgroundwater.Rd index 15098893..8335e289 100644 --- a/man/read_shallowgroundwater.Rd +++ b/man/read_shallowgroundwater.Rd @@ -41,3 +41,10 @@ shallowgroundwater } } +\seealso{ +Other functions returning environmental data sets: +\code{\link{read_soilmap}()}, +\code{\link{read_watercourse_100mseg}()}, +\code{\link{read_watersurfaces}()} +} +\concept{functions returning environmental data sets} diff --git a/man/read_soilmap.Rd b/man/read_soilmap.Rd index ea334019..bdfb2060 100644 --- a/man/read_soilmap.Rd +++ b/man/read_soilmap.Rd @@ -280,6 +280,7 @@ voor Bodemkunde, Ghent, 361 p. URL: \url{http://hdl.handle.net/1854/LU-125899}. } \seealso{ Other functions returning environmental data sets: +\code{\link{read_shallowgroundwater}()}, \code{\link{read_watercourse_100mseg}()}, \code{\link{read_watersurfaces}()} } diff --git a/man/read_watercourse_100mseg.Rd b/man/read_watercourse_100mseg.Rd index fe288def..e0ebfdf5 100644 --- a/man/read_watercourse_100mseg.Rd +++ b/man/read_watercourse_100mseg.Rd @@ -116,6 +116,7 @@ str(read_watercourse_100mseg(), give.attr = FALSE) } \seealso{ Other functions returning environmental data sets: +\code{\link{read_shallowgroundwater}()}, \code{\link{read_soilmap}()}, \code{\link{read_watersurfaces}()} } diff --git a/man/read_watersurfaces.Rd b/man/read_watersurfaces.Rd index ed7fca2b..93e7359d 100644 --- a/man/read_watersurfaces.Rd +++ b/man/read_watersurfaces.Rd @@ -107,6 +107,7 @@ Other functions involved in processing the 'watersurfaces' data source: \code{\link{read_watersurfaces_hab}()} Other functions returning environmental data sets: +\code{\link{read_shallowgroundwater}()}, \code{\link{read_soilmap}()}, \code{\link{read_watercourse_100mseg}()} } From 08b1ec7938228eb97be58a4410bddd39d0db956d Mon Sep 17 00:00:00 2001 From: florisvdh Date: Mon, 20 Dec 2021 18:39:19 +0100 Subject: [PATCH 25/36] NEWS.md: meet style requirements of pkgdown >= 2.0.0 --- NEWS.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/NEWS.md b/NEWS.md index c6aa9976..c55d560a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ -## n2khab 0.5.0 (2021-05-12) +# n2khab 0.5.0 (2021-05-12) -#### Support for new data source versions +## Support for new data source versions The following new data source versions are now supported by their associated reading functions: @@ -13,7 +13,7 @@ The following new data source versions are now supported by their associated rea Function documentation was updated accordingly and refined. -#### New functions +## New functions - Function `read_raster_runif()` to return the `raster_runif` data source (#136, #138) - The raw data source `raster_runif` is a raster with cells matching those of `GRTSmaster_habitats`. @@ -21,7 +21,7 @@ Function documentation was updated accordingly and refined. ([inbo/n2khab-preprocessing/pull/55](https://github.com/inbo/n2khab-preprocessing/pull/55) and following pull requests; ). - Function `checksum()` and associated shortcut functions to calculate file checksums (#122) -#### Other updates & internal changes +## Other updates & internal changes Including: @@ -29,14 +29,14 @@ Including: - `expand_types()` now also supports expanding `5130_hei` to `5130` (#143) -## n2khab 0.4.0 (2021-02-10) +# n2khab 0.4.0 (2021-02-10) -#### New feature +## New feature - Function `read_watercourse_100mseg()` (#105) to return the `watercourse_100mseg` data source or one of its elements. `watercourse_100mseg` is a new processed data source ([inbo/n2khab-preprocessing/pull/44](https://github.com/inbo/n2khab-preprocessing/pull/44); ). -#### Updates & internal changes +## Updates & internal changes Including: @@ -44,7 +44,7 @@ Including: - Drop dependency on `sp`, which was used for CRS handling in a few functions (#103). - Minor updates in documentation and vignettes to solve newly encountered errors and notes in `R CMD check` (#107). -#### Repo and website maintenance +## Repo and website maintenance - Update and extend Readme (homepage) and Contributing Guide (#97, #110), including: - instruction for upgrading the package; @@ -53,37 +53,37 @@ Including: - Continuous integration: leave Travis CI; add new GitHub Actions workflows (#108). - Website: larger fontsize; Ubuntu Mono font for code; consistent colouring of hyperlinks (#110). -## n2khab 0.3.1 (2020-10-26) +# n2khab 0.3.1 (2020-10-26) -#### Minor patch +## Minor patch - `read_watersurfaces()` has been limited explicitly to using data source version 'watersurfaces_v1.0'. Accommodation of the newer 'watersurfaces_v1.1' is planned for later. -## n2khab 0.3.0 (2020-10-16) +# n2khab 0.3.0 (2020-10-16) -#### Breaking change +## Breaking change - Functions that preprocess (non-included) N2KHAB data sources have been simplified by dropping their `path` argument (#92). Existing R code will continue to run normally if you complied with the recommended file organization (see `vignette("v020_datastorage")` and `vignette("v022_example")`) and did not set the `path` and `file` arguments. -#### New features +## New features - New function `read_habitatquarries()` for reading the `habitatquarries` data source (#83, #94, [inbo/n2khab-preprocessing/pull/41](https://github.com/inbo/n2khab-preprocessing/pull/41)). - Updates in reference lists (#88, #93, [7ce3b32](https://github.com/inbo/n2khab/commit/7ce3b32)): - `schemes` & `scheme_types`: updates of spatial restrictions, names and typegroup names of MNE schemes (for defining the schemes' target populations); - `types`: update groundwater dependency of type `2170`. -#### Internal changes +## Internal changes - Harden CRS representations (#84) - Re-integrate `download_zenodo()` (from `inborutils`) (#89) - Drop some package dependencies to speed up package loading (#89, #90) -## n2khab 0.2.0 (2020-05-08) +# n2khab 0.2.0 (2020-05-08) -#### New features +## New features - Updates in reference lists (#64, #65, #69, [e69cd52](https://github.com/inbo/n2khab/pull/73/commits/e69cd52)): - `types`: updates of flood dependency scores and hydrological class of several types, following several expert discussions and checks @@ -101,21 +101,21 @@ Existing R code will continue to run normally if you complied with the recommend Further, a number of smaller fixes and enhancements were made. -## n2khab 0.1.2 (2020-03-04) +# n2khab 0.1.2 (2020-03-04) -#### Hotfix +## Hotfix - `read_GRTSmh()`, `read_GRTSmh_base4frac()`, `read_GRTSmh_diffres()`: avoided CRS error with more recent GDAL/PROJ.4 installations (#61) -## n2khab 0.1.1 (2020-02-26) +# n2khab 0.1.1 (2020-02-26) -#### Hotfix +## Hotfix - `read_habitatmap_terr()`: fixed non-functioning argument `keep_aq_types=FALSE` (#60) -## n2khab 0.1.0 (2020-01-30) +# n2khab 0.1.0 (2020-01-30) -#### Features of the first stable release +## Features of the first stable release - Core reading and preprocessing functions - Several built-in checklists (among which: `types` and `env_pressures`) @@ -124,7 +124,7 @@ Further, a number of smaller fixes and enhancements were made. - A reexport of `download_zenodo()` from `inborutils` - Website built with `pkgdown` -#### Historical note +## Historical note This package is the successor of the 'n2khabutils' package. Previous to commit `c8608d9`, the code was part of the [n2khab-monitoring](https://github.com/inbo/n2khab-monitoring) repo (formerly 'n2khab-inputs'), where the original version history remains stored. From 94b9c53cb6d987b01e17c66d6f93225ec69de53f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 22 Dec 2021 15:08:11 +0100 Subject: [PATCH 26/36] NEWS.md: enlist new features (WIP) --- NEWS.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NEWS.md b/NEWS.md index c55d560a..257a27a0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,17 @@ +# n2khab (development version) + +## New features + +- Function `read_shallowgroundwater()` to return the `shallowgroundwater` data source (#156). + - x +- Reference lists `schemes`, `scheme_types`, `namelist` were updated (#150, #151, #154): + - a few type name updates (thanks S. De Saeger); + - environmental pressures `ep_07.2` and `ep_07.4` received updated (Dutch) explanations; + - scheme `HQ2190` has been replaced by two schemes `HQ2190_terr` and `HQ2190_aq`; + - typegroups were defined for scheme `GW_05.1_aq` (with contributions from L. Denys & A. Leyssen). +- Readme (homepage): a **new installation method** using [inbo.r-universe.dev](https://inbo.r-universe.dev) has been added and is recommended (#153). + + # n2khab 0.5.0 (2021-05-12) ## Support for new data source versions From 1d27c46e6b8519f9038d3ad858481936b1b79c8f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 23 Dec 2021 17:04:06 +0100 Subject: [PATCH 27/36] types: change value of groundw_dep for type 91F0 to GD2 * Since there's only one Flemish location of 91F0, it's more consistent to choose either GD0 or GD2 instead of GD1. GD2 has been chosen because groundwater dependency is plausible at this site, although actually unknown. Groundwater dependency is defined as 'sensitive to desiccation through groundwater'. --- inst/textdata/types.tsv | 2 +- inst/textdata/types.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/textdata/types.tsv b/inst/textdata/types.tsv index ea90629a..dab77d8f 100644 --- a/inst/textdata/types.tsv +++ b/inst/textdata/types.tsv @@ -105,7 +105,7 @@ rbbms main_type rbbms BMF HC2 GD2 FD0 NA NA NA 91E0_vm subtype 91E0 FS HC2 GD2 FD0 NA NA NA 91E0_vn subtype 91E0 FS HC2 GD2 FD1 NA NA NA 91E0_vo subtype 91E0 FS HC2 GD2 FD0 NA NA NA -91F0 main_type 91F0 FS HC2 GD1 FD2 NA NA NA +91F0 main_type 91F0 FS HC2 GD2 FD2 NA NA NA rbbppm main_type rbbppm FS HC12 GD1 FD0 NA NA NA rbbsf main_type rbbsf FS HC2 GD2 FD1 NA NA NA rbbso main_type rbbso FS HC2 GD2 FD0 NA NA NA diff --git a/inst/textdata/types.yml b/inst/textdata/types.yml index e8b99e20..566aa71e 100644 --- a/inst/textdata/types.yml +++ b/inst/textdata/types.yml @@ -6,7 +6,7 @@ - typeclass - type hash: 3716361494fa7d0742afaf7cb987f8ad91e0fb52 - data_hash: 460e412331777e43036efa37a72c49f3fdcf2e50 + data_hash: 4992ac786610fc07fdee05a9f7cc83a62c51cff2 type: class: factor labels: From d98cc2490452886afb12a8c8e1ca8033cc218a6e Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 23 Dec 2021 17:15:23 +0100 Subject: [PATCH 28/36] NEWS.md: add types update 91F0 --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 257a27a0..ed207091 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,8 +4,9 @@ - Function `read_shallowgroundwater()` to return the `shallowgroundwater` data source (#156). - x -- Reference lists `schemes`, `scheme_types`, `namelist` were updated (#150, #151, #154): +- Reference lists `types`, `schemes`, `scheme_types`, `namelist` were updated (#150, #151, #154, #158): - a few type name updates (thanks S. De Saeger); + - updated value of `groundw_dep` for type `91F0`; - environmental pressures `ep_07.2` and `ep_07.4` received updated (Dutch) explanations; - scheme `HQ2190` has been replaced by two schemes `HQ2190_terr` and `HQ2190_aq`; - typegroups were defined for scheme `GW_05.1_aq` (with contributions from L. Denys & A. Leyssen). From 746fb81445bd697cb2b01fbfdbec9cb98c03653f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 25 Jan 2022 08:19:56 +0100 Subject: [PATCH 29/36] Readme: add CRAN when installing from r-universe --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a385213..868b290a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ The standard reference data include: checklists, spatial habitat distribution, a To install the current package version from the `master` branch (latest stable release), run: ```r -install.packages("n2khab", repos = "https://inbo.r-universe.dev") +install.packages("n2khab", repos = c(inbo = "https://inbo.r-universe.dev", + CRAN = "https://cloud.r-project.org")) ``` The above provides a pre-compiled package for Windows and macOS, which should be faster than below approach. From 913325d24d8e577769a2d9258f9229b49489c66a Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 25 Jan 2022 08:20:48 +0100 Subject: [PATCH 30/36] Update NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ed207091..c6a51ad9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,7 +10,7 @@ - environmental pressures `ep_07.2` and `ep_07.4` received updated (Dutch) explanations; - scheme `HQ2190` has been replaced by two schemes `HQ2190_terr` and `HQ2190_aq`; - typegroups were defined for scheme `GW_05.1_aq` (with contributions from L. Denys & A. Leyssen). -- Readme (homepage): a **new installation method** using [inbo.r-universe.dev](https://inbo.r-universe.dev) has been added and is recommended (#153). +- Readme (homepage): a **new installation method** using [inbo.r-universe.dev](https://inbo.r-universe.dev) has been added and is recommended (#153, 746fb81). # n2khab 0.5.0 (2021-05-12) From 1f5914434c7be55e2cf20a78e55be1eadb4c27f3 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Feb 2022 14:35:48 +0100 Subject: [PATCH 31/36] Update CRS name of EPSG:31370 * The CRS name changed since the PROJ 8.1.0 version (released 2021-06-30), due to the name change in version v10.027 of the EPSG dataset (released 2021-06-17). See https://github.com/osgeo/PROJ/commit/9a2f2ed9 for the change in PROJ. --- R/GRTSmh.R | 4 ++-- R/read_admin_areas.R | 2 +- R/read_ecoregions.R | 2 +- R/read_raster_runif.R | 2 +- R/read_watercourses.R | 2 +- man/read_GRTSmh.Rd | 2 +- man/read_GRTSmh_diffres.Rd | 2 +- man/read_admin_areas.Rd | 2 +- man/read_ecoregions.Rd | 2 +- man/read_raster_runif.Rd | 2 +- man/read_watercourse_100mseg.Rd | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/GRTSmh.R b/R/GRTSmh.R index 4c3cbf80..ab356d32 100644 --- a/R/GRTSmh.R +++ b/R/GRTSmh.R @@ -225,7 +225,7 @@ convert_base4frac_to_dec <- #' with the decimal integer ranking numbers of 10 hierarchical levels of the #' GRTS cell addresses, including the one from \code{GRTSmaster_habitats} #' (with GRTS cell addresses at the resolution level). -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' The data source \code{GRTSmaster_habitats}, provided and documented in @@ -470,7 +470,7 @@ read_GRTSmh_base4frac <- #' The function returns one selected level, either as a RasterLayer or as an #' \code{sf} polygon layer (in the latter case, only levels 4 to 9 are #' provided). -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' The \code{GRTSmh_diffres} data source file is a file collection (available diff --git a/R/read_admin_areas.R b/R/read_admin_areas.R index e2eddd7c..6fd5ed4c 100644 --- a/R/read_admin_areas.R +++ b/R/read_admin_areas.R @@ -2,7 +2,7 @@ #' administrative areas #' #' Returns an administrative geospatial data source. -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' @details See section \emph{Usage} to see which N2KHAB data sources are diff --git a/R/read_ecoregions.R b/R/read_ecoregions.R index 00772788..0a30372a 100644 --- a/R/read_ecoregions.R +++ b/R/read_ecoregions.R @@ -3,7 +3,7 @@ #' Returns the raw data source \code{ecoregions}, with unique polygon #' identifiers \code{polygon_code} and \code{polygon_id}. #' Multiple polygons can have the same \code{region_name}. -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' Original columns of the raw data source were mapped as: diff --git a/R/read_raster_runif.R b/R/read_raster_runif.R index e49b010d..649e96e9 100644 --- a/R/read_raster_runif.R +++ b/R/read_raster_runif.R @@ -8,7 +8,7 @@ #' with a small buffer added. #' Every raster cell has a random value between 0 and 1 according to the #' uniform distribution. -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' The \code{raster_runif} data source is a GeoTIFF file (available at diff --git a/R/read_watercourses.R b/R/read_watercourses.R index f971bf1e..cdb8f1d5 100644 --- a/R/read_watercourses.R +++ b/R/read_watercourses.R @@ -12,7 +12,7 @@ #' endpoints of all segments ('downstream' as defined in \code{watercourses}). #' } #' Optionally, only one of these objects is returned. -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' The data source \code{watercourse_100mseg} represents all officially known diff --git a/man/read_GRTSmh.Rd b/man/read_GRTSmh.Rd index 9a25f388..2b1b98e5 100644 --- a/man/read_GRTSmh.Rd +++ b/man/read_GRTSmh.Rd @@ -34,7 +34,7 @@ returned (data source \code{GRTSmh_brick}; resolution 32 m) with the decimal integer ranking numbers of 10 hierarchical levels of the GRTS cell addresses, including the one from \code{GRTSmaster_habitats} (with GRTS cell addresses at the resolution level). -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ diff --git a/man/read_GRTSmh_diffres.Rd b/man/read_GRTSmh_diffres.Rd index 3f1633d7..5ee9dbe6 100644 --- a/man/read_GRTSmh_diffres.Rd +++ b/man/read_GRTSmh_diffres.Rd @@ -37,7 +37,7 @@ GRTS cell addresses at the corresponding spatial resolution. The function returns one selected level, either as a RasterLayer or as an \code{sf} polygon layer (in the latter case, only levels 4 to 9 are provided). -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ diff --git a/man/read_admin_areas.Rd b/man/read_admin_areas.Rd index 2f02d1f6..9f3e0821 100644 --- a/man/read_admin_areas.Rd +++ b/man/read_admin_areas.Rd @@ -36,7 +36,7 @@ A Simple feature collection of geometry type \code{MULTIPOLYGON} or } \description{ Returns an administrative geospatial data source. -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ diff --git a/man/read_ecoregions.Rd b/man/read_ecoregions.Rd index 0791ccaa..6603f725 100644 --- a/man/read_ecoregions.Rd +++ b/man/read_ecoregions.Rd @@ -23,7 +23,7 @@ A Simple feature collection of geometry type \code{MULTIPOLYGON}. Returns the raw data source \code{ecoregions}, with unique polygon identifiers \code{polygon_code} and \code{polygon_id}. Multiple polygons can have the same \code{region_name}. -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ diff --git a/man/read_raster_runif.Rd b/man/read_raster_runif.Rd index 9033fc4f..67c0e284 100644 --- a/man/read_raster_runif.Rd +++ b/man/read_raster_runif.Rd @@ -32,7 +32,7 @@ the \code{GRTSmaster_habitats} data source (see \code{\link{read_GRTSmh}}) with a small buffer added. Every raster cell has a random value between 0 and 1 according to the uniform distribution. -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ diff --git a/man/read_watercourse_100mseg.Rd b/man/read_watercourse_100mseg.Rd index fe288def..bfa96473 100644 --- a/man/read_watercourse_100mseg.Rd +++ b/man/read_watercourse_100mseg.Rd @@ -57,7 +57,7 @@ represents the \emph{downstream} endpoints of all segments ('downstream' as defined in \code{watercourses}). } Optionally, only one of these objects is returned. -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ From ba8ea29e487b35a9ef0b0fcf6c0ac63fc592d09a Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Feb 2022 14:49:26 +0100 Subject: [PATCH 32/36] read_shallowgroundwater(): update CRS name of EPSG:31370 * The CRS name changed since the PROJ 8.1.0 version (released 2021-06-30), due to the name change in version v10.027 of the EPSG dataset (released 2021-06-17). See https://github.com/osgeo/PROJ/commit/9a2f2ed9 for the change in PROJ. --- R/read_shallowgroundwater.R | 2 +- man/read_shallowgroundwater.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/read_shallowgroundwater.R b/R/read_shallowgroundwater.R index 83c30b19..d4f6045b 100644 --- a/R/read_shallowgroundwater.R +++ b/R/read_shallowgroundwater.R @@ -4,7 +4,7 @@ #' Returns the raw data source \code{shallowgroundwater} #' as an \code{sf} multipolygon #' layer. -#' The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +#' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' #' The R code for creating the \code{shallowgroundwater} data source, diff --git a/man/read_shallowgroundwater.Rd b/man/read_shallowgroundwater.Rd index 8335e289..558ce29e 100644 --- a/man/read_shallowgroundwater.Rd +++ b/man/read_shallowgroundwater.Rd @@ -25,7 +25,7 @@ A Simple feature collection of geometry type \code{MULTIPOLYGON}. Returns the raw data source \code{shallowgroundwater} as an \code{sf} multipolygon layer. -The coordinate reference system is 'Belge 72 / Belgian Lambert 72' +The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ From 52acb4a4fffd101bc889fbab73334f329923a26a Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Feb 2022 19:37:05 +0100 Subject: [PATCH 33/36] read_shallowgroundwater(): document dataset * This content is largely derived from the metadata created by @DriesAdriaens at https://zenodo.org/record/5902881. --- R/read_shallowgroundwater.R | 166 ++++++++++++++++++++++++++++++++- man/read_shallowgroundwater.Rd | 165 +++++++++++++++++++++++++++++++- 2 files changed, 327 insertions(+), 4 deletions(-) diff --git a/R/read_shallowgroundwater.R b/R/read_shallowgroundwater.R index d4f6045b..d4e0e589 100644 --- a/R/read_shallowgroundwater.R +++ b/R/read_shallowgroundwater.R @@ -7,8 +7,22 @@ #' The coordinate reference system is 'BD72 / Belgian Lambert 72' #' (EPSG-code \href{https://epsg.io/31370}{31370}). #' -#' The R code for creating the \code{shallowgroundwater} data source, -#' starting from a manually composed layer, can be found in the +#' The data source \code{shallowgroundwater} represents the areas in +#' the Flemish region of Belgium where the mean lowest groundwater level (MLW; +#' Knotters & Van Walsum, 1997; Van Heesen, 1970) is estimated to be less than +#' approximately 2 m below soil surface (hence, 'shallow' groundwater). +#' Groundwater dependent species and communities can be expected to be present +#' mostly within these areas. +#' +#' The data source is a GeoPackage, available at +#' \href{https://doi.org/10.5281/zenodo.5902880}{Zenodo}, and contains a single +#' spatial multipolygon layer \code{shallowgroundwater}. +#' +#' The data source has been compiled from subsets of +#' various other spatial data sources. +#' This process is described in more detail at Zenodo. +#' The R code for finishing the \code{shallowgroundwater} data source, +#' starting from an intermediate result, can be found in the #' \href{https://github.com/inbo/n2khab-preprocessing}{n2khab-preprocessing} #' repository. #' @@ -17,8 +31,156 @@ #' @return #' A Simple feature collection of geometry type \code{MULTIPOLYGON}. #' +#' All attribute variables are logical +#' variables referring to a data source (subset) or procedure that has +#' contributed to +#' the \code{shallowgroundwater} data source. +#' If a variable is \code{TRUE} for a multipolygon, then the related data +#' source (subset) or procedure has +#' contributed to the multipolygon. +#' For one multipolygon, several variables can be \code{TRUE} at the same time. +#' Each combination of values occurs in only one multipolygon. +#' +#' The attribute variables listed below are described in more detail at +#' \href{https://doi.org/10.5281/zenodo.5902880}{Zenodo}; their description +#' typically refers to the meaning of \code{TRUE}: +#' \itemize{ +#' +#' \item \code{geomorph_wcoast}: mainly concerns dune slacks, mud flats and +#' salt marshes. +#' \emph{Derived from: Cosyns et al. (2019)} +#' +#' \item \code{anthrop_gwdep}: zones located within a 100 m buffer around +#' (almost) everywhere groundwater dependent habitat types (or regionally +#' important biotopes) ánd situated within zones classified as 'anthropogenic' +#' areas within the soil map. +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and +#' \code{\link[=read_habitatmap_terr]{habitatmap_terr}} +#' data sources} +#' +#' \item \code{narrowanthrop_gwdep}: narrow zones classified as 'anthropogenic' +#' areas within the soil map that include (almost) everywhere groundwater +#' dependent habitat types (or regionally important biotopes). +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and +#' \code{\link[=read_habitatmap_terr]{habitatmap_terr}} +#' data sources} +#' +#' \item \code{drainage}: soils that are at least moderately gleyic or wet. +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} +#' data source} +#' +#' \item \code{dunes_gwdep}: zones located within a 100 m buffer around (almost) +#' everywhere groundwater dependent habitat types (or regionally important +#' biotopes) ánd situated within zones classified as 'dunes' areas within the +#' soil map. +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and +#' \code{\link[=read_habitatmap_terr]{habitatmap_terr}} +#' data sources} +#' +#' \item \code{peat_profile}: variant of the soil profile indicates a +#' superficial peaty cover, mostly on gleyic or permanently water saturated +#' soil with or without profile development (\code{(v)}), eventually combined +#' with strong anthropogenic influence (\code{(o)}). +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} +#' data source} +#' +#' \item \code{peat_substr}: soil substrate (layer underlying superficial layer, +#' and lithologically diverging from it) consists of peat material starting at +#' small (less than 75 cm; \code{v}) or moderate depths (75-125 cm; +#' \code{(v)}), or a combination of the previous (\code{v-}). +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} +#' data source} +#' +#' \item \code{peat_parentmat}: parent material contains a mixture of at least +#' 30\% of peaty material. +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} +#' data source} +#' +#' \item \code{peat_texture}: soil consists of plain peat material. +#' \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} +#' data source} +#' +#' \item \code{phys_system}: polygons designated as seepage areas where +#' groundwater is supposed to gather after having infiltrated elsewhere +#' (infiltration areas) and being transported through the landscape (passage +#' areas). +#' \emph{Derived from: Lhermitte & Honnay (1994)} +#' +#' \item \code{zwin}: the contour of the Zwin Nature Reserve in the most +#' eastern part of the Flemish coastal area. +#' \emph{Derived from: Open Street Map, consulted 2021-10-06 by QGIS plugin +#' QuickOSM} +#' +#' \item \code{habitat_1130}: polygons located within estuaries (habitat type +#' \code{1130}). +#' \emph{Derived from: \code{\link[=read_habitatmap]{habitatmap}} +#' data source} +#' +#' \item \code{gwdepth_coast}: locations with estimated average lowest +#' groundwater table less than 2.5 m below soil surface (shallow groundwater), +#' based on interpolation of measured groundwater levels in areas along the +#' Flemish coast with sufficient gauge densities. +#' \emph{Derived from: +#' the \href{http://data.inbo.be/watina}{Watina} +#' database of the Research Institute for Nature and Forest (INBO)} +#' +#' \item \code{gwdepth_local}: mean lowest groundwater level less than 2 m +#' below soil surface (MLW) in a large military training site for which no +#' information is available in the soil map of Flanders. +#' \emph{Derived from: Batelaan et al. (2012)} +#' +#' \item \code{seepage}: area with modelled seepage fluxes of at least +#' 0.8 mm/day in the central part of eastern Flanders. +#' \emph{Derived from: Batelaan & De Smedt (1994)} +#' +#' \item \code{peat_survey}: local peaty zones evaluated by simple measurements +#' of the depth of plain and superficial peaty soil layers at regular intervals +#' (about 20 m). +#' \emph{Derived from: local inventories executed or compiled by the Research +#' Institute for Nature and Forest (INBO)} +#' +#' \item \code{duneslack}: polygons with dune slack vegetations along the +#' Flemish coast that typically imply shallow groundwater levels. +#' \emph{Derived from: Provoost et al. (2020)} +#' +#' } +#' +#' #' @family functions returning environmental data sets #' +#' @references +#' \itemize{ +#' \item Batelaan O., De Becker P., El-Rawy M., Herr C., +#' Schneidewind, U. (2012). Doorrekenen van maatregelen voor herstel van +#' vochtige heidevegetaties op het Schietveld van Houthalen-Helchteren via +#' grondwatermodellering. Vrije Universiteit Brussel/Instituut voor Natuur en +#' Bosonderzoek. +#' \item Batelaan O., De Smedt F. (1994). Regionale +#' grondwaterstroming rond een aantal kwelafhankelijke natuurgebieden. Vrije +#' Universiteit Brussel. +#' \item Cosyns E., Bollengier B., Provoost S. (2019). +#' Masterplan en juridische basis voor grensoverschrijdende samenwerking en +#' bescherming als een transnationaal natuurpark van de duinen tussen Dunkerque +#' (Frankrijk) en Westende (België). Partim Masterplan. Rapport in opdracht van +#' Agentschap Natuur en Bos, Conservatoire de l'espace littoral et des rivages +#' lacustres, Conseil Général Département du Nord. +#' \url{https://www.natuurenbos.be/sites/default/files/inserted-files/masterplan_flandre_ned20200210def.pdf} +#' \item Knotters M. & van Walsum P.E.V. (1997). Estimating fluctuation +#' quantities from time series of water-table depths using models with a +#' stochastic component. Journal of Hydrology 197 (1): 25–46. +#' \doi{10.1016/S0022-1694(96)03278-7}. +#' \item Lhermitte K., Honnay O. (1994). Kartering van het Fysisch Systeem en +#' de Ruimtelijke structuren in Vlaanderen op schaal 1 : 50 000. Stichting +#' Plattelandsbeleid 1994, Boerenbond, Leuven. +#' \item Provoost S., Van Gompel W. & Vercruysse E. (2020). Beheerevaluatie +#' kust. Eindrapport 2015-2019. Rapporten van het Instituut voor Natuur- en +#' Bosonderzoek 2020 (18). Instituut voor Natuur- en Bosonderzoek, Brussel. +#' \doi{10.21436/inbor.18039583}. +#' \item Van Heesen H.C. (1970). +#' Presentation of the seasonal fluctuation of the water table on soil maps. +#' Geoderma 4 (3): 257–278. \doi{10.1016/0016-7061(70)90006-6}. +#' } +#' #' @examples #' \dontrun{ #' shallowgroundwater <- read_shallowgroundwater() diff --git a/man/read_shallowgroundwater.Rd b/man/read_shallowgroundwater.Rd index 558ce29e..57f1b459 100644 --- a/man/read_shallowgroundwater.Rd +++ b/man/read_shallowgroundwater.Rd @@ -20,6 +20,120 @@ starting from the working directory.} } \value{ A Simple feature collection of geometry type \code{MULTIPOLYGON}. + +All attribute variables are logical +variables referring to a data source (subset) or procedure that has +contributed to +the \code{shallowgroundwater} data source. +If a variable is \code{TRUE} for a multipolygon, then the related data +source (subset) or procedure has +contributed to the multipolygon. +For one multipolygon, several variables can be \code{TRUE} at the same time. +Each combination of values occurs in only one multipolygon. + +The attribute variables listed below are described in more detail at +\href{https://doi.org/10.5281/zenodo.5902880}{Zenodo}; their description +typically refers to the meaning of \code{TRUE}: +\itemize{ + +\item \code{geomorph_wcoast}: mainly concerns dune slacks, mud flats and +salt marshes. + \emph{Derived from: Cosyns et al. (2019)} + +\item \code{anthrop_gwdep}: zones located within a 100 m buffer around +(almost) everywhere groundwater dependent habitat types (or regionally +important biotopes) ánd situated within zones classified as 'anthropogenic' +areas within the soil map. + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and + \code{\link[=read_habitatmap_terr]{habitatmap_terr}} + data sources} + +\item \code{narrowanthrop_gwdep}: narrow zones classified as 'anthropogenic' +areas within the soil map that include (almost) everywhere groundwater +dependent habitat types (or regionally important biotopes). + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and + \code{\link[=read_habitatmap_terr]{habitatmap_terr}} + data sources} + +\item \code{drainage}: soils that are at least moderately gleyic or wet. + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} + data source} + +\item \code{dunes_gwdep}: zones located within a 100 m buffer around (almost) +everywhere groundwater dependent habitat types (or regionally important +biotopes) ánd situated within zones classified as 'dunes' areas within the +soil map. + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} and + \code{\link[=read_habitatmap_terr]{habitatmap_terr}} + data sources} + +\item \code{peat_profile}: variant of the soil profile indicates a +superficial peaty cover, mostly on gleyic or permanently water saturated +soil with or without profile development (\code{(v)}), eventually combined +with strong anthropogenic influence (\code{(o)}). + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} + data source} + +\item \code{peat_substr}: soil substrate (layer underlying superficial layer, +and lithologically diverging from it) consists of peat material starting at +small (less than 75 cm; \code{v}) or moderate depths (75-125 cm; +\code{(v)}), or a combination of the previous (\code{v-}). + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} + data source} + +\item \code{peat_parentmat}: parent material contains a mixture of at least +30\% of peaty material. + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} + data source} + +\item \code{peat_texture}: soil consists of plain peat material. + \emph{Derived from: \code{\link[=read_soilmap]{soilmap_simple}} + data source} + +\item \code{phys_system}: polygons designated as seepage areas where +groundwater is supposed to gather after having infiltrated elsewhere +(infiltration areas) and being transported through the landscape (passage +areas). + \emph{Derived from: Lhermitte & Honnay (1994)} + +\item \code{zwin}: the contour of the Zwin Nature Reserve in the most +eastern part of the Flemish coastal area. + \emph{Derived from: Open Street Map, consulted 2021-10-06 by QGIS plugin + QuickOSM} + +\item \code{habitat_1130}: polygons located within estuaries (habitat type +\code{1130}). + \emph{Derived from: \code{\link[=read_habitatmap]{habitatmap}} + data source} + +\item \code{gwdepth_coast}: locations with estimated average lowest +groundwater table less than 2.5 m below soil surface (shallow groundwater), +based on interpolation of measured groundwater levels in areas along the +Flemish coast with sufficient gauge densities. + \emph{Derived from: + the \href{http://data.inbo.be/watina}{Watina} + database of the Research Institute for Nature and Forest (INBO)} + +\item \code{gwdepth_local}: mean lowest groundwater level less than 2 m +below soil surface (MLW) in a large military training site for which no +information is available in the soil map of Flanders. + \emph{Derived from: Batelaan et al. (2012)} + +\item \code{seepage}: area with modelled seepage fluxes of at least +0.8 mm/day in the central part of eastern Flanders. + \emph{Derived from: Batelaan & De Smedt (1994)} + +\item \code{peat_survey}: local peaty zones evaluated by simple measurements +of the depth of plain and superficial peaty soil layers at regular intervals +(about 20 m). + \emph{Derived from: local inventories executed or compiled by the Research + Institute for Nature and Forest (INBO)} + +\item \code{duneslack}: polygons with dune slack vegetations along the +Flemish coast that typically imply shallow groundwater levels. + \emph{Derived from: Provoost et al. (2020)} + +} } \description{ Returns the raw data source \code{shallowgroundwater} @@ -29,8 +143,22 @@ The coordinate reference system is 'BD72 / Belgian Lambert 72' (EPSG-code \href{https://epsg.io/31370}{31370}). } \details{ -The R code for creating the \code{shallowgroundwater} data source, -starting from a manually composed layer, can be found in the +The data source \code{shallowgroundwater} represents the areas in +the Flemish region of Belgium where the mean lowest groundwater level (MLW; +Knotters & Van Walsum, 1997; Van Heesen, 1970) is estimated to be less than +approximately 2 m below soil surface (hence, 'shallow' groundwater). +Groundwater dependent species and communities can be expected to be present +mostly within these areas. + +The data source is a GeoPackage, available at +\href{https://doi.org/10.5281/zenodo.5902880}{Zenodo}, and contains a single +spatial multipolygon layer \code{shallowgroundwater}. + +The data source has been compiled from subsets of +various other spatial data sources. +This process is described in more detail at Zenodo. +The R code for finishing the \code{shallowgroundwater} data source, +starting from an intermediate result, can be found in the \href{https://github.com/inbo/n2khab-preprocessing}{n2khab-preprocessing} repository. } @@ -40,6 +168,39 @@ shallowgroundwater <- read_shallowgroundwater() shallowgroundwater } +} +\references{ +\itemize{ +\item Batelaan O., De Becker P., El-Rawy M., Herr C., +Schneidewind, U. (2012). Doorrekenen van maatregelen voor herstel van +vochtige heidevegetaties op het Schietveld van Houthalen-Helchteren via +grondwatermodellering. Vrije Universiteit Brussel/Instituut voor Natuur en +Bosonderzoek. +\item Batelaan O., De Smedt F. (1994). Regionale +grondwaterstroming rond een aantal kwelafhankelijke natuurgebieden. Vrije +Universiteit Brussel. +\item Cosyns E., Bollengier B., Provoost S. (2019). +Masterplan en juridische basis voor grensoverschrijdende samenwerking en +bescherming als een transnationaal natuurpark van de duinen tussen Dunkerque +(Frankrijk) en Westende (België). Partim Masterplan. Rapport in opdracht van +Agentschap Natuur en Bos, Conservatoire de l'espace littoral et des rivages +lacustres, Conseil Général Département du Nord. +\url{https://www.natuurenbos.be/sites/default/files/inserted-files/masterplan_flandre_ned20200210def.pdf} +\item Knotters M. & van Walsum P.E.V. (1997). Estimating fluctuation +quantities from time series of water-table depths using models with a +stochastic component. Journal of Hydrology 197 (1): 25–46. +\doi{10.1016/S0022-1694(96)03278-7}. +\item Lhermitte K., Honnay O. (1994). Kartering van het Fysisch Systeem en +de Ruimtelijke structuren in Vlaanderen op schaal 1 : 50 000. Stichting +Plattelandsbeleid 1994, Boerenbond, Leuven. +\item Provoost S., Van Gompel W. & Vercruysse E. (2020). Beheerevaluatie +kust. Eindrapport 2015-2019. Rapporten van het Instituut voor Natuur- en +Bosonderzoek 2020 (18). Instituut voor Natuur- en Bosonderzoek, Brussel. +\doi{10.21436/inbor.18039583}. +\item Van Heesen H.C. (1970). +Presentation of the seasonal fluctuation of the water table on soil maps. +Geoderma 4 (3): 257–278. \doi{10.1016/0016-7061(70)90006-6}. +} } \seealso{ Other functions returning environmental data sets: From f1ffbcacc59be4a17dc144aa9e34e9cc0148db62 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Feb 2022 19:51:46 +0100 Subject: [PATCH 34/36] Update NEWS.md --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index c6a51ad9..f624c1c2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,8 @@ ## New features - Function `read_shallowgroundwater()` to return the `shallowgroundwater` data source (#156). - - x + - The raw data source `shallowgroundwater` represents the areas in +the Flemish region of Belgium where the mean lowest groundwater level is estimated to be less than approximately 2 m below soil surface ([inbo/n2khab-preprocessing/pull/61](https://github.com/inbo/n2khab-preprocessing/pull/61); ). - Reference lists `types`, `schemes`, `scheme_types`, `namelist` were updated (#150, #151, #154, #158): - a few type name updates (thanks S. De Saeger); - updated value of `groundw_dep` for type `91F0`; From e8ac55163d9f2e5c276356d40912fb71b6ad5858 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Feb 2022 20:22:24 +0100 Subject: [PATCH 35/36] GHA pkgdown workflows: temporarily use pkgdown version 1.6.1 * Due to pkgdown 2.0.2 not honouring paragraphs in the Value section of function documentation. To be reverted once this is solved in pkgdown at CRAN. --- .github/workflows/site-deploy.yaml | 2 +- .github/workflows/site-devel.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/site-deploy.yaml b/.github/workflows/site-deploy.yaml index 53c12124..b1350a31 100644 --- a/.github/workflows/site-deploy.yaml +++ b/.github/workflows/site-deploy.yaml @@ -50,7 +50,7 @@ jobs: - name: Install dependencies run: | remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown") + remotes::install_version("pkgdown", "1.6.1") shell: Rscript {0} - name: Install package diff --git a/.github/workflows/site-devel.yaml b/.github/workflows/site-devel.yaml index 8f05cd18..614a68b7 100644 --- a/.github/workflows/site-devel.yaml +++ b/.github/workflows/site-devel.yaml @@ -50,7 +50,7 @@ jobs: - name: Install dependencies run: | remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown") + remotes::install_version("pkgdown", "1.6.1") shell: Rscript {0} - name: Install package From c141d8040e869192d9619326fe973c13db3a5e4f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 3 Feb 2022 17:05:13 +0100 Subject: [PATCH 36/36] Version 0.6.0 --- .zenodo.json | 2 +- DESCRIPTION | 2 +- NEWS.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 479416fb..3f5e47b9 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -4,7 +4,7 @@ "license": "GPL-3.0", "upload_type": "software", "access_right": "open", - "version": "0.5.0", + "version": "0.6.0", "creators": [ { "name": "Vanderhaeghe, Floris", diff --git a/DESCRIPTION b/DESCRIPTION index cd3d5468..298ad568 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: n2khab Title: Providing Preprocessed Reference Data for Flemish Natura 2000 Habitat Analyses -Version: 0.5.0.900 +Version: 0.6.0 Authors@R: c( person("Floris", "Vanderhaeghe", email = "floris.vanderhaeghe@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6378-6229")), person("Toon", "Westra", email = "toon.westra@inbo.be", role = c("aut"), comment = c(ORCID = "0000-0003-2478-9459")), diff --git a/NEWS.md b/NEWS.md index f624c1c2..04164d0f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# n2khab (development version) +# n2khab 0.6.0 (2022-02-03) ## New features