RCzechia: Spatial Objects of the Czech Republic

The history of spatial data analysis in R is long and respectable Bivand (2021). The first packages focusing specifically on providing spatial data originate from the S days Becker & Wilks (1993), with maps Deckmyn (2022) being one of the oldest packages in continuous use on CRAN (since 2003). The early packages used pattern of storing spatial data internally, which created a hard limit on volume and level of detail stored.


State of the field
The history of spatial data analysis in R is long and respectable Bivand (2021). The first packages focusing specifically on providing spatial data originate from the S days Becker & Wilks (1993), with maps Deckmyn (2022) being one of the oldest packages in continuous use on CRAN (since 2003). The early packages used pattern of storing spatial data internally, which created a hard limit on volume and level of detail stored.
With the advent of sp Pebesma & Bivand (2005) and later sf Pebesma (2018) platforms for handling spatial data the universe of packages focused on providing spatial data blossomed. There are packages with global focus, such as rnaturalearth South (2017) and regional focus like giscoR Hernangómez (2022) oriented at the EU. Number of packages are country specific, such as tigris Walker & Rudis (2022) for the US, or rgugik Dyba & Nowosad (2021) for Poland. With current near universal and reliable internet access a new pattern has emerged, with spatial data packages accessing cloud stored data files as required (caching them within the limits set by the CRAN repository policy), and distributing only lightweight code.
In the context of Czech Republic there exists CzechData package Caha (2021), with somewhat overlapping functionality but available only on GitHub. The CRAN package czso Bouchal (2022) interfaces API of the Czech Statistical Office ČSÚ, providing access to statistical data about Czech administrative areas (without the spatial information itself). Package pragr Bouchal (2020), available on GitHub, provides geodata about the city of Prague.

Statement of need
No country specific spatial data package has been published on CRAN for the Czech Republic to date, creating a need that could be filled using global or regional packages only to a limited extent.
While there there are open data resources available for researchers, mostly in the format of ESRI Shapefiles, these have a number of practical disadvantages. They have to be located and downloaded individually, and their users in R context face additional hurdles, such as conflicting Coordinate Reference Systems and character encodings. In addition some publicly available datasets are topologically invalid and many are too detailed for use by non GIS specialized audience.

Features
The package provides two distinct sets of spatial objects: administrative areas, and natural objects. In addition API interface wrapping is provided for geocoding and reverse geocoding functions.

Administrative area polygons:
• republika: borders of the Czech Republic as a polygon • kraje: 14 regions (NUTS3 areas) of the Czech Republic + Prague as a special case • okresy: 76 districts (LAU1 areas) of the Czech Republic + Prague as a special case • orp_polygony 205 municipalities with extended powers + Prague as a special case • obce_polygony: 6.258 municipalities of the Czech Republic • obce_body the same as obce_polygony, but centroids instead of polygons The country (NUTS1), regions (NUTS3) and districts (LAU1) administrative level objects from RCzechia are functionally equivalent to those provided by giscoR package Hernangómez (2022) for the Czech Republic. This is expected, as GISCO objects are standardized at the EU level, and the Czech Republic is a EU member state.
For some of the most commonly used objects (republika, kraje, okresy, reky and volebni_okrsky ) an optional low resolution version is also included. To access it, specify the value of resolution parameter as "low" (default is "high").

Utility functions:
• geocode: geocodes an address to coordinates • revgeo: reverse geocodes coordinates to an address The utility functions interface API of the Czech State Administration of Land Surveying and Cadastre (ČÚZK) and are therefore limited in scope to the area of the Czech Republic.
The package code is thoroughly tested, with 100% test coverage. In addition to testing code the package implements unit tests on integrity of the datasets provided, such as topological validity and internal consistency between different levels of administrative units.