Learn R Programming

RCzechia (version 1.7.2)

zip_codes: ZIP Codes of the Czech Republic

Description

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.

Usage

zip_codes(resolution = "high")

Arguments

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.

Format

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<U+00E1>b<U+0159>e<U+017E><U+00ED> Edvarda Bene<U+0161>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.

Examples

Run this code
# NOT RUN {
library(sf)
library(dplyr)

kramarova_vila <- RCzechia::geocode("Gogolova 212, Praha 1")

kramarova_vila %>%
   st_join(RCzechia::zip_codes("low"), left = FALSE) %>%
   pull(PSC)
# }

Run the code above in your browser using DataLab