Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

40 historical shapefiles #83

Merged
merged 25 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aee8d58
link to raw RUIAN for admin data / resolves #77
jlacko Oct 5, 2023
7ebd092
download links for zip codes & KFME grid / relates #77
jlacko Oct 16, 2023
e519960
pkgdown - prepare for future deployment
jlacko Oct 22, 2023
a25b31f
cleaner silnice
jlacko Oct 22, 2023
ab06b0b
sidestep the pesky mbcsToSbcs failure
jlacko Oct 22, 2023
b971e6b
that pesky unicode!
jlacko Oct 22, 2023
b16fdc0
a more colorful plot of kraje
jlacko Oct 22, 2023
69cf53a
align ozymandias and dockerfile
jlacko Oct 23, 2023
2227e73
+ přfuk confirmation
jlacko Oct 23, 2023
f7f9ed9
internals of the world, unite!
jlacko Oct 24, 2023
daa1293
helper functions created
jlacko Oct 24, 2023
d1adceb
update docs for new internals
jlacko Oct 26, 2023
e72899e
historie in principle working / relates #40
jlacko Oct 27, 2023
4fadc60
resolve CI fails on R-devel
jlacko Oct 27, 2023
6ff4e45
yet another shot at a clean workflow run
jlacko Oct 27, 2023
ed7bcb2
unicode gets no respect
jlacko Oct 28, 2023
8cef947
shorter title for clarity
jlacko Oct 28, 2023
c9f8042
update docs of history()
jlacko Oct 28, 2023
21fd8ef
historie in tests / relates #40
jlacko Oct 28, 2023
a168161
resolve vignette warning
jlacko Oct 28, 2023
8e13733
date for release 1.12.0 set to 2023-10-29
jlacko Oct 28, 2023
aa0c8be
resolve winbuilder issues
jlacko Oct 29, 2023
82b7019
resolve codecov issues
jlacko Oct 29, 2023
e91dd2c
Merge branch 'master' into 40-historical-shapefiles
jlacko Oct 29, 2023
b2a43e4
less aggressive testing of envir vars
jlacko Oct 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions R/RCzechia.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
#' \item *geomorfo* - geomorphological divisions
#'
#' source: [CENIA / INSPIRE](https://www.arcgis.com/home/item.html?id=25813686a8564b0bbcdc951a5573cfa4), high res object: <1 MB, no low res version
#' \item *historie* - historical admin areas and census records, download size ~ 100 KB to 3.5 MB depending on object
#'
#' source: [URRlab](https://www.historickygis.cz/)
#'
#' }
#'
#' @section Utility functions:
Expand Down
8 changes: 4 additions & 4 deletions R/historie.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' 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 <https://cuni.maps.arcgis.com/home/item.html?id=c2f19cd1146747a9a8daf5b900e7747b>, or the original journal article at <https://doi.org/10.14712/23361980.2015.93>.
#' 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 <https://cuni.maps.arcgis.com/home/item.html?id=c2f19cd1146747a9a8daf5b900e7747b>, or the original journal article at \doi{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.
#'
Expand All @@ -16,8 +16,8 @@
#' \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_1947}{politické okresy + census 1947; 163 rows / 68 columns + geometry}
#' \item{okresy_1950}{správní okresy + census 1950; 182 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}
Expand All @@ -35,7 +35,7 @@
#'
#' 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ů 19212011. Urbánní a regionální laboratoř, Přírodovědecká fakulta Univerzity Karlovy v Praze, Praha.“
#' 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 <https://www.historickygis.cz/>
#'
Expand Down
2 changes: 1 addition & 1 deletion R/lesy.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @return `sf` data frame with 2.366 rows of geometry variable only
#'
#' @source © ArcČR, ARCDATA PRAHA, ZÚ, ČSÚ, 2016 <https://www.arcdata.cz/produkty/geograficka-data/arccr-4>
#' @source © ArcČR, ARCDATA PRAHA, ZÚ, ČSÚ, 2016 <https://www.arcdata.cz/cs-cz/produkty/data/arccr?rsource=https%3A%2F%2Fwww.arcdata.cz%2Fprodukty%2Fgeograficka-data%2Farccr-4>
#'
#' @export
lesy <- function() {
Expand Down
2 changes: 1 addition & 1 deletion R/vyskopis.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
#' @return `terra` package SpatRaster
#'
#' @source Copernicus Land Monitoring service, with funding by the European Union. <https://land.copernicus.eu/imagery-in-situ/eu-dem>
#' @source Copernicus Land Monitoring service, with funding by the European Union. <https://land.copernicus.eu/en/products/products-that-are-no-longer-disseminated-on-the-clms-website>
#'
#' @examples
#' \donttest{
Expand Down
4 changes: 4 additions & 0 deletions man/RCzechia-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/historie.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lesy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/vyskopis.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-1-historie.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ test_that("historie platí", {

test_that("chyby zadání", {

expect_error(geomorfo("bflm")) # neznámá úroveň
expect_error(geomorfo()) # povinný argument bez defaultu
expect_error(historie("bflm")) # neznámá úroveň
expect_error(historie()) # povinný argument bez defaultu

})

Expand Down
20 changes: 20 additions & 0 deletions tests/testthat/test-2-code-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,23 @@ test_that("očekávané chyby", {
})


test_that("envir variable", {

skip_on_cran()

envir_backup <- Sys.getenv("RCZECHIA_HOME") # uložit systémovou hodnotu do zálohy

expect_true(set_home((tempdir()))) # nastavení na tempdir projde

expect_warning(set_home("bflm"), regexp = "path") # neexistiující cesta

expect_true(set_home((tempdir()))) # nastavení na tempdir projde

expect_true(unset_home()) # vysazení projde

if(envir_backup != "") Sys.setenv("RCZECHIA_HOME" = envir_backup) # obnovit hodnotu ze zálohy, pokud dává smysl

})