View source: R/gisco-get-postal-codes.R
| gisco_get_postal_codes | R Documentation |
The postal code point dataset shows the location of postal codes, NUTS codes and the degree of urbanization classification across the EU, EFTA and candidate countries. Its primary purpose is to create correspondence tables for the NUTS classification established by Regulation (EC) No 1059/2003 as part of the Tercet Regulation (EU) 2017/2391.
gisco_get_postal_codes(
year = 2025,
epsg = 4326,
country = NULL,
cache_dir = NULL,
update_cache = FALSE,
verbose = FALSE,
ext = "gpkg"
)
year |
A character string or numeric value with the release year of the file. One of \Sexpr[stage=render,results=rd]{giscoR:::db_values("postal_codes", "year",TRUE)}. |
epsg |
A character string or numeric value with the coordinate reference system as a 4-digit EPSG code. One of:
|
country |
A character vector of country codes. It can be either a
vector of country names, a vector of ISO 3166-1 alpha-3 country codes or a
vector of Eurostat country codes. See also |
cache_dir |
A character string with a path to a cache directory. See
the Caching strategies section in |
update_cache |
A logical value indicating whether to refresh the
cached file. Defaults to |
verbose |
A logical value indicating whether to display informational messages. |
ext |
A character string with the extension of the file (default
|
The GISCO distribution API provides postal code releases for 2025, 2024 and 2020. The 2025 release has a reference date of 1 January 2025.
An sf object.
The dataset is released under the CC-BY-SA-4.0 license. Although the distribution API provides a 2025 release, the official GISCO licensing page currently requires the following attribution: © European Union - GISCO, 2024, postal code point dataset, Licence CC-BY-SA 4.0.
This dataset is not covered by gisco_attributions(). Use the attribution
specified above until GISCO publishes revised licensing text.
Non-geographical postal codes, such as post boxes and codes used by large organizations, are not included. The dataset may omit or incorrectly locate postal codes because the source data vary considerably among countries.
GISCO administrative units: https://ec.europa.eu/eurostat/web/gisco/geodata/administrative-units.
GISCO postal code distribution API: https://gisco-services.ec.europa.eu/distribution/v2/pcode/.
See gisco_bulk_download() to perform a bulk download of datasets.
Administrative unit datasets:
gisco_get_communes(),
gisco_get_countries()
# Large download.
## Not run:
pc_bel <- gisco_get_postal_codes(year = 2025, country = "BE")
if (!is.null(pc_bel) && requireNamespace("ggplot2", quietly = TRUE)) {
library(ggplot2)
ggplot(pc_bel) +
geom_sf(color = "gold") +
theme_bw() +
labs(
title = "Postcodes of Belgium",
subtitle = "2025",
caption = paste("\u00a9 European Union - GISCO, 2024,",
"postal code point dataset",
"Licence CC-BY-SA 4.0",
sep = "\n"
)
)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.