Function returning data frame of the 2 671 ZIP Code Areas for the Czech Republic as sf
polygons. It takes a single parameter resolution - high res (default) or low res polygons.
Source
ČSÚ https://www.czso.cz/csu/czso/podminky_pro_vyuzivani_a_dalsi_zverejnovani_statistickych_udaju_csu
Value
sf
data frame with 2 671 rows of 2 variables + geometry
- PSC
ZIP Code as string in format NNNNN.
- NAZ_POSTA
Responsible Post Office
Details
Note that there are a number of special ZIP Codes - e.g. 118 01 for Government of the Czech Republic (Strakova akademie / Nábřeží Edvarda Beneše 4). These are not listed here, as they do not relate to a specific delivery area but are in essence private.
The geometry type is MULTIPOLYGON, as there are a number of non continuous areas of delivery.
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 https://rczechia.jla-data.net/zip_codes.gpkg.
Examples
# \donttest{
library(sf)
library(dplyr)
# residence of the Czech Prime Minister
kramarova_vila <- RCzechia::geocode("Gogolova 212, Praha 1")
# ZIP code of the PM residence
kramarova_vila %>%
st_join(RCzechia::zip_codes("low"), left = FALSE) %>%
pull(PSC)
#> RCzechia: using dataset stored locally in ~/.rczechia
#> [1] "11800"
# }