gisco_get_units: Get geospatial unit data from GISCO

View source: R/gisco-get-units.R

gisco_get_unitsR Documentation

Get geospatial unit data from GISCO

Description

[Deprecated]

Deprecated. Use one of these replacements:

  • gisco_get_metadata() for mode = "df".

  • ?gisco_get_unit functions for mode = "sf".

Usage

gisco_get_units(
  id_giscoR = c("nuts", "countries", "urban_audit"),
  unit = "ES4",
  mode = c("sf", "df"),
  year = 2016,
  epsg = 4326,
  cache = TRUE,
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE,
  resolution = 20,
  spatialtype = "RG"
)

Arguments

id_giscoR

A character string with the unit type to download. Accepted values are "nuts", "countries" or "urban_audit".

unit

A unit ID to download.

mode

A character string controlling the output of the function. Possible values are "sf" or "df". See Value.

year

A character string or numeric value with the release year of the file.

epsg

A character string or numeric value with the coordinate reference system as a 4-digit EPSG code. One of:

cache

A logical value indicating whether to cache results. Defaults to TRUE. 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.

cache_dir

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

verbose

A logical value. If TRUE displays informational messages.

resolution

A character string or numeric value with the geospatial data resolution. One of:

  • "60": 1:60 million.

  • "20": 1:20 million.

  • "10": 1:10 million.

  • "03": 1:3 million.

  • "01": 1:1 million.

spatialtype

A character string with the type of geometry to return. Options available are:

  • "RG": Regions - MULTIPOLYGON/POLYGON object.

  • "LB": Labels - POINT object.

Value

A sf object when mode = "sf" or a tibble when mode = "df".

Note

Check the download and usage provisions in gisco_attributions().

Source

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

All source files are .geojson files.

See Also

gisco_get_metadata(), ?gisco_get_unit functions.

Examples



# Equivalent metadata call.
gisco_get_units("nuts", mode = "df", year = 2016)
# ->
gisco_get_metadata("nuts", year = 2016)

# Equivalent `sf` call for NUTS.
gisco_get_units("nuts", unit = "ES111", mode = "sf", year = 2016)
# ->
gisco_get_unit_nuts(unit = "ES111", year = 2016)



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