gisco_get_postal_codes: Postal codes dataset

View source: R/gisco-get-postal-codes.R

gisco_get_postal_codesR Documentation

Postal codes dataset

Description

The postal code point dataset shows the location of postal codes, NUTS codes and the Degree of Urbanisation classification across the EU, EFTA and candidate countries from a variety of sources. Its primary purpose is to create correspondence tables for the NUTS classification (EC) 1059/2003 as part of the Tercet Regulation (EU) 2017/2391.

Usage

gisco_get_postal_codes(
  year = 2024,
  country = NULL,
  cache_dir = NULL,
  update_cache = FALSE,
  verbose = FALSE,
  ext = "gpkg"
)

Arguments

year

character string or number. Release year of the file. One of \Sexpr[stage=render,results=rd]{giscoR:::db_values("postal_codes", "year",TRUE)}.

country

character vector of country codes. It could be either a vector of country names, a vector of ISO3 country codes or a vector of Eurostat country codes. See also countrycode::countrycode().

cache_dir

character string. A path to a cache directory. See Caching strategies section in gisco_set_cache_dir().

update_cache

logical. Should the cached file be refreshed?. Default is FALSE. When set to TRUE it would force a new download.

verbose

logical. If TRUE displays informational messages.

ext

character. Extension of the file (default "gpkg"). One of \Sexpr[stage=render,results=rd]{giscoR:::db_values("postal_codes", "ext",TRUE)}.

Value

A sf object.

Copyright

The dataset is released under the CC-BY-SA-4.0 licence and requires the following attribution whenever used:

© European Union - GISCO, 2024, postal code point dataset, Licence CC-BY-SA 4.0.

Note

Please check the download and usage provisions on gisco_attributions().

Source

https://gisco-services.ec.europa.eu/distribution/v2/.

Copyright: https://ec.europa.eu/eurostat/web/gisco/geodata/administrative-units.

See Also

See gisco_bulk_download() to perform a bulk download of datasets.

Other administrative units datasets: gisco_get_communes(), gisco_get_countries()

Examples



# Heavy-weight download!
## Not run: 

pc_bel <- gisco_get_postal_codes(country = "BE")

if (!is.null(pc_bel)) {
  library(ggplot2)

  ggplot(pc_bel) +
    geom_sf(color = "gold") +
    theme_bw() +
    labs(
      title = "Postcodes of Belgium",
      subtitle = "2024",
      caption = paste("\u00a9 European Union - GISCO, 2024,",
        "postal code point dataset",
        "Licence CC-BY-SA 4.0",
        sep = "\n"
      )
    )
}

## End(Not run)


giscoR documentation built on Dec. 10, 2025, 9:08 a.m.