From 05c3c3001c381577d1563174cdc4272e553bfb0f Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Oct 2019 11:17:35 +0200 Subject: [PATCH 1/8] Add notebook to explore the soilmap --- src/miscellaneous/soilmap.Rmd | 126 ++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 src/miscellaneous/soilmap.Rmd diff --git a/src/miscellaneous/soilmap.Rmd b/src/miscellaneous/soilmap.Rmd new file mode 100644 index 0000000..444f120 --- /dev/null +++ b/src/miscellaneous/soilmap.Rmd @@ -0,0 +1,126 @@ +--- +title: "Handling the soilmap" +date: '`r paste("Version",lubridate::now())`' +output: + html_notebook: + number_sections: yes + code_folding: show + includes: + in_header: ../header.html + toc: yes + toc_float: + collapsed: no + smooth_scroll: no +--- + +```{r setup, message=FALSE, echo=FALSE} +options(stringsAsFactors = FALSE) +# library(sp) +library(sf) +library(raster) +library(tidyverse) +library(n2khab) +# # library(plotly) +# library(rasterVis) +# library(stars) +# library(units) +# library(tmap) +library(knitr) +opts_chunk$set( + echo = TRUE, + dpi = 300 +) +``` + + +# Exploring the soilmap data source + +```{r} +soilmap <- read_sf(file.path(fileman_up("n2khab_data"), "10_raw/soilmap"), + stringsAsFactors = TRUE) # for exploring unique values +``` + + +```{r} +soilmap %>% + st_drop_geometry %>% + summary +``` + +Number of unique values of numeric variables: + +```{r} +ul <- function(x) x %>% unique %>% length +list(soilmap$gid, + soilmap$id_kaartvl, + soilmap$Kaartbldnr) %>% + lapply(ul) +``` + +Look at this: + +```{r} +all(soilmap$gid == soilmap$id_kaartvl) +``` + + +Number of NA's of some numeric variables: + +```{r} +nal <- function(x) x %>% is.na %>% sum +list(soilmap$gid, + soilmap$id_kaartvl, + soilmap$Kaartbldnr, + soilmap$codeid) %>% + lapply(nal) +``` + +Inspecting the number of levels of variables. +Note that in several cases, the number of different codes does not match the number of different meanings/explanations. + +```{r} +soilmap %>% st_drop_geometry %>% lapply(ul) +``` + +String inconsistencies do happen: + +```{r} +soilmap$Type_class %>% unique %>% as.matrix +``` + +`codeid` refers to `Bodemtype` according to the metadatafile "20140814Uitleg_bij_veldnamen_bodemkaart.docx", and indeed it has the same number of levels. +Somehow the order of variables is a bit confusing here. + +Explanations of `Fase_c` are not data, but metadata: + +```{r} +soilmap %>% + st_drop_geometry %>% + select(contains("Fase")) %>% + distinct +``` + +## Exploring the relation between `Bodemtype` and `Unitype` + +```{r} +soilmap %>% + mutate(same = as.character(Bodemtype) == as.character(Unitype)) %>% + .$same %>% summary +``` + +```{r} +soilmap %>% + st_drop_geometry %>% + mutate(same = as.character(Bodemtype) == as.character(Unitype)) %>% + filter(!same) %>% + count(Bodemtype, Textuur_c, Bodemser_c, Type_c, Unitype) +``` + + +```{r} +soilmap %>% + st_drop_geometry %>% + mutate(same = as.character(Bodemtype) == as.character(Unitype)) %>% + filter(!same) %>% + .$Bodemtype %>% str_sub(1,1) %>% unique +``` From 2514ab1c83b2aa0854baf47a4df33d4b4da59727 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Tue, 1 Oct 2019 11:18:19 +0200 Subject: [PATCH 2/8] RStudio/bookdown proj to generate soilmap_simple --- .../10_soilmap_simple.Rmd | 32 ++++++++++ .../99_sessioninfo.Rmd | 19 ++++++ src/generate_soilmap_simple/_bookdown.yml | 4 ++ .../generate_soilmap_simple.Rproj | 18 ++++++ src/generate_soilmap_simple/index.Rmd | 60 +++++++++++++++++++ 5 files changed, 133 insertions(+) create mode 100644 src/generate_soilmap_simple/10_soilmap_simple.Rmd create mode 100644 src/generate_soilmap_simple/99_sessioninfo.Rmd create mode 100644 src/generate_soilmap_simple/_bookdown.yml create mode 100644 src/generate_soilmap_simple/generate_soilmap_simple.Rproj create mode 100644 src/generate_soilmap_simple/index.Rmd diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd new file mode 100644 index 0000000..ac91e15 --- /dev/null +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -0,0 +1,32 @@ +# Making a simple version of the `soilmap` data source + +As we incorporated two handles for processing the raw `soilmap` data source in the `read_soilmap()` function, +we can implement directly as follows: + +```{r} +soilmap_simple <- read_soilmap(use_processed = FALSE, + standardize_polders = TRUE, + simplify = TRUE) +``` + +# Writing the result as a GeoPackage + +```{r} +datapath <- fileman_up("n2khab_data") +``` + +```{r} +dir.create(file.path(datapath, "20_processed/soilmap_simple"), recursive = TRUE) +``` + + +```{r} +st_write(soilmap_simple, + file.path(datapath, + "20_processed/soilmap_simple/soilmap_simple.gpkg"), + layer = "soilmap_simple", + driver = "GPKG", + delete_dsn = TRUE) +``` + + diff --git a/src/generate_soilmap_simple/99_sessioninfo.Rmd b/src/generate_soilmap_simple/99_sessioninfo.Rmd new file mode 100644 index 0000000..32738d7 --- /dev/null +++ b/src/generate_soilmap_simple/99_sessioninfo.Rmd @@ -0,0 +1,19 @@ +# Used environment + +```{r session-info, results = "asis", echo=FALSE} +si <- devtools::session_info() +p <- si$platform %>% + do.call(what = "c") +sprintf("- **%s**:\n %s\n", names(p), p) %>% + cat() +``` + +```{r results = "asis", echo=FALSE} +si$packages %>% + as_tibble %>% + select(package, loadedversion, date, source) %>% +pander::pandoc.table(caption = "(\\#tab:sessioninfo)Loaded R packages", + split.table = Inf) +``` + + diff --git a/src/generate_soilmap_simple/_bookdown.yml b/src/generate_soilmap_simple/_bookdown.yml new file mode 100644 index 0000000..4d384fc --- /dev/null +++ b/src/generate_soilmap_simple/_bookdown.yml @@ -0,0 +1,4 @@ +book_filename: "generate_soilmap_simple.Rmd" +new_session: FALSE +rmd_files: # specifies the order of Rmd files; NOT needed when you use index.Rmd and an alphabetical order for other Rmd files + # - index.Rmd diff --git a/src/generate_soilmap_simple/generate_soilmap_simple.Rproj b/src/generate_soilmap_simple/generate_soilmap_simple.Rproj new file mode 100644 index 0000000..2ccdd0c --- /dev/null +++ b/src/generate_soilmap_simple/generate_soilmap_simple.Rproj @@ -0,0 +1,18 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 4 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: XeLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Website diff --git a/src/generate_soilmap_simple/index.Rmd b/src/generate_soilmap_simple/index.Rmd new file mode 100644 index 0000000..e8d1094 --- /dev/null +++ b/src/generate_soilmap_simple/index.Rmd @@ -0,0 +1,60 @@ +--- +title: "Generating a simplified form of the soilmap" +# subtitle: "x" +date: "`r lubridate::now()`" +link-citations: true +linkcolor: link.colour +citecolor: link.colour +urlcolor: link.colour +geometry: margin=1in +mainfont: "Calibri" +fontsize: 11pt +documentclass: "article" +# csl: ../inbo.csl +# bibliography: ../references.bib +site: bookdown::bookdown_site +output: + bookdown::html_document2: + keep_md: TRUE + number_sections: yes + fig_caption: yes + df_print: paged + toc: TRUE + toc_float: + collapsed: FALSE + smooth_scroll: FALSE + includes: + in_header: ../header.html + bookdown::pdf_document2: + fig_caption: yes + keep_tex: yes + toc: yes + toc_depth: 3 + latex_engine: xelatex + number_sections: true + includes: + in_header: ../header.tex +--- + +```{r setup, include=FALSE} +options(stringsAsFactors = FALSE, + scipen = 999, + digits = 15) +library(tidyverse) +library(stringr) +library(knitr) +library(n2khab) +library(sf) +opts_chunk$set( + echo = TRUE, + dpi = 300, + paged.print = FALSE +) +``` + +**Note: this is a bookdown project, supposed to be run from within the `src/generate_soilmap_simple` subfolder. You can use the `generate_soilmap_simple` RStudio project file in this subfolder to run it.** + + + + + From 906fc7a0bc6e1aac2c013e77c9c7f801f1bb8b4b Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 22 Jan 2020 17:25:47 +0100 Subject: [PATCH 3/8] generate_soilmap_simple: upgrade argument read_soilmap() --- src/generate_soilmap_simple/10_soilmap_simple.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd index ac91e15..0921f6f 100644 --- a/src/generate_soilmap_simple/10_soilmap_simple.Rmd +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -5,7 +5,7 @@ we can implement directly as follows: ```{r} soilmap_simple <- read_soilmap(use_processed = FALSE, - standardize_polders = TRUE, + standardize_coastalplain = TRUE, simplify = TRUE) ``` From 9417da0f2265fa52891b2fe505ec4582a6f6312c Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 8 Apr 2020 08:49:47 +0200 Subject: [PATCH 4/8] generate_soilmap_simple: explanations in non-spatial table * Compared to keeping explan vars as columns, this saves about 30 MB. From this experience, experiments have been carried out (discarded!) to convert all factors to integers, and storing even the 'double'-type var 'bsm_poly_id' as an integer, and store the corresponding levels in non-spatial tables. However, this saved only about 4 MB, meaning that the storage as 'REAL' and as 'TEXT' in SQLite does not take up much more space (for 270550 rows) than storing as 'MEDIUMINTEGER'. Hence, discarded these extra steps to ease writing and reading. --- .../10_soilmap_simple.Rmd | 48 ++++++++++++++++++- src/generate_soilmap_simple/index.Rmd | 1 + 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd index 0921f6f..46b4c48 100644 --- a/src/generate_soilmap_simple/10_soilmap_simple.Rmd +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -6,9 +6,47 @@ we can implement directly as follows: ```{r} soilmap_simple <- read_soilmap(use_processed = FALSE, standardize_coastalplain = TRUE, - simplify = TRUE) + simplify = TRUE, + explan = TRUE) ``` +# Split off a lookup table with factor levels & their explanations + +```{r} +soilmap_df <- + soilmap_simple %>% + st_drop_geometry %>% + select(contains("bsm_mo"), -bsm_mo_soilunitype) +subjects <- soilmap_df %>% + select(-contains("_explan")) %>% + colnames +explanations <- tibble() +for (i in 1:6) { + explanations <- + bind_rows(explanations, + tibble(subject = subjects[i], + code = soilmap_df %>% + pull((i * 2 - 1)) %>% + levels, + explan = soilmap_df %>% + pull((i * 2)) %>% + levels + ) + ) +} +``` + +```{r} +soilmap_simple <- + soilmap_simple %>% + select(-contains("_explan")) +``` + +```{r paged.print=FALSE} +soilmap_simple +``` + + # Writing the result as a GeoPackage ```{r} @@ -27,6 +65,14 @@ st_write(soilmap_simple, layer = "soilmap_simple", driver = "GPKG", delete_dsn = TRUE) + +con <- dbConnect(SQLite(), + dbname = file.path(datapath, + "20_processed/soilmap_simple/soilmap_simple.gpkg")) + +dbWriteTable(con, "explanations", explanations) + +dbDisconnect(con) ``` diff --git a/src/generate_soilmap_simple/index.Rmd b/src/generate_soilmap_simple/index.Rmd index e8d1094..a181a75 100644 --- a/src/generate_soilmap_simple/index.Rmd +++ b/src/generate_soilmap_simple/index.Rmd @@ -45,6 +45,7 @@ library(stringr) library(knitr) library(n2khab) library(sf) +library(RSQLite) opts_chunk$set( echo = TRUE, dpi = 300, From 286438dd0516ee4c2665b13b0aeb1d2fb6269000 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 8 Apr 2020 10:36:48 +0200 Subject: [PATCH 5/8] generate_soilmap_simple: properly use RSQLite::SQLite() --- src/generate_soilmap_simple/10_soilmap_simple.Rmd | 2 +- src/generate_soilmap_simple/index.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd index 46b4c48..2c83b14 100644 --- a/src/generate_soilmap_simple/10_soilmap_simple.Rmd +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -66,7 +66,7 @@ st_write(soilmap_simple, driver = "GPKG", delete_dsn = TRUE) -con <- dbConnect(SQLite(), +con <- dbConnect(RSQLite::SQLite(), dbname = file.path(datapath, "20_processed/soilmap_simple/soilmap_simple.gpkg")) diff --git a/src/generate_soilmap_simple/index.Rmd b/src/generate_soilmap_simple/index.Rmd index a181a75..e7f45cf 100644 --- a/src/generate_soilmap_simple/index.Rmd +++ b/src/generate_soilmap_simple/index.Rmd @@ -45,7 +45,7 @@ library(stringr) library(knitr) library(n2khab) library(sf) -library(RSQLite) +library(DBI) opts_chunk$set( echo = TRUE, dpi = 300, From d231436c54d6291e42229c4fbf5ce39043303925 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Wed, 8 Apr 2020 10:37:35 +0200 Subject: [PATCH 6/8] generate_soilmap_simple: register non-spatial table * Non-spatial tables need to be registered in the GeoPackage in order to conform to the GPKG standard. For now, this is done in a manual fashion, despite the ability of GDAL to take care of this for GPKG. I found no way to use this ability from R, so implemented the easy, though obsoleted approach of GeoPackage 1.0 to register non-spatial tables as data_type "aspatial" in the gpkg_contents table; see: https://gdal.org/drivers/vector/aspatial.html#vector-aspatial Question on implementation in R, see: https://github.com/r-spatial/sf/issues/1345 The current way (GPKG 1.2) to handle this (data_type "attributes") is supported by GDAL, see: https://gdal.org/drivers/vector/gpkg.html#layer-creation-options . But it needs more work to do it manually, so made a GPKG 1.0 compliant version for now. See https://www.ogc.org/standards/geopackage . Note that GDAL is supportive when reading non-compliant gpkg-files, as it 'will also, by default, list non spatial tables that are not registered', which is why this worked beforehand with st_read(). See https://gdal.org/drivers/vector/gpkg.html#non-spatial-tables . --- src/generate_soilmap_simple/10_soilmap_simple.Rmd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd index 2c83b14..05647d2 100644 --- a/src/generate_soilmap_simple/10_soilmap_simple.Rmd +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -66,11 +66,18 @@ st_write(soilmap_simple, driver = "GPKG", delete_dsn = TRUE) +gpkg_contents_add <- + tribble( + ~table_name, ~data_type, ~identifier, + "explanations", "aspatial", "explanations" + ) + con <- dbConnect(RSQLite::SQLite(), dbname = file.path(datapath, "20_processed/soilmap_simple/soilmap_simple.gpkg")) dbWriteTable(con, "explanations", explanations) +devnull <- dbAppendTable(con, "gpkg_contents", gpkg_contents_add) dbDisconnect(con) ``` From 3abfcada4720c1fc5b2fe781a91b0297c19bb623 Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 9 Apr 2020 18:55:31 +0200 Subject: [PATCH 7/8] generate_soilmap_simple: rename column in explanations table --- src/generate_soilmap_simple/10_soilmap_simple.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate_soilmap_simple/10_soilmap_simple.Rmd b/src/generate_soilmap_simple/10_soilmap_simple.Rmd index 05647d2..6baaf8b 100644 --- a/src/generate_soilmap_simple/10_soilmap_simple.Rmd +++ b/src/generate_soilmap_simple/10_soilmap_simple.Rmd @@ -28,7 +28,7 @@ for (i in 1:6) { code = soilmap_df %>% pull((i * 2 - 1)) %>% levels, - explan = soilmap_df %>% + name = soilmap_df %>% pull((i * 2)) %>% levels ) From b3c669637a3bd763c747ad8fa2caef09c624e85c Mon Sep 17 00:00:00 2001 From: florisvdh Date: Thu, 9 Apr 2020 18:55:47 +0200 Subject: [PATCH 8/8] generate_soilmap_simple: implement renv --- src/generate_soilmap_simple/.Rprofile | 1 + src/generate_soilmap_simple/renv.lock | 1110 +++++++++++++++++ src/generate_soilmap_simple/renv/.gitignore | 3 + src/generate_soilmap_simple/renv/activate.R | 185 +++ src/generate_soilmap_simple/renv/settings.dcf | 6 + 5 files changed, 1305 insertions(+) create mode 100644 src/generate_soilmap_simple/.Rprofile create mode 100644 src/generate_soilmap_simple/renv.lock create mode 100644 src/generate_soilmap_simple/renv/.gitignore create mode 100644 src/generate_soilmap_simple/renv/activate.R create mode 100644 src/generate_soilmap_simple/renv/settings.dcf diff --git a/src/generate_soilmap_simple/.Rprofile b/src/generate_soilmap_simple/.Rprofile new file mode 100644 index 0000000..81b960f --- /dev/null +++ b/src/generate_soilmap_simple/.Rprofile @@ -0,0 +1 @@ +source("renv/activate.R") diff --git a/src/generate_soilmap_simple/renv.lock b/src/generate_soilmap_simple/renv.lock new file mode 100644 index 0000000..04f0aec --- /dev/null +++ b/src/generate_soilmap_simple/renv.lock @@ -0,0 +1,1110 @@ +{ + "R": { + "Version": "3.6.3", + "Repositories": [ + { + "Name": "RStudio", + "URL": "http://cloud.r-project.org" + }, + { + "Name": "INLA", + "URL": "https://inla.r-inla-download.org/R/stable" + }, + { + "Name": "inbo", + "URL": "https://inbo.github.io/drat" + } + ] + }, + "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", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a16cb2832248c7cff5a6f505e2aea45b" + }, + "KernSmooth": { + "Package": "KernSmooth", + "Version": "2.23-16", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "997471f25a7ed6c782f0090ce52cc63a" + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-51.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9efe80472b21189ebab1b74169808c26" + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.2-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "08588806cba69f04797dab50627428ed" + }, + "R6": { + "Package": "R6", + "Version": "2.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "292b54f8f4b94669b08f94e5acce6be2" + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e031418365a7f7a766181ab5a41a5716" + }, + "RSQLite": { + "Package": "RSQLite", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2e813101e637bfd423f763d20350ed3d" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.4.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e652f23d8b1807cc975c51410d05b72f" + }, + "askpass": { + "Package": "askpass", + "Version": "1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e8a22846fff485f0be3770c2da758713" + }, + "assertable": { + "Package": "assertable", + "Version": "0.2.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2e1cdf21bf1576c0ef7598deecffc8b5" + }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, + "backports": { + "Package": "backports", + "Version": "1.1.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3997fd62345a616e59e8161ee0a5816f" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "1.1-15.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "eb6c52d8cc44463085a4cde1c63df163" + }, + "bit64": { + "Package": "bit64", + "Version": "0.9-7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3338d4a9b1352f5a613e2bdcefe784ea" + }, + "blob": { + "Package": "blob", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9addc7e2c5954eca5719928131fed98c" + }, + "bookdown": { + "Package": "bookdown", + "Version": "0.18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "72e9c52caf3f7aacb4e368b75f6ec72a" + }, + "brew": { + "Package": "brew", + "Version": "1.0-6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "92a5f887f9ae3035ac7afde22ba73ee9" + }, + "broom": { + "Package": "broom", + "Version": "0.5.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "70ec3aef8a0df13661bf6cc2ff877d61" + }, + "callr": { + "Package": "callr", + "Version": "3.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "643163a00cb536454c624883a10ae0bc" + }, + "cellranger": { + "Package": "cellranger", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" + }, + "class": { + "Package": "class", + "Version": "7.3-16", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ebc639c4432a2e9c17f195d004848100" + }, + "classInt": { + "Package": "classInt", + "Version": "0.4-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "17bdfa3c51df4a6c82484d13b11fb380" + }, + "cli": { + "Package": "cli", + "Version": "2.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ff0becff7bfdfe3f75d29aff8f3172dd" + }, + "clipr": { + "Package": "clipr", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "08cf4045c149a0f0eaf405324c7495bd" + }, + "clisymbols": { + "Package": "clisymbols", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96c01552bfd5661b9bbdefbc762f4bcd" + }, + "colorspace": { + "Package": "colorspace", + "Version": "1.4-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6b436e95723d1f0e861224dd9b094dfb" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0f22be39ec1d141fd03683c06f3a6e67" + }, + "covr": { + "Package": "covr", + "Version": "3.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cbc6df1ef6ee576f844f973c1fc04ab4" + }, + "crayon": { + "Package": "crayon", + "Version": "1.3.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0d57bc8e27b7ba9e45dba825ebc0de6b" + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ae55f5d7c02f0ab43c58dd050694f2b4" + }, + "crul": { + "Package": "crul", + "Version": "0.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ca47c792e03fdc1a73cb4cf4a1b0aa86" + }, + "curl": { + "Package": "curl", + "Version": "4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2b7d10581cc730804e9ed178c8374bd6" + }, + "data.table": { + "Package": "data.table", + "Version": "1.12.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cd711af60c47207a776213a368626369" + }, + "dbplyr": { + "Package": "dbplyr", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "022c8630abecb00f22740d021ab89595" + }, + "desc": { + "Package": "desc", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6c8fe8fa26a23b79949375d372c7b395" + }, + "devtools": { + "Package": "devtools", + "Version": "2.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e12b66f9f6dc41b765b047b4df4b4a38" + }, + "digest": { + "Package": "digest", + "Version": "0.6.25", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f697db7d92b7028c4b3436e9603fb636" + }, + "dplyr": { + "Package": "dplyr", + "Version": "0.8.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "57a42ddf80f429764ff7987128c3fd0a" + }, + "e1071": { + "Package": "e1071", + "Version": "1.7-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "728e85416ffc90743054c1ac04486d69" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7067d90c1c780bfe80c0d497e3d7b49d" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.14", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7" + }, + "fansi": { + "Package": "fansi", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7fce217eaaf8016e72065e85c73027b5" + }, + "farver": { + "Package": "farver", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "dad6793a5a1f73c8e91f1a1e3e834b05" + }, + "forcats": { + "Package": "forcats", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1cb4279e697650f0bd78cd3601ee7576" + }, + "fs": { + "Package": "fs", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "780713bd2f53156fae001443dcdbdcd5" + }, + "generics": { + "Package": "generics", + "Version": "0.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b8cff1d1391fd1ad8b65877f4c7f2e53" + }, + "geoaxe": { + "Package": "geoaxe", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d834a3030f6269ae4267c13d31103055" + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "911561e07da928345f1ae2d69f97f3ea" + }, + "gh": { + "Package": "gh", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "89ea5998938d1ad55f035c8a86f96b74" + }, + "git2r": { + "Package": "git2r", + "Version": "0.26.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "135db4dbc94ed18f629ff8843a8064b7" + }, + "git2rdata": { + "Package": "git2rdata", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bf2d93f0e7af2f7b0017d3718efbbaf6" + }, + "glue": { + "Package": "glue", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2aefa994e8df5da17dc09afd80f924d5" + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7d7f283939f563670a697165b2cf5560" + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ac5c6baf7822ce8732b343f14c072c4d" + }, + "haven": { + "Package": "haven", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e3f662e125e9fdffd1ee4e94baea3451" + }, + "highr": { + "Package": "highr", + "Version": "0.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4dc5bb88961e347a0f4d8aad597cbfac" + }, + "hms": { + "Package": "hms", + "Version": "0.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "726671f634529d470545f9fd1a9d1869" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2d7691222f82f41e93f6d30f169bd5e1" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "41bace23583fbc25089edae324de2dc3" + }, + "httpcode": { + "Package": "httpcode", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "221d12f5ee446b4d6691f52f081c8740" + }, + "httr": { + "Package": "httr", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7146fea4685b4252ebf478978c75f597" + }, + "inborutils": { + "Package": "inborutils", + "Version": "0.1.0.9072", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "inborutils", + "RemoteUsername": "inbo", + "RemoteRef": "master", + "RemoteSha": "8948feca56bf3da42f21b98e5185cf298eeca393", + "Hash": "f66a7a1d97d18eba7913041307b2890e" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "15f6d57a664cd953a31ae4ea61e5e60e" + }, + "iterators": { + "Package": "iterators", + "Version": "1.0.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "117128f48662573ff4c4e72608b9e202" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "84b0ee361e2f78d6b7d670db9471c0c5" + }, + "knitr": { + "Package": "knitr", + "Version": "1.28", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "915a6f0134cdbdf016d7778bc80b2eda" + }, + "labeling": { + "Package": "labeling", + "Version": "0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "73832978c1de350df58108c745ed0e3e" + }, + "later": { + "Package": "later", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6d927978fc658d24175ce37db635f9e5" + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-41", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fbd9285028b0263d76d18c95ae51a53d" + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + }, + "leaflet": { + "Package": "leaflet", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3f3f5e5603fc791dfb77279ad84cc711" + }, + "leaflet.providers": { + "Package": "leaflet.providers", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d3082a7beac4a1aeb96100ff06265d7e" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "361811f31f71f8a617a9a68bf63f1f42" + }, + "lubridate": { + "Package": "lubridate", + "Version": "1.7.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6c04c31012c1be39783bebbbfc27b3a3" + }, + "magrittr": { + "Package": "magrittr", + "Version": "1.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1bb58822a20301cee84a41678e25d9b7" + }, + "markdown": { + "Package": "markdown", + "Version": "1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "61e4a10781dd00d7d81dd06ca9b94e95" + }, + "memoise": { + "Package": "memoise", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "58baa74e4603fcfb9a94401c58c8f9b1" + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-31", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4bb7e0c4f3557583e1e8d3c9ffb8ba5c" + }, + "mime": { + "Package": "mime", + "Version": "0.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e87a35ec73b157552814869f45a63aa3" + }, + "modelr": { + "Package": "modelr", + "Version": "0.1.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "30a2db10e829133fa0a1e6eaed25bc73" + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6dfe8bf774944bd5595785e3229d8771" + }, + "n2khab": { + "Package": "n2khab", + "Version": "0.1.2.9000", + "Source": "GitHub", + "Remotes": "inbo/inborutils", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "n2khab", + "RemoteUsername": "inbo", + "RemoteRef": "read_soilmap", + "RemoteSha": "1a4423179974fe974bb35c3eb2cc6bdf1ed9694a", + "Hash": "95842570a8d3a15a2629ae885c5a4b07" + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-145", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0ed9365684dc39cdd0bb5bd2f316dc67" + }, + "oai": { + "Package": "oai", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "63c0f176b5f965a7ad0742154f978ffb" + }, + "odbc": { + "Package": "odbc", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e76003d15ae8638ccde579dc69bb76e1" + }, + "openssl": { + "Package": "openssl", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "49f7258fd86ebeaea1df24d9ded00478" + }, + "pander": { + "Package": "pander", + "Version": "0.6.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "121198ce37b5a6b5227edc5a38223da4" + }, + "pillar": { + "Package": "pillar", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fa3ed60396b6998d0427c57dab90fba4" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "899835dfe286963471cbdb9591f8f94f" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5e655fb54cceead0f095f22d7be33da3" + }, + "plogr": { + "Package": "plogr", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "09eb987710984fc2905c7129c7d85e65" + }, + "plyr": { + "Package": "plyr", + "Version": "1.8.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ec0e5ab4e5f851f6ef32cd1d1984957f" + }, + "png": { + "Package": "png", + "Version": "0.1-7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "03b7076c234cb3331288919983326c55" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" + }, + "processx": { + "Package": "processx", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "20a082f2bde0ffcd8755779fd476a274" + }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, + "promises": { + "Package": "promises", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "efbbe62da4709f7040a380c702bc7103" + }, + "ps": { + "Package": "ps", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "98777535b61c57d1749344345e2a4ccd" + }, + "purrr": { + "Package": "purrr", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "22aca7d1181718e927d403a8c2d69d62" + }, + "raster": { + "Package": "raster", + "Version": "3.0-12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "019d5fc373bec143779d33bfb88757d1" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ed95895886dab6d2a584da45503555da" + }, + "readr": { + "Package": "readr", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "af8ab99cd936773a148963905736907b" + }, + "readxl": { + "Package": "readxl", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "63537c483c2dbec8d9e3183b3735254a" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, + "remotes": { + "Package": "remotes", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "57c3009534f805f0f6476ffee68483cc" + }, + "renv": { + "Package": "renv", + "Version": "0.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c1a367437d8a8a44bec4b9d4974cb20c" + }, + "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", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6d3dbb5d528c8f726861018472bc668c" + }, + "rgbif": { + "Package": "rgbif", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "63fabf159a69e2a6abaf06b737f452f3" + }, + "rgdal": { + "Package": "rgdal", + "Version": "1.4-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a60887cdff80ba8a4b34a624b281b448" + }, + "rgeos": { + "Package": "rgeos", + "Version": "0.5-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "dc2f6aa3dcc81a47fee312acd9afa2b0" + }, + "rlang": { + "Package": "rlang", + "Version": "0.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1cc1b38e4db40ea6eb19ab8080bbed3b" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9d1c61d476c448350c482d6664e1b28b" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f173062c04dc8e91d7376d914df6efee" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "1.3-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f6a407ae5dd21f6f80a6708bbb6eb3ae" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "33a5b27a03da82ac4b1d43268f80088a" + }, + "rversions": { + "Package": "rversions", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2aa84e83767ba93ee6415b439fa981d2" + }, + "rvest": { + "Package": "rvest", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6a20c2cdf133ebc7ac45888c9ccc052b" + }, + "scales": { + "Package": "scales", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a1c68369c629ea3188d0676e37069c65" + }, + "selectr": { + "Package": "selectr", + "Version": "0.4-2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3838071b66e0c566d55cc26bd6e27bf4" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "308013098befe37484df72c39cf90d6e" + }, + "sf": { + "Package": "sf", + "Version": "0.9-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0430b761b66cb71f6e14826dc6347ba2" + }, + "sp": { + "Package": "sp", + "Version": "1.4-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a44a3cebab900c0f77e16804f361468e" + }, + "stringi": { + "Package": "stringi", + "Version": "1.4.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e99d8d656980d2dd416a962ae55aec90" + }, + "stringr": { + "Package": "stringr", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0759e6b6c0957edb1311028a49a35e76" + }, + "sys": { + "Package": "sys", + "Version": "3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "507f3116a38d37ad330a038b3be07b66" + }, + "testthat": { + "Package": "testthat", + "Version": "2.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0829b987b8961fb07f3b1b64a2fbc495" + }, + "tibble": { + "Package": "tibble", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e742bc8d72071ef9aba29f71f132d773" + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fb73a010ace00d6c584c2b53a21b969c" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7d4b0f1ab542d8cb7a40c593a4de2f36" + }, + "tidyverse": { + "Package": "tidyverse", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bd51be662f359fa99021f3d51e911490" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.21", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "02e11a2e5d05f1d5ab19394f19ab2999" + }, + "triebeard": { + "Package": "triebeard", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "847a9d113b78baca4a9a8639609ea228" + }, + "units": { + "Package": "units", + "Version": "0.6-6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "687aa5dfc4ec01ad4da86862a7e6a05b" + }, + "urltools": { + "Package": "urltools", + "Version": "1.7.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e86a704261a105f4703f653e05defa3e" + }, + "usethis": { + "Package": "usethis", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "30ee6fa315a020d5db6f28adbb7fea83" + }, + "utf8": { + "Package": "utf8", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4a5081acfb7b81a572e4384a7aaf2af1" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6c839a149a30cb4ffc70443efa74c197" + }, + "viridis": { + "Package": "viridis", + "Version": "0.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6f6b49e5b3b5ee5a6d0c28bf1b4b9eb3" + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ce4f6271baa94776db692f1cb2055bee" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ca970b96d894e90397ed20637a0c1bbe" + }, + "wicket": { + "Package": "wicket", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d50bba76a2e61d52c6195e8993ec14be" + }, + "withr": { + "Package": "withr", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa57ed55ff2df4bea697a07df528993d" + }, + "xfun": { + "Package": "xfun", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ccd8453a7b9e380628f6cd2862e46cad" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "921dce7c0ec595ed85e77683d3e6c8b6" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6c85f015dee9cc7710ddd20f86881f58" + }, + "yaml": { + "Package": "yaml", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2826c5d9efb0a88f657c7a679c7106db" + } + } +} diff --git a/src/generate_soilmap_simple/renv/.gitignore b/src/generate_soilmap_simple/renv/.gitignore new file mode 100644 index 0000000..82740ba --- /dev/null +++ b/src/generate_soilmap_simple/renv/.gitignore @@ -0,0 +1,3 @@ +library/ +python/ +staging/ diff --git a/src/generate_soilmap_simple/renv/activate.R b/src/generate_soilmap_simple/renv/activate.R new file mode 100644 index 0000000..4baa934 --- /dev/null +++ b/src/generate_soilmap_simple/renv/activate.R @@ -0,0 +1,185 @@ + +local({ + + # the requested version of renv + version <- "0.9.3" + + # avoid recursion + if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA))) + return(invisible(TRUE)) + + # signal that we're loading renv during R startup + Sys.setenv("RENV_R_INITIALIZING" = "true") + on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), add = TRUE) + + # signal that we've consented to use renv + options(renv.consent = TRUE) + + # load the 'utils' package eagerly -- this ensures that renv shims, which + # mask 'utils' packages, will come first on the search path + library(utils, lib.loc = .Library) + + # check to see if renv has already been loaded + if ("renv" %in% loadedNamespaces()) { + + # if renv has already been loaded, and it's the requested version of renv, + # nothing to do + spec <- .getNamespaceInfo(.getNamespace("renv"), "spec") + if (identical(spec[["version"]], version)) + return(invisible(TRUE)) + + # otherwise, unload and attempt to load the correct version of renv + unloadNamespace("renv") + + } + + # 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" + ) + + msg <- sprintf(fmt, loadedversion, version, remote) + warning(msg, call. = FALSE) + + } + + # load the project + return(renv::load()) + + } + + # 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) + + # prepare download options + pat <- Sys.getenv("GITHUB_PAT") + if (nzchar(Sys.which("curl")) && nzchar(pat)) { + fmt <- "--location --fail --header \"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + options(download.file.method = "curl", download.file.extra = extra) + on.exit(do.call(base::options, saved), add = TRUE) + } else if (nzchar(Sys.which("wget")) && nzchar(pat)) { + fmt <- "--header=\"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + 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) + } + } + + # 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!") + + # attempt to install it into project library + message("* Installing renv ", version, " ... ", appendLF = FALSE) + dir.create(libpath, 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)) + 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) + writeLines(text, con = stderr()) + } + + + } + + try(install_renv()) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + message("Successfully installed and loaded renv ", version, ".") + return(renv::load()) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + +}) diff --git a/src/generate_soilmap_simple/renv/settings.dcf b/src/generate_soilmap_simple/renv/settings.dcf new file mode 100644 index 0000000..bba46f4 --- /dev/null +++ b/src/generate_soilmap_simple/renv/settings.dcf @@ -0,0 +1,6 @@ +external.libraries: +ignored.packages: +package.dependency.fields: Imports, Depends, LinkingTo +snapshot.type: packrat +use.cache: TRUE +vcs.ignore.library: TRUE