From a9a87c242283cdff4ff0879721f51355cd879e0c Mon Sep 17 00:00:00 2001 From: Jindra Lacko Date: Sun, 29 Oct 2023 08:18:22 +0100 Subject: [PATCH] 40 historical shapefiles (#82) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * link to raw RUIAN for admin data / resolves #77 * download links for zip codes & KFME grid / relates #77 * pkgdown - prepare for future deployment * cleaner silnice * sidestep the pesky mbcsToSbcs failure * that pesky unicode! * a more colorful plot of kraje * align ozymandias and dockerfile * + přfuk confirmation * internals of the world, unite! * helper functions created * update docs for new internals * historie in principle working / relates #40 * resolve CI fails on R-devel * yet another shot at a clean workflow run * unicode gets no respect * shorter title for clarity * update docs of history() * historie in tests / relates #40 * resolve vignette warning * date for release 1.12.0 set to 2023-10-29 --- .Rbuildignore | 3 + .gitignore | 1 + DESCRIPTION | 12 +-- NAMESPACE | 1 + NEWS.md | 10 ++- R/KFME_grid.R | 4 +- R/casti.R | 4 +- R/downloader.R | 40 ---------- R/geomorfo.R | 11 +++ R/helpers.R | 36 +++++++++ R/historie.R | 67 ++++++++++++++++ R/internals.R | 95 +++++++++++++++++++++++ R/kraje.R | 17 +++- R/obce_body.R | 2 + R/obce_polygony.R | 2 + R/ok_to_proceed.R | 45 ----------- R/okresy.R | 2 + R/orp_polygony.R | 2 + R/republika.R | 2 + R/revgeo.R | 2 + R/silnice.R | 11 ++- R/vyskopis.R | 4 +- R/zip_codes.R | 2 + _pkgdown.yml | 4 + data-raw/Dockerfile | 5 +- "data-raw/confirmation P\305\230FUK.pdf" | Bin 0 -> 36145 bytes data-raw/run_ozymandias.sh | 2 +- man/KFME_grid.Rd | 4 +- man/casti.Rd | 4 +- man/dot-downloader.Rd | 2 +- man/dot-ok_to_proceed.Rd | 2 +- man/geomorfo.Rd | 12 +++ man/historie.Rd | 65 ++++++++++++++++ man/kraje.Rd | 17 +++- man/obce_body.Rd | 2 + man/obce_polygony.Rd | 2 + man/okresy.Rd | 2 + man/orp_polygony.Rd | 2 + man/republika.Rd | 2 + man/revgeo.Rd | 2 + man/set_home.Rd | 22 ++++++ man/silnice.Rd | 10 ++- man/unset_home.Rd | 14 ++++ man/vyskopis.Rd | 4 +- man/zip_codes.Rd | 2 + tests/testthat/test-1-historie.R | 80 +++++++++++++++++++ vignettes/vignette.Rmd | 2 +- 47 files changed, 524 insertions(+), 114 deletions(-) delete mode 100644 R/downloader.R create mode 100644 R/helpers.R create mode 100644 R/historie.R create mode 100644 R/internals.R delete mode 100644 R/ok_to_proceed.R create mode 100644 _pkgdown.yml create mode 100644 "data-raw/confirmation P\305\230FUK.pdf" create mode 100644 man/historie.Rd create mode 100644 man/set_home.Rd create mode 100644 man/unset_home.Rd create mode 100644 tests/testthat/test-1-historie.R diff --git a/.Rbuildignore b/.Rbuildignore index c0679c7..6de7dc8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -16,3 +16,6 @@ vignette\.Rmd\.orig ^LICENSE\.md$ ^CONTRIBUTING\.md$ ^CITATION\.cff$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.gitignore b/.gitignore index 847eaa4..e366eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ inst/doc /data-raw/eu_dem* /joss-paper/*.pdf *.log +docs diff --git a/DESCRIPTION b/DESCRIPTION index ac0a65e..2c642f6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,16 +1,18 @@ Package: RCzechia Type: Package Title: Spatial Objects of the Czech Republic -Version: 1.11.2.999999999 -Date: 2023-XX-XX +Version: 1.12.0 +Date: 2023-10-29 Authors@R: c( person("Jindra", "Lacko", , "jindra.lacko@gmail.com", role = c("aut", "cre"), - comment = c(ORCID = "0000-0002-0375-5156")), + comment = c(ORCID = "0000-0002-0375-5156")), person("Nick", "Bearman", role = "rev", - comment = "Nick reviewed the package for JOSS, providing helpful comments leading to significant improvement of the package.")) + comment = c(ORCID = "0000-0002-8396-4061", + "Nick reviewed the package for JOSS, providing helpful comments leading to significant improvement of the package.")) + ) Maintainer: Jindra Lacko Description: Administrative regions and other spatial objects of the Czech Republic. -URL: https://github.com/jlacko/RCzechia +URL: https://rczechia.jla-data.net BugReports: https://github.com/jlacko/RCzechia/issues License: MIT + file LICENSE Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index 9546c4b..db5dd0c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -5,6 +5,7 @@ export(casti) export(chr_uzemi) export(geocode) export(geomorfo) +export(historie) export(kraje) export(lesy) export(obce_body) diff --git a/NEWS.md b/NEWS.md index 51e1c0e..d1ab5b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ -## version 1.11.2 (2023-XX-XX) +## version 1.12.0 (2023-10-29) + + - [!] introduced an option for persistent local caching via setting the `RCZECHIA_HOME` environment variable; this has to be set manually - either directly or via a set_home() function call + + - added history() function providing historical admin areas, together with census data - - updated documentation for the geomorfo function + - updated documentation for the geomorfo() function + + - introduced pkgdown documentation on https://rczechia.jla-data.net ## version 1.11.1 (2023-03-04) diff --git a/R/KFME_grid.R b/R/KFME_grid.R index 11e3805..6fe1309 100644 --- a/R/KFME_grid.R +++ b/R/KFME_grid.R @@ -2,7 +2,9 @@ #' #' Function returning grid covering the Czech Republic according to the Kartierung der Flora Mitteleuropas methodology. #' -#' The function returns a {sf} data frame of grid cells. Depending on the value of parameter `resolution` either low resolution (26×42 cells - default) with labels in 4 digit format (e.g. Hrčava = 6479) or high resolution (104×168 cells) with labels in 4 digit + 1 letter format (e.g Hrčava = 6479c). +#' The function returns a `sf` data frame of grid cells. Depending on the value of parameter `resolution` either low resolution (26×42 cells - default) with labels in 4 digit format (e.g. Hrčava = 6479) or high resolution (104×168 cells) with labels in 4 digit + 1 letter format (e.g Hrčava = 6479c). +#' +#' Raw version of the dataset is available for download for use in non-R setting on . #' #' @param resolution Should the function return high or low resolution shapefile? Allowed values are "low" and "high". Default is "low". #' diff --git a/R/casti.R b/R/casti.R index e38234a..446e6bb 100644 --- a/R/casti.R +++ b/R/casti.R @@ -1,9 +1,11 @@ -#' City Parts +#' City Districts #' #' Function taking no parameters and returning data frame of districts of Prague and other major cities as `sf` polygons. #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021. Downloaded size is 1.5 MB. #' #' diff --git a/R/downloader.R b/R/downloader.R deleted file mode 100644 index e7416ee..0000000 --- a/R/downloader.R +++ /dev/null @@ -1,40 +0,0 @@ -#' Internal function - generic downloader, used to serve the rds files from S3 -#' -#' The function utilizes environment variable RCZECHIA_MIRROR as a mirror location of remote files; to configure an alternative (possibly local) repository use `Sys.setenv("RCZECHIA_MIRROR" = "file:///someplace/local")` -#' -#' @param file file to be downloaded (or not...) from S3 -#' @keywords internal - -.downloader <- function(file) { - network <- as.logical(Sys.getenv("NETWORK_UP", unset = TRUE)) # dummy variable to allow testing of network - - remote_path <- Sys.getenv("RCZECHIA_MIRROR", unset = "https://rczechia.jla-data.net/") # remote archive - - remote_file <- paste0(remote_path, file) # path to AWS S3 - local_file <- file.path(tempdir(), file) # local file - in tempdir - - if (file.exists(local_file)) { - message("RCzechia: using temporary local dataset.") - } else { - if (!.ok_to_proceed(remote_file) | !network) { # network is down -# message("No internet connection.") - return(NULL) - } - - # proceed to download via curl - message("RCzechia: downloading remote dataset.") - curl::curl_download(url = remote_file, - destfile = local_file, - quiet = F) - } # /if - local file exists - - # everything except rasters - if(tools::file_ext(local_file) == "rds") local_df <- readRDS(local_file) - - # rasters, and rasters only - if(tools::file_ext(local_file) == "tif") local_df <- terra::rast(local_file) - - # serve the result back - local_df - -} # /function diff --git a/R/geomorfo.R b/R/geomorfo.R index f320c19..f03800b 100644 --- a/R/geomorfo.R +++ b/R/geomorfo.R @@ -23,6 +23,17 @@ #' #' @source CENIA / INSPIRE, via Mgr. Vojtěch Blažek, Ph.D. #' +#' @examples +#' +#' \donttest{ +#' library(sf) +#' +#' soustavy <- RCzechia::geomorfo("subprovincie") +#' +#' plot(soustavy["kod"]) +#' +#' } +#' #' @export geomorfo <- function(level) { diff --git a/R/helpers.R b/R/helpers.R new file mode 100644 index 0000000..dccbb05 --- /dev/null +++ b/R/helpers.R @@ -0,0 +1,36 @@ +#' Set the local cache directory +#' +#' The function sets the environment variable RCZECHIA_HOME to be used as a local cache for RCzechia remote files; if unset tempdir() is used instead, with persistence for current session only. +#' +#' Note that when set (it is unset by default) the remote files will be cached to local file system and persist between R sessions, for good or bad. +#' +#' Also note that you can set the value of RCZECHIA_HOME environment variable directly, either via a \code{Sys.setenv()} call or via your \code{.Renviron} file. +#' +#' @param path file to be downloaded (or not...) from S3 +#' +#' @return TRUE for success and FALSE for failure; returned silently + +set_home <- function(path) { + + if(file.access(path, mode = 2) == 0) { + Sys.setenv("RCZECHIA_HOME" = path) + invisible(TRUE) + } else { + warning("'path' not found or not writeable; default will be used instead") + invisible(FALSE) + } + +} + +#' Unset the local cache directory +#' +#' The function unsets the environment variable RCZECHIA_HOME, meaning tempdir() will be used in future function calls, and no persistent data will be stored locally. +#' +#' @return TRUE for success and FALSE for failure; returned silently + +unset_home <- function() { + + Sys.unsetenv("RCZECHIA_HOME") + invisible(TRUE) + +} diff --git a/R/historie.R b/R/historie.R new file mode 100644 index 0000000..33386b6 --- /dev/null +++ b/R/historie.R @@ -0,0 +1,67 @@ +#' Historical censuses of the Czech Republic +#' +#' Function returning historical admin areas of the Czech Republic, together with relevant census data as specified by parameter **era**. +#' +#' The census data structure is too complex to fully list here; most of the fields are self documenting (for Czech speakers) - and when in doubt please consult the original metadata at , or the original journal article at . +#' +#' Of notable interest is the 1930 census, which was the last before WWII - and thus the last one to include Czechoslovak citizens of German ethnicity. +#' +#' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +#' +#' +#' @param era a historical era of interest. +#' +#' @return `sf` data frame with historical admin area names & census data + geometry; namely: +#' +#' \describe{ +#' \item{okresy_1921}{soudní okresy + census 1921; 328 rows / 92 columns + geometry} +#' \item{okresy_1930}{soudní okresy + census 1931; 330 rows / 90 columns + geometry} +#' \item{okresy_1947}{politické okresy + census 1947; 162 rows / 16 columns + geometry} +#' \item{okresy_1950}{správní okresy + census 1950; 193 rows / 57 columns + geometry} +#' \item{okresy_1961}{správní okresy + census 1960; 76 rows / 105 columns + geometry} +#' \item{okresy_1970}{správní okresy + census 1970; 76 rows / 144 columns + geometry} +#' \item{okresy_1980}{správní okresy + census 1980; 76 rows / 148 columns + geometry} +#' \item{okresy_1991}{správní okresy + census 1991; 76 rows / 155 columns + geometry} +#' \item{okresy_2001}{správní okresy + census 2001; 77 rows / 174 columns + geometry} +#' \item{okresy_2011}{správní okresy + census 2011; 77 rows / 176 columns + geometry} +#' \item{kraje_1950}{kraje + census 1950; 13 rows / 55 columns + geometry} +#' \item{kraje_1961}{kraje + census 1960; 8 rows / 103 columns + geometry} +#' \item{kraje_1970}{kraje + census 1970; 8 rows / 144 columns + geometry} +#' \item{kraje_1980}{kraje + census 1980; 8 rows / 146 columns + geometry} +#' \item{kraje_1991}{kraje + census 1991; 8 rows / 153 columns + geometry} +#' \item{kraje_2001}{kraje + census 2001; 14 rows / 172 columns + geometry} +#' \item{kraje_2011}{kraje + census 2011; 14 rows / 174 columns + geometry} +#' } +#' +#' Credits: +#' 1) „Tento výstup vznikl v rámci řešení projektu číslo DF12P01OVV033 Zpřístupnění historických prostorových a statistických dat v prostředí GIS řešeného v rámci programu Aplikovaného výzkumu a vývoje národní a kulturní identity (NAKI), jehož poskytovatel je Ministerstvo kultury České republiky.“ +#' 2) „JÍCHOVÁ, J., SOUKUP, M., NEMEŠKAL, J., OUŘEDNÍČEK, M., POSPÍŠILOVÁ, L., SVOBODA, P., ŠPAČKOVÁ, P. a kol. (2014): Geodatabáze historických statistických a prostorových dat Česka ze Sčítání lidu, domů a bytů 1921−2011. Urbánní a regionální laboratoř, Přírodovědecká fakulta Univerzity Karlovy v Praze, Praha.“ +#' +#' @source Urbánní a regionální laboratoř (UrRlab) působící na katedře sociální geografie a regionálního rozvoje Přírodovědecké fakulty Univerzity Karlovy v Praze +#' +#' @examples +#' +#' \donttest{ +#' library(sf) +#' +#' pre_war <- RCzechia::historie("okresy_1930") +#' +#' plot(pre_war[, 47], main = "Residents of German ethnicity") +#' +#' } +#' +#' @export + +historie <- function(era) { + + if(missing(era)) { + stop("historical era is an obligatory parameter!") + } + + if (!is.element(era, c("okresy_1921", "okresy_1930", "okresy_1947", "okresy_1950", "okresy_1961", "okresy_1970", "okresy_1980", "okresy_1991", "okresy_2001", "okresy_2011", "kraje_1950", "kraje_1961", "kraje_1970", "kraje_1980", "kraje_1991", "kraje_2001", "kraje_2011"))) { + stop(paste(era, "is not a valid historical era!")) + } + + result <- .downloader(paste0("history_", era, ".rds")) + result +} diff --git a/R/internals.R b/R/internals.R new file mode 100644 index 0000000..3954d97 --- /dev/null +++ b/R/internals.R @@ -0,0 +1,95 @@ +#' Internal function - generic downloader, used to serve the rds files from S3 +#' +#' The function utilizes environment variable RCZECHIA_MIRROR as a mirror location of remote files; to configure an alternative (possibly local) repository use `Sys.setenv("RCZECHIA_MIRROR" = "file:///someplace/local")` +#' +#' @param file file to be downloaded (or not...) from S3 +#' @keywords internal + +.downloader <- function(file) { + network <- as.logical(Sys.getenv("NETWORK_UP", unset = TRUE)) # dummy variable to allow testing of network + remote_path <- Sys.getenv("RCZECHIA_MIRROR", unset = "https://rczechia.jla-data.net/") # remote archive + local_dir <- Sys.getenv("RCZECHIA_HOME", unset = tempdir()) # local cache directory - or tempdir if unset + + remote_file <- paste0(remote_path, file) # path to AWS S3 + local_file <- file.path(local_dir, file) # local file - in tempdir, or local cache if set + + if (file.exists(local_file) & network) { + message(paste("RCzechia: using dataset stored locally in", local_dir)) + } else { + if (!.ok_to_proceed(remote_file) | !network) { # network is down +# message("No internet connection.") + return(NULL) + } + + # proceed to download via curl + message("RCzechia: downloading remote dataset.") + curl::curl_download(url = remote_file, + destfile = local_file, + quiet = F) + } # /if - local file exists + + # everything except rasters + if(tools::file_ext(local_file) == "rds") local_df <- readRDS(local_file) + + # rasters, and rasters only + if(tools::file_ext(local_file) == "tif") local_df <- terra::rast(local_file) + + # serve the result back + local_df + +} # /function + +#' Internal function - tests availability of internet resources +#' +#' @param remote_file resource to be tested +#' @keywords internal + +.ok_to_proceed <- function(remote_file) { + + # local files are OK to proceed by definiton + if (grepl("file:///", remote_file)) return(TRUE) + + # remote files require testing + try_head <- function(x, ...) { + tryCatch( + httr::HEAD(url = x, httr::timeout(10), ...), + error = function(e) conditionMessage(e), + warning = function(w) conditionMessage(w) + ) + } + + is_response <- function(x) { + class(x) == "response" + } + + network <- as.logical(Sys.getenv("NETWORK_UP", unset = TRUE)) # dummy variable to allow testing of network + + # First check internet connection + if (!curl::has_internet() | !network) { + message("No internet connection.") + return(FALSE) + } + # Then try for timeout problems + resp <- try_head(remote_file) + if (!is_response(resp)) { + message("Timeout reached; external data source likely broken.") + return(FALSE) + } + # Then stop if status > 400 + if (httr::http_error(resp)) { + message("Data source broken.") + return(FALSE) + } + + # safe to proceed + TRUE +} + +# check the environment variable & report back + +.onAttach <- function(libname, pkgname) { + + home <- Sys.getenv("RCZECHIA_HOME") + + if(home != "") packageStartupMessage("Using local RCzechia cache at ", home, appendLF = TRUE) +} diff --git a/R/kraje.R b/R/kraje.R index c73409c..fef1594 100644 --- a/R/kraje.R +++ b/R/kraje.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size of high resolution shapefile is <1 MB. #' #' @param resolution Should the function return high or low resolution shapefile? Allowed values are "high" (default) and "low". This parameter affects only the geometry column, all other fields remain the same. @@ -21,8 +23,19 @@ #' @examples #' library(sf) #' -#' hranice <- kraje("low") -#' plot(hranice, col = "white", max.plot = 1) +#' colors <- rainbow(14) # legend colors +#' +#' hranice <- RCzechia::kraje("low") +#' +#' plot(hranice["KOD_CZNUTS3"], +#' col = colors, +#' main = "Czech Regions", +#' xlim = st_bbox(hranice)[c(1, 3)] * c(1, 1.1)) +#' +#' legend("right", +#' hranice$KOD_CZNUTS3, +#' fill = colors, +#' bty = "n") #' #' @export diff --git a/R/obce_body.R b/R/obce_body.R index 13cd1fc..57dc9b3 100644 --- a/R/obce_body.R +++ b/R/obce_body.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is <1 MB. #' #' @return `sf` data frame with 6.258 rows of 14 variables + geometry diff --git a/R/obce_polygony.R b/R/obce_polygony.R index 88f6b8f..87a5205 100644 --- a/R/obce_polygony.R +++ b/R/obce_polygony.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is 13.3 MB (so use with caution, and patience). #' #' @return `sf` data frame with 6.258 rows of 14 variables + geometry diff --git a/R/ok_to_proceed.R b/R/ok_to_proceed.R deleted file mode 100644 index 4780720..0000000 --- a/R/ok_to_proceed.R +++ /dev/null @@ -1,45 +0,0 @@ -#' Internal function - tests availability of internet resources -#' -#' @param remote_file resource to be tested -#' @keywords internal - -.ok_to_proceed <- function(remote_file) { - - # local files are OK to proceed by definiton - if (grepl("file:///", remote_file)) return(TRUE) - - # remote files require testing - try_head <- function(x, ...) { - tryCatch( - httr::HEAD(url = x, httr::timeout(10), ...), - error = function(e) conditionMessage(e), - warning = function(w) conditionMessage(w) - ) - } - - is_response <- function(x) { - class(x) == "response" - } - - network <- as.logical(Sys.getenv("NETWORK_UP", unset = TRUE)) # dummy variable to allow testing of network - - # First check internet connection - if (!curl::has_internet() | !network) { - message("No internet connection.") - return(FALSE) - } - # Then try for timeout problems - resp <- try_head(remote_file) - if (!is_response(resp)) { - message("Timeout reached; external data source likely broken.") - return(FALSE) - } - # Then stop if status > 400 - if (httr::http_error(resp)) { - message("Data source broken.") - return(FALSE) - } - - # safe to proceed - TRUE -} diff --git a/R/okresy.R b/R/okresy.R index 82e53ab..99c217c 100644 --- a/R/okresy.R +++ b/R/okresy.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size of high resolution shapefile 2.1 MB. #' #' @param resolution Should the function return high or low resolution shapefile? Allowed values are "high" (default) and "low". This parameter affects only the geometry column, all other fields remain the same. diff --git a/R/orp_polygony.R b/R/orp_polygony.R index 1c521e3..7ce4c3a 100644 --- a/R/orp_polygony.R +++ b/R/orp_polygony.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is 3.1 MB. #' #' @return `sf` data frame with 206 rows of 5 variables + geometry diff --git a/R/republika.R b/R/republika.R index f1f9763..a8b9471 100644 --- a/R/republika.R +++ b/R/republika.R @@ -4,6 +4,8 @@ #' #' Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). #' +#' The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on (in Czech only). +#' #' The data is current to June 2021. Downloaded size of high resolution shapefile is <1 MB. #' #' @param resolution Should the function return high or low resolution shapefile? Allowed values are "high" (default) and "low". This parameter affects only the geometry column, all other fields remain the same. diff --git a/R/revgeo.R b/R/revgeo.R index 3b8d2f2..bd7df39 100644 --- a/R/revgeo.R +++ b/R/revgeo.R @@ -36,6 +36,8 @@ #' pupek_brna <- st_centroid(brno) # calculate centroid #' #' adresa_pupku <- revgeo(pupek_brna)$revgeocoded # address of the center +#' +#' print(adresa_pupku) #' } #' @export diff --git a/R/silnice.R b/R/silnice.R index 0c9bd43..cb32aeb 100644 --- a/R/silnice.R +++ b/R/silnice.R @@ -9,7 +9,15 @@ #' @return `sf` data frame with 59.594 rows of 3 variables + geometry: #' #' \describe{ -#' \item{TRIDA}{Class of the road: highway = dálnice, speedway = rychlostní silnice, 1st class road = silnice I. třídy, 2nd class road = silnice II. třídy, 3rd class road = silnice III. třídy, other road = neevidovaná silnice} +#' \item{TRIDA}{Class of the road:} +#' \itemize{ +#' \item highway = dálnice, +#' \item speedway = rychlostní silnice, +#' \item 1st class road = silnice I. třídy, +#' \item 2nd class road = silnice II. třídy, +#' \item 3rd class road = silnice III. třídy, +#' \item other road = neevidovaná silnice +#' } #' \item{CISLO_SILNICE}{Local road code} #' \item{MEZINARODNI_OZNACENI}{International road code} #' } @@ -17,6 +25,7 @@ #' @source Mapový podklad – Data200, 2021 © Český úřad zeměměřický a katastrální. #' #' @export +#' @md silnice <- function() { result <- .downloader("Silnice-D200-2021-07.rds") diff --git a/R/vyskopis.R b/R/vyskopis.R index 3e8ef2a..3ac2296 100644 --- a/R/vyskopis.R +++ b/R/vyskopis.R @@ -1,8 +1,8 @@ #' Vyskopis #' -#' Terrain of the Czech Republic as a {terra} package object. +#' Terrain of the Czech Republic as a `terra` package object. #' -#' The function returns a raster file of either actual terrain (values are meters above sea level) or rayshaded relief.. +#' The function returns a raster file of either actual terrain (values are meters above sea level) or rayshaded relief. #' #' The raster is created from EU DEM 1.1 file by Copernicus Land Monitoring service. The original file has pixel resolution 25×25 meters, which is too detailed for purposes of the package and was downsampled by factor of 4. #' diff --git a/R/zip_codes.R b/R/zip_codes.R index 4342092..ec7ae6f 100644 --- a/R/zip_codes.R +++ b/R/zip_codes.R @@ -10,6 +10,8 @@ #' #' The data is current to February 2021 (last update was in January 2020). Downloaded size of high resolution shapefile is 45 MB, size of the low res object is 2 MB. #' +#' Raw version of the dataset is available for download for use in non-R setting on . +#' #' @param resolution Should the function return high or low resolution shapefile? Allowed values are "high" (default) and "low". This parameter affects only the geometry column, all other fields remain the same. #' #' @return `sf` data frame with 2 671 rows of 2 variables + geometry diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..e1d10b7 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://rczechia.jla-data.net +template: + bootstrap: 5 + diff --git a/data-raw/Dockerfile b/data-raw/Dockerfile index fd70e36..81942ab 100644 --- a/data-raw/Dockerfile +++ b/data-raw/Dockerfile @@ -72,7 +72,4 @@ RUN R -e "options(warn=2); install.packages('rlang', repos = 'https://packageman RUN R -e "options(warn=2); install.packages('terra', repos = 'https://packagemanager.rstudio.com/cran/2022-12-01')" # bleeding edge RCzechia, current CRAN (not really frozen in time, but under control) -RUN R -e "install.packages('RCzechia')" - - - +RUN R -e "install.packages('RCzechia')" \ No newline at end of file diff --git "a/data-raw/confirmation P\305\230FUK.pdf" "b/data-raw/confirmation P\305\230FUK.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..f4ac87ce4bc08dbb84c597cf84950e3785497315 GIT binary patch literal 36145 zcmb@u1wb6j(l#6j?!leK-C=PE9y~aNK!D)xF2Mo>cXxO9;O@cQ-QDd2j@)yuy!QVL zD^p$FGhI{NRbBP;l718tp=G3Fg(0mvD87SXWC1V$%(abRxVZuJlDcO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andias.sh @@ -4,7 +4,7 @@ docker run \ -v $(pwd)/../:/home/rstudio/ \ --rm \ -p 8787:8787 \ - ozymandias + ghcr.io/jlacko/rczechia:latest # clean up detritus... rm -rf ../.config diff --git a/man/KFME_grid.Rd b/man/KFME_grid.Rd index 5860a55..f2adf12 100644 --- a/man/KFME_grid.Rd +++ b/man/KFME_grid.Rd @@ -20,7 +20,9 @@ KFME_grid(resolution = "low") Function returning grid covering the Czech Republic according to the Kartierung der Flora Mitteleuropas methodology. } \details{ -The function returns a {sf} data frame of grid cells. Depending on the value of parameter \code{resolution} either low resolution (26×42 cells - default) with labels in 4 digit format (e.g. Hrčava = 6479) or high resolution (104×168 cells) with labels in 4 digit + 1 letter format (e.g Hrčava = 6479c). +The function returns a \code{sf} data frame of grid cells. Depending on the value of parameter \code{resolution} either low resolution (26×42 cells - default) with labels in 4 digit format (e.g. Hrčava = 6479) or high resolution (104×168 cells) with labels in 4 digit + 1 letter format (e.g Hrčava = 6479c). + +Raw version of the dataset is available for download for use in non-R setting on \url{https://rczechia.jla-data.net/kfme_czechia.gpkg}. } \examples{ library(ggplot2) diff --git a/man/casti.Rd b/man/casti.Rd index 20c4983..8c53174 100644 --- a/man/casti.Rd +++ b/man/casti.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/casti.R \name{casti} \alias{casti} -\title{City Parts} +\title{City Districts} \source{ © ČÚZK, 2021 \url{https://vdp.cuzk.cz/} } @@ -25,5 +25,7 @@ Function taking no parameters and returning data frame of districts of Prague an \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021. Downloaded size is 1.5 MB. } diff --git a/man/dot-downloader.Rd b/man/dot-downloader.Rd index cd54cc5..5b75847 100644 --- a/man/dot-downloader.Rd +++ b/man/dot-downloader.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/downloader.R +% Please edit documentation in R/internals.R \name{.downloader} \alias{.downloader} \title{Internal function - generic downloader, used to serve the rds files from S3} diff --git a/man/dot-ok_to_proceed.Rd b/man/dot-ok_to_proceed.Rd index e484915..e4f0092 100644 --- a/man/dot-ok_to_proceed.Rd +++ b/man/dot-ok_to_proceed.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ok_to_proceed.R +% Please edit documentation in R/internals.R \name{.ok_to_proceed} \alias{.ok_to_proceed} \title{Internal function - tests availability of internet resources} diff --git a/man/geomorfo.Rd b/man/geomorfo.Rd index 272b32c..613afd0 100644 --- a/man/geomorfo.Rd +++ b/man/geomorfo.Rd @@ -34,3 +34,15 @@ Due to package size constraints the data are stored externally (and a working in The data is current to 2014 (3rd edition of Demek & Mackovčin's \emph{Zeměpisný lexikon ČR. Hory a nížiny.}) Downloaded size is < 1 MB for any of the hierarchy levels. } +\examples{ + +\donttest{ +library(sf) + +soustavy <- RCzechia::geomorfo("subprovincie") + +plot(soustavy["kod"]) + +} + +} diff --git a/man/historie.Rd b/man/historie.Rd new file mode 100644 index 0000000..14725d3 --- /dev/null +++ b/man/historie.Rd @@ -0,0 +1,65 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/historie.R +\name{historie} +\alias{historie} +\title{Historical censuses of the Czech Republic} +\source{ +Urbánní a regionální laboratoř (UrRlab) působící na katedře sociální geografie a regionálního rozvoje Přírodovědecké fakulty Univerzity Karlovy v Praze \url{https://www.historickygis.cz/} +} +\usage{ +historie(era) +} +\arguments{ +\item{era}{a historical era of interest.} +} +\value{ +\code{sf} data frame with historical admin area names & census data + geometry; namely: + +\describe{ +\item{okresy_1921}{soudní okresy + census 1921; 328 rows / 92 columns + geometry} +\item{okresy_1930}{soudní okresy + census 1931; 330 rows / 90 columns + geometry} +\item{okresy_1947}{politické okresy + census 1947; 162 rows / 16 columns + geometry} +\item{okresy_1950}{správní okresy + census 1950; 193 rows / 57 columns + geometry} +\item{okresy_1961}{správní okresy + census 1960; 76 rows / 105 columns + geometry} +\item{okresy_1970}{správní okresy + census 1970; 76 rows / 144 columns + geometry} +\item{okresy_1980}{správní okresy + census 1980; 76 rows / 148 columns + geometry} +\item{okresy_1991}{správní okresy + census 1991; 76 rows / 155 columns + geometry} +\item{okresy_2001}{správní okresy + census 2001; 77 rows / 174 columns + geometry} +\item{okresy_2011}{správní okresy + census 2011; 77 rows / 176 columns + geometry} +\item{kraje_1950}{kraje + census 1950; 13 rows / 55 columns + geometry} +\item{kraje_1961}{kraje + census 1960; 8 rows / 103 columns + geometry} +\item{kraje_1970}{kraje + census 1970; 8 rows / 144 columns + geometry} +\item{kraje_1980}{kraje + census 1980; 8 rows / 146 columns + geometry} +\item{kraje_1991}{kraje + census 1991; 8 rows / 153 columns + geometry} +\item{kraje_2001}{kraje + census 2001; 14 rows / 172 columns + geometry} +\item{kraje_2011}{kraje + census 2011; 14 rows / 174 columns + geometry} +} + +Credits: +\enumerate{ +\item „Tento výstup vznikl v rámci řešení projektu číslo DF12P01OVV033 Zpřístupnění historických prostorových a statistických dat v prostředí GIS řešeného v rámci programu Aplikovaného výzkumu a vývoje národní a kulturní identity (NAKI), jehož poskytovatel je Ministerstvo kultury České republiky.“ +\item „JÍCHOVÁ, J., SOUKUP, M., NEMEŠKAL, J., OUŘEDNÍČEK, M., POSPÍŠILOVÁ, L., SVOBODA, P., ŠPAČKOVÁ, P. a kol. (2014): Geodatabáze historických statistických a prostorových dat Česka ze Sčítání lidu, domů a bytů 1921−2011. Urbánní a regionální laboratoř, Přírodovědecká fakulta Univerzity Karlovy v Praze, Praha.“ +} +} +\description{ +Function returning historical admin areas of the Czech Republic, together with relevant census data as specified by parameter \strong{era}. +} +\details{ +The census data structure is too complex to fully list here; most of the fields are self documenting (for Czech speakers) - and when in doubt please consult the original metadata at \url{https://cuni.maps.arcgis.com/home/item.html?id=c2f19cd1146747a9a8daf5b900e7747b}, or the original journal article at \url{https://doi.org/10.14712/23361980.2015.93}. + +Of notable interest is the 1930 census, which was the last before WWII - and thus the last one to include Czechoslovak citizens of German ethnicity. + +Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +} +\examples{ + +\donttest{ +library(sf) + +pre_war <- RCzechia::historie("okresy_1930") + +plot(pre_war[, 47], main = "Residents of German ethnicity") + +} + +} diff --git a/man/kraje.Rd b/man/kraje.Rd index 4180d39..a7ebe16 100644 --- a/man/kraje.Rd +++ b/man/kraje.Rd @@ -27,12 +27,25 @@ Function returning data frame of NUTS3 administrative units for the Czech Republ \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size of high resolution shapefile is <1 MB. } \examples{ library(sf) -hranice <- kraje("low") -plot(hranice, col = "white", max.plot = 1) +colors <- rainbow(14) # legend colors + +hranice <- RCzechia::kraje("low") + +plot(hranice["KOD_CZNUTS3"], + col = colors, + main = "Czech Regions", + xlim = st_bbox(hranice)[c(1, 3)] * c(1, 1.1)) + +legend("right", + hranice$KOD_CZNUTS3, + fill = colors, + bty = "n") } diff --git a/man/obce_body.Rd b/man/obce_body.Rd index 0a72c72..ef6b512 100644 --- a/man/obce_body.Rd +++ b/man/obce_body.Rd @@ -33,5 +33,7 @@ Function returning data frame of LAU2 administrative units for the Czech Republi \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is <1 MB. } diff --git a/man/obce_polygony.Rd b/man/obce_polygony.Rd index 94b9bc4..55650f6 100644 --- a/man/obce_polygony.Rd +++ b/man/obce_polygony.Rd @@ -33,6 +33,8 @@ Function returning data frame of LAU2 administrative units for the Czech Republi \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is 13.3 MB (so use with caution, and patience). } \examples{ diff --git a/man/okresy.Rd b/man/okresy.Rd index c55cc23..d3a6f79 100644 --- a/man/okresy.Rd +++ b/man/okresy.Rd @@ -30,6 +30,8 @@ Function returning data frame of LAU1 administrative units for the Czech Republi \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size of high resolution shapefile 2.1 MB. } \examples{ diff --git a/man/orp_polygony.Rd b/man/orp_polygony.Rd index 2b89fb8..3bd7116 100644 --- a/man/orp_polygony.Rd +++ b/man/orp_polygony.Rd @@ -26,5 +26,7 @@ Function returning data frame of municipalities with extended powers (obce s roz \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021 (i.e changes introduced by act 51/2020 Sb. are reflected). Downloaded size is 3.1 MB. } diff --git a/man/republika.Rd b/man/republika.Rd index e83f70e..e89a78f 100644 --- a/man/republika.Rd +++ b/man/republika.Rd @@ -21,6 +21,8 @@ Boundaries of the Czech Republic as \code{sf} polygon. \details{ Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). +The dataset is based on RUIAN data by the Czech cadastral office. If necessary you can download the most up to date raw dataset in VFR format (a special case of XML which is understood by GDAL) on \url{https://vdp.cuzk.cz/vdp/ruian/vymennyformat} (in Czech only). + The data is current to June 2021. Downloaded size of high resolution shapefile is <1 MB. } \examples{ diff --git a/man/revgeo.Rd b/man/revgeo.Rd index 6093836..f06a5a4 100644 --- a/man/revgeo.Rd +++ b/man/revgeo.Rd @@ -46,5 +46,7 @@ brno <- obce_polygony() \%>\% # shapefile of Brno pupek_brna <- st_centroid(brno) # calculate centroid adresa_pupku <- revgeo(pupek_brna)$revgeocoded # address of the center + +print(adresa_pupku) } } diff --git a/man/set_home.Rd b/man/set_home.Rd new file mode 100644 index 0000000..defb878 --- /dev/null +++ b/man/set_home.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{set_home} +\alias{set_home} +\title{Set the local cache directory} +\usage{ +set_home(path) +} +\arguments{ +\item{path}{file to be downloaded (or not...) from S3} +} +\value{ +TRUE for success and FALSE for failure; returned silently +} +\description{ +The function sets the environment variable RCZECHIA_HOME to be used as a local cache for RCzechia remote files; if unset tempdir() is used instead, with persistence for current session only. +} +\details{ +Note that when set (it is unset by default) the remote files will be cached to local file system and persist between R sessions, for good or bad. + +Also note that you can set the value of RCZECHIA_HOME environment variable directly, either via a \code{Sys.setenv()} call or via your \code{.Renviron} file. +} diff --git a/man/silnice.Rd b/man/silnice.Rd index 5d9bc94..2f2a5bf 100644 --- a/man/silnice.Rd +++ b/man/silnice.Rd @@ -13,7 +13,15 @@ silnice() \code{sf} data frame with 59.594 rows of 3 variables + geometry: \describe{ -\item{TRIDA}{Class of the road: highway = dálnice, speedway = rychlostní silnice, 1st class road = silnice I. třídy, 2nd class road = silnice II. třídy, 3rd class road = silnice III. třídy, other road = neevidovaná silnice} +\item{TRIDA}{Class of the road:} +\itemize{ +\item highway = dálnice, +\item speedway = rychlostní silnice, +\item 1st class road = silnice I. třídy, +\item 2nd class road = silnice II. třídy, +\item 3rd class road = silnice III. třídy, +\item other road = neevidovaná silnice +} \item{CISLO_SILNICE}{Local road code} \item{MEZINARODNI_OZNACENI}{International road code} } diff --git a/man/unset_home.Rd b/man/unset_home.Rd new file mode 100644 index 0000000..6e6299f --- /dev/null +++ b/man/unset_home.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/helpers.R +\name{unset_home} +\alias{unset_home} +\title{Unset the local cache directory} +\usage{ +unset_home() +} +\value{ +TRUE for success and FALSE for failure; returned silently +} +\description{ +The function unsets the environment variable RCZECHIA_HOME, meaning tempdir() will be used in future function calls, and no persistent data will be stored locally. +} diff --git a/man/vyskopis.Rd b/man/vyskopis.Rd index fd3b187..5695c81 100644 --- a/man/vyskopis.Rd +++ b/man/vyskopis.Rd @@ -18,10 +18,10 @@ vyskopis(format = "rayshaded", cropped = TRUE) \code{terra} package SpatRaster } \description{ -Terrain of the Czech Republic as a {terra} package object. +Terrain of the Czech Republic as a \code{terra} package object. } \details{ -The function returns a raster file of either actual terrain (values are meters above sea level) or rayshaded relief.. +The function returns a raster file of either actual terrain (values are meters above sea level) or rayshaded relief. The raster is created from EU DEM 1.1 file by Copernicus Land Monitoring service. The original file has pixel resolution 25×25 meters, which is too detailed for purposes of the package and was downsampled by factor of 4. diff --git a/man/zip_codes.Rd b/man/zip_codes.Rd index ce5f6ec..7179be0 100644 --- a/man/zip_codes.Rd +++ b/man/zip_codes.Rd @@ -31,6 +31,8 @@ The geometry type is MULTIPOLYGON, as there are a number of non continuous areas Due to package size constraints the data are stored externally (and a working internet connection is required to use the package). The data is current to February 2021 (last update was in January 2020). Downloaded size of high resolution shapefile is 45 MB, size of the low res object is 2 MB. + +Raw version of the dataset is available for download for use in non-R setting on \url{https://rczechia.jla-data.net/zip_codes.gpkg}. } \examples{ \donttest{ diff --git a/tests/testthat/test-1-historie.R b/tests/testthat/test-1-historie.R new file mode 100644 index 0000000..8f01da2 --- /dev/null +++ b/tests/testthat/test-1-historie.R @@ -0,0 +1,80 @@ +library(dplyr) +library(httr) + + +test_that("historie platí", { + + skip_on_cran() + + eras <- c("okresy_1921", + "okresy_1930", + "okresy_1947", + "okresy_1950", + "okresy_1961", + "okresy_1970", + "okresy_1980", + "okresy_1991", + "okresy_2001", + "okresy_2011", + "kraje_1950", + "kraje_1961", + "kraje_1970", + "kraje_1980", + "kraje_1991", + "kraje_2001", + "kraje_2011") + + entities <- c("okresy_1921" = 328, + "okresy_1930" = 330, + "okresy_1947" = 163, + "okresy_1950" = 182, + "okresy_1961" = 76, + "okresy_1970" = 76, + "okresy_1980" = 76, + "okresy_1991" = 76, + "okresy_2001" = 77, + "okresy_2011" = 77, + "kraje_1950" = 13, + "kraje_1961" = 8, + "kraje_1970" = 8, + "kraje_1980" = 8, + "kraje_1991" = 8, + "kraje_2001" = 14, + "kraje_2011" = 14) + + + for (doba in eras) { + + Sys.setenv("NETWORK_UP" = FALSE) + expect_message(historie(doba), "internet") # zpráva o chybějícím internetu + Sys.setenv("NETWORK_UP" = TRUE) + + expect_true(is.data.frame(historie(doba))) + + expect_s3_class(historie(doba), "sf") + + expect_equal(nrow(historie(doba)), unname(entities[doba])) + + expect_equal(st_crs(historie(doba))$input, "EPSG:4326") + + expect_true(all(st_is_valid(historie(doba)))) + + # sloupece obsahují geometrii (ne geom nebo x) + expect_true("geometry" %in% colnames(historie(doba))) + + # území je pokryté + expect_equal(sum(st_area(historie(doba))), st_area(republika("high")), tolerance = 5/100) + + } + +}) + + +test_that("chyby zadání", { + + expect_error(geomorfo("bflm")) # neznámá úroveň + expect_error(geomorfo()) # povinný argument bez defaultu + +}) + + diff --git a/vignettes/vignette.Rmd b/vignettes/vignette.Rmd index 74a1941..adb5eff 100644 --- a/vignettes/vignette.Rmd +++ b/vignettes/vignette.Rmd @@ -7,7 +7,7 @@ output: toc: true self_contained: no vignette: > - %\VignetteIndexEntry{Solving real world issues with RCzechia} + %\VignetteIndexEntry{Solving Real World Issues With RCzechia} %\VignetteDepends{readxl} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}