View source: R/gisco_get_postalcodes.R
| gisco_get_postalcodes | R Documentation | 
Get postal codes points of the EU, EFTA and candidate countries.
gisco_get_postalcodes(
  year = "2020",
  country = NULL,
  cache_dir = NULL,
  update_cache = FALSE,
  verbose = FALSE
)
year | 
 Year of reference. Currently only   | 
country | 
 Optional. A 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. Mixed types (as   | 
cache_dir | 
 A path to a cache directory. See About caching.  | 
update_cache | 
 A logical whether to update cache. Default is   | 
verbose | 
 Logical, displays information. Useful for debugging,
default is   | 
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
A POINT sf object on EPSG:4326.
The dataset is released under the CC-BY-SA-4.0 licence and requires the following attribution whenever used:
(c) European Union - GISCO, 2021, postal code point dataset, Licence CC-BY-SA 4.0 available at https://ec.europa.eu/eurostat/web/gisco/geodata//administrative-units/postal-codes.
Shapefiles provided in ETRS89 (EPSG:4258).
You can set your cache_dir with gisco_set_cache_dir().
Sometimes cached files may be corrupt. On that case, try re-downloading
the data setting update_cache = TRUE.
If you experience any problem on download, try to download the
corresponding .geojson file by any other method and save it on your
cache_dir. Use the option verbose = TRUE for debugging the API query.
For a complete list of files available check gisco_db.
https://ec.europa.eu/eurostat/web/gisco/geodata//administrative-units/postal-codes.
Other political: 
gisco_bulk_download(),
gisco_get_coastallines(),
gisco_get_countries(),
gisco_get_lau(),
gisco_get_nuts(),
gisco_get_units(),
gisco_get_urban_audit()
# Heavy-weight download!
## Not run: 
pc_bel <- gisco_get_postalcodes(country = "BE")
if (!is.null(pc_bel)) {
  library(ggplot2)
  ggplot(pc_bel) +
    geom_sf(color = "gold") +
    theme_bw() +
    labs(
      title = "Postcodes of Belgium",
      subtitle = "2020",
      caption = paste("(c) European Union - GISCO, 2021,",
        "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.