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

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)}.

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 countrycode::countrycode().

cache_dir

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

update_cache

A logical value indicating whether to refresh the cached file. Defaults to FALSE. When set to TRUE, it forces a new download.

verbose

A logical value. If TRUE displays informational messages.

ext

A character value with the 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 license and requires the following attribution whenever used: © European Union - GISCO, 2024, postal code point dataset, License CC-BY-SA 4.0.

Note

Check the download and usage provisions in 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.

Administrative unit datasets: gisco_get_communes(), gisco_get_countries()

Examples



# Large 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",
        "License CC-BY-SA 4.0",
        sep = "\n"
      )
    )
}

## End(Not run)


giscoR documentation built on June 17, 2026, 9:10 a.m.