Title: | Download Map Data from GISCO API - Eurostat |
---|---|
Description: | Tools to download data from the GISCO (Geographic Information System of the Commission) Eurostat database <https://ec.europa.eu/eurostat/web/gisco>. Global and European map data available. This package is in no way officially related to or endorsed by Eurostat. |
Authors: | Diego Hernangómez [aut, cre, cph] (<https://orcid.org/0000-0001-8457-4658>, rOpenGov), EuroGeographics [cph] (for the administrative boundaries.), Vincent Arel-Bundock [cph] (<https://orcid.org/0000-0003-2042-7063>, for the gisco_countrycode dataset.) |
Maintainer: | Diego Hernangómez <[email protected]> |
License: | GPL-3 |
Version: | 0.6.0 |
Built: | 2024-12-02 11:20:30 UTC |
Source: | https://github.com/rOpenGov/giscoR |
Access the GISCO Address API, that allows to carry out both geocoding and reverse geocoding using a pan-european address database.
Each endpoint available is implemented through a specific function, see Details.
The API supports fuzzy searching (also referred to as approximate string matching) for all parameters of each endpoint.
gisco_addressapi_search( country = NULL, province = NULL, city = NULL, road = NULL, housenumber = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_reverse(x, y, country = NULL, verbose = FALSE) gisco_addressapi_bbox( country = NULL, province = NULL, city = NULL, road = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_countries(verbose = FALSE) gisco_addressapi_provinces(country = NULL, city = NULL, verbose = FALSE) gisco_addressapi_cities(country = NULL, province = NULL, verbose = FALSE) gisco_addressapi_roads( country = NULL, province = NULL, city = NULL, verbose = FALSE ) gisco_addressapi_housenumbers( country = NULL, province = NULL, city = NULL, road = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_postcodes( country = NULL, province = NULL, city = NULL, verbose = FALSE ) gisco_addressapi_copyright(verbose = FALSE)
gisco_addressapi_search( country = NULL, province = NULL, city = NULL, road = NULL, housenumber = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_reverse(x, y, country = NULL, verbose = FALSE) gisco_addressapi_bbox( country = NULL, province = NULL, city = NULL, road = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_countries(verbose = FALSE) gisco_addressapi_provinces(country = NULL, city = NULL, verbose = FALSE) gisco_addressapi_cities(country = NULL, province = NULL, verbose = FALSE) gisco_addressapi_roads( country = NULL, province = NULL, city = NULL, verbose = FALSE ) gisco_addressapi_housenumbers( country = NULL, province = NULL, city = NULL, road = NULL, postcode = NULL, verbose = FALSE ) gisco_addressapi_postcodes( country = NULL, province = NULL, city = NULL, verbose = FALSE ) gisco_addressapi_copyright(verbose = FALSE)
country |
Country code ( |
province |
A province within a country. For a list of provinces within a
certain country use the provinces endpoint
( |
city |
A city within a province. For a list of cities within a certain
province use the cities endpoint
( |
road |
A road within a city. |
housenumber |
The house number or house name within a road or street. |
postcode |
Can be used in combination with the previous parameters. |
verbose |
Logical, displays information. Useful for debugging,
default is |
x , y
|
x and y coordinates (as longitude and latitude) to be converted into a human-readable address. |
Brief description of the API endpoints (source GISCO Address API \> Endpoints:
Endpoint | Description |
/countries |
Returns all country codes that are compatible with the address API. Check the coverage map for available countries and see here for a list of official country codes. |
/provinces |
Returns all provinces within the specified country. Can also be used to get the province of a specified city. |
/cities |
Returns all cities within a specified province or country. |
/roads |
Returns all roads or streets within a specified city. |
/housenumbers |
Returns all house numbers or names within the specified road. It is possible that in certain countries an address may not have a road component. In this case, if a road is not specified then the number of house numbers returned by the API is limited to 1000. |
/postcodes |
Returns all postcodes within the specified address component (Country or Province or City). |
/search |
The search endpoint allows structured queries to the address database. Please note that various combinations of each of the parameters can be used in order to retrieve the addresses that share an address component. The API is limited to a maximum of 100 addresses. |
/reverse |
The API's reverse theme allows you to specify x and y coordinates in order to retrieve a structured address. |
/bbox |
Returns a WKT bounding box for an address component depending on the parameters specified. |
/copyright |
Returns the copyright text for each available country in the Address API. |
The resulting object may present the following variables:
Property name | Description |
LD |
Refers to "Locator Designator" and represents the house number part of the address |
TF |
Refers to "Thoroughfare" and represents the street or road part of the address |
L0 |
Refers to Level 0 of the API administrative levels. Values are country codes consisting of 2 characters. |
L1 |
Refers to Level 1 of the API administrative levels. Values are province names. Please note that "province" is a generic term that may differ between countries. |
L2 |
Refers to Level 2 of the API administrative levels. Values are town or city names. Please note that "city" is a generic term that may differ between countries. |
PC |
Postal Code |
N0 |
Refers to "NUTS 0" |
N1 |
Refers to "NUTS 1" |
N2 |
Refers to "NUTS 2" |
N3 |
Refers to "NUTS 3" |
X and Y |
Refers to the x and y coordinates of the address point |
OL |
Refers to the address' Open Location Code |
A data.frame
object in most cases, except gisco_addressapi_search()
,
gisco_addressapi_reverse()
and gisco_addressapi_bbox()
, that return a
sf
object.
See the docs: https://gisco-services.ec.europa.eu/addressapi/docs/screen/home.
# Cities in a region gisco_addressapi_cities(country = "PT", province = "LISBOA") # Geocode and reverse geocode with sf objects # Structured search struct <- gisco_addressapi_search( country = "ES", city = "BARCELONA", road = "GRACIA" ) struct # Reverse geocoding reverse <- gisco_addressapi_reverse(x = struct$X[1], y = struct$Y[1]) reverse
# Cities in a region gisco_addressapi_cities(country = "PT", province = "LISBOA") # Geocode and reverse geocode with sf objects # Structured search struct <- gisco_addressapi_search( country = "ES", city = "BARCELONA", road = "GRACIA" ) struct # Reverse geocoding reverse <- gisco_addressapi_reverse(x = struct$X[1], y = struct$Y[1]) reverse
Get the legal text to be used along with the data downloaded with this package.
gisco_attributions(lang = "en", copyright = FALSE)
gisco_attributions(lang = "en", copyright = FALSE)
lang |
Language (two-letter ISO code). See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes and Details. |
copyright |
Boolean |
Current languages supported are:
"en"
: English.
"da"
: Danish.
"de"
: German.
"es"
: Spanish.
"fi"
: Finish.
"fr"
: French.
"no"
: Norwegian.
"sv"
: Swedish.
Please consider contributing if you spot any mistake or want to add a new language.
A string with the attribution to be used.
COPYRIGHT NOTICE
When data downloaded from GISCO is used in any printed or electronic publication, in addition to any other provisions applicable to the whole Eurostat website, data source will have to be acknowledged in the legend of the map and in the introductory page of the publication with the following copyright notice:
EN: (C) EuroGeographics for the administrative boundaries.
FR: (C) EuroGeographics pour les limites administratives.
DE: (C) EuroGeographics bezuglich der Verwaltungsgrenzen.
For publications in languages other than English, French or German, the translation of the copyright notice in the language of the publication shall be used.
If you intend to use the data commercially, please contact EuroGeographics for information regarding their licence agreements.
Other helper:
gisco_check_access()
gisco_attributions() gisco_attributions(lang = "es", copyright = TRUE) gisco_attributions(lang = "XXX")
gisco_attributions() gisco_attributions(lang = "es", copyright = TRUE) gisco_attributions(lang = "XXX")
Downloads zipped data from GISCO and extract them on the
cache_dir
folder.
gisco_bulk_download( id_giscoR = c("countries", "coastallines", "communes", "lau", "nuts", "urban_audit"), year = "2016", cache_dir = NULL, update_cache = FALSE, verbose = FALSE, resolution = "10", ext = c("geojson", "shp", "svg", "json", "gdb"), recursive = TRUE )
gisco_bulk_download( id_giscoR = c("countries", "coastallines", "communes", "lau", "nuts", "urban_audit"), year = "2016", cache_dir = NULL, update_cache = FALSE, verbose = FALSE, resolution = "10", ext = c("geojson", "shp", "svg", "json", "gdb"), recursive = TRUE )
id_giscoR |
Type of dataset to be downloaded. Values supported are:
|
year |
Release year of the file. See Details. |
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 |
resolution |
Resolution of the geospatial data. One of
|
ext |
Extension of the file(s) to be downloaded. Formats available are
|
recursive |
Tries to unzip recursively the zip files (if any) included
in the initial bulk download (case of |
See the years available in the corresponding functions:
The usual extension used across giscoR is "geojson"
,
however other formats are already available on GISCO.
Silent function.
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://gisco-services.ec.europa.eu/distribution/v2/
Other political:
gisco_get_coastallines()
,
gisco_get_countries()
,
gisco_get_lau()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_units()
,
gisco_get_urban_audit()
## Not run: # Countries 2016 - It would take some time gisco_bulk_download(id_giscoR = "countries", resolution = "60") ## End(Not run)
## Not run: # Countries 2016 - It would take some time gisco_bulk_download(id_giscoR = "countries", resolution = "60") ## End(Not run)
Check if R has access to resources at https://gisco-services.ec.europa.eu/distribution/v2/.
gisco_check_access()
gisco_check_access()
a logical.
Other helper:
gisco_attributions()
gisco_check_access()
gisco_check_access()
Use this function with caution. This function would clear your cached data and configuration, specifically:
Deletes the giscoR config directory
(rappdirs::user_config_dir("giscoR", "R")
).
Deletes the cache_dir
directory.
Deletes the values on stored on Sys.getenv("GISCO_CACHE_DIR")
and
options(gisco_cache_dir)
.
gisco_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)
gisco_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)
config |
if |
cached_data |
If this is set to |
verbose |
Logical, displays information. Useful for debugging,
default is |
This is an overkill function that is intended to reset your status as it you would never have installed and/or used giscoR.
Invisible. This function is called for its side effects.
Other cache utilities:
gisco_set_cache_dir()
# Don't run this! It would modify your current state ## Not run: gisco_clear_cache(verbose = TRUE) Sys.getenv("GISCO_CACHE_DIR") # Set new cache on a temp dir newcache <- file.path(tempdir(), "giscoR", "pkgdown") newcache gisco_set_cache_dir(newcache) Sys.getenv("GISCO_CACHE_DIR") ## End(Not run)
# Don't run this! It would modify your current state ## Not run: gisco_clear_cache(verbose = TRUE) Sys.getenv("GISCO_CACHE_DIR") # Set new cache on a temp dir newcache <- file.path(tempdir(), "giscoR", "pkgdown") newcache gisco_set_cache_dir(newcache) Sys.getenv("GISCO_CACHE_DIR") ## End(Not run)
POLYGON
objectA sf
object as provided by GISCO (2016 version).
A POLYGON
sf
object (resolution: 1:20million, EPSG:4326)
with 3 variables:
Coast ID.
FID.
geometry field.
COAS_RG_20M_2016_4326.geojson file.
Other dataset:
gisco_countries
,
gisco_countrycode
,
gisco_db
,
gisco_nuts
data("gisco_coastallines") head(gisco_coastallines)
data("gisco_coastallines") head(gisco_coastallines)
POLYGON
sf
objectA sf
object including all countries as provided by
GISCO (2016 version).
A MULTIPOLYGON
data frame (resolution: 1:20million, EPSG:4326) object
with 257 rows and 7 variables:
row ID.
Official country name on local language.
ISO 3166-1 alpha-3 code of each country, as provided by GISCO.
Country ID.
Country name in English.
FID.
geometry field.
CNTR_RG_20M_2016_4326.geojson file.
Other dataset:
gisco_coastallines
,
gisco_countrycode
,
gisco_db
,
gisco_nuts
data("gisco_countries") head(gisco_countries)
data("gisco_countries") head(gisco_countries)
A data frame containing conversions between different country code schemes (Eurostat/ISO2 and 3) as well as geographic regions as provided by the World Bank and the UN (M49). This data set is extracted from countrycode package.
A data frame object with 249 rows and 13 variables:
Eurostat code of each country.
ISO 3166-1 alpha-2 code of each country.
ISO 3166-1 alpha-3 code of each country.
ISO English short name.
English short name as provided by the Unicode Common Locale Data Repository.
As provided by the World Bank.
Numeric region code UN (M49).
Region name UN (M49).
Numeric intermediate Region.
Intermediate Region name UN (M49).
Numeric sub-region code UN (M49).
Sub-Region name UN (M49).
Logical indicating if the country belongs to the European Union.
countrycode::codelist v1.2.0.
gisco_get_countries()
and countrycode::codelist, included in
countrycode.
See also the Unicode Common Locale Data Repository.
Other dataset:
gisco_coastallines
,
gisco_countries
,
gisco_db
,
gisco_nuts
data("gisco_countrycode") dplyr::glimpse(gisco_countrycode)
data("gisco_countrycode") dplyr::glimpse(gisco_countrycode)
Loads a sf
object from GISCO API or your local library.
gisco_get_airports( year = "2013", country = NULL, cache_dir = NULL, update_cache = FALSE, verbose = FALSE ) gisco_get_ports( year = "2013", country = NULL, cache_dir = NULL, update_cache = FALSE, verbose = FALSE )
gisco_get_airports( year = "2013", country = NULL, cache_dir = NULL, update_cache = FALSE, verbose = FALSE ) gisco_get_ports( year = "2013", country = NULL, cache_dir = NULL, update_cache = FALSE, verbose = FALSE )
year |
Year of reference. Only year available right now is |
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 |
gisco_get_airports()
refer to Europe. All shapefiles provided in
EPSG:4326.
gisco_get_ports()
adds a new field CNTR_ISO2
to the original data
identifying the country of the port. Worldwide information available.
The port codes are aligned with UN/LOCODE standard.
A POINT
object on EPSG:4326.
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/transport-networks
Other infrastructure:
gisco_get_education()
,
gisco_get_healthcare()
library(sf) greece <- gisco_get_countries(country = "EL", resolution = 3) airp_gc <- gisco_get_airports(country = "EL") library(ggplot2) if (inherits(airp_gc, "sf")) { ggplot(greece) + geom_sf(fill = "grey80") + geom_sf(data = airp_gc, color = "blue") + labs( title = "Airports on Greece", shape = NULL, color = NULL, caption = gisco_attributions() ) } ############################## # Plot ports # ############################## ports <- gisco_get_ports() coast <- giscoR::gisco_coastallines # To Robinson projection :) library(sf) coast <- st_transform(coast, "ESRI:54030") ports <- st_transform(ports, st_crs(coast)) if (inherits(ports, "sf")) { ggplot(coast) + geom_sf(fill = "#F6E1B9", color = "#0978AB") + geom_sf(data = ports, fill = "red", shape = 21) + theme_void() + theme( panel.background = element_rect(fill = "#C6ECFF"), panel.grid = element_blank(), plot.title = element_text(face = "bold", hjust = 0.5), plot.subtitle = element_text(face = "italic", hjust = 0.5) ) + labs( title = "Ports Worldwide", subtitle = "Year 2013", caption = "(c) European Union, 1995 - today" ) }
library(sf) greece <- gisco_get_countries(country = "EL", resolution = 3) airp_gc <- gisco_get_airports(country = "EL") library(ggplot2) if (inherits(airp_gc, "sf")) { ggplot(greece) + geom_sf(fill = "grey80") + geom_sf(data = airp_gc, color = "blue") + labs( title = "Airports on Greece", shape = NULL, color = NULL, caption = gisco_attributions() ) } ############################## # Plot ports # ############################## ports <- gisco_get_ports() coast <- giscoR::gisco_coastallines # To Robinson projection :) library(sf) coast <- st_transform(coast, "ESRI:54030") ports <- st_transform(ports, st_crs(coast)) if (inherits(ports, "sf")) { ggplot(coast) + geom_sf(fill = "#F6E1B9", color = "#0978AB") + geom_sf(data = ports, fill = "red", shape = 21) + theme_void() + theme( panel.background = element_rect(fill = "#C6ECFF"), panel.grid = element_blank(), plot.title = element_text(face = "bold", hjust = 0.5), plot.subtitle = element_text(face = "italic", hjust = 0.5) ) + labs( title = "Ports Worldwide", subtitle = "Year 2013", caption = "(c) European Union, 1995 - today" ) }
sf
polygonsDownloads worldwide coastlines
gisco_get_coastallines( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20" )
gisco_get_coastallines( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20" )
year |
Release year. One of |
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
resolution |
Resolution of the geospatial data. One of
|
A sf
POLYGON
object.
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.
Please check the download and usage provisions on gisco_attributions()
.
https://gisco-services.ec.europa.eu/distribution/v2/
Other political:
gisco_bulk_download()
,
gisco_get_countries()
,
gisco_get_lau()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_units()
,
gisco_get_urban_audit()
coast <- gisco_get_coastallines() library(ggplot2) ggplot(coast) + geom_sf(color = "#1278AB", fill = "#FDFBEA") + # Zoom on Caribe coord_sf( xlim = c(-99, -49), ylim = c(4, 30) ) + theme_minimal() + theme( panel.background = element_rect(fill = "#C7E7FB", color = NA), panel.border = element_rect(colour = "black", fill = NA) )
coast <- gisco_get_coastallines() library(ggplot2) ggplot(coast) + geom_sf(color = "#1278AB", fill = "#FDFBEA") + # Zoom on Caribe coord_sf( xlim = c(-99, -49), ylim = c(4, 30) ) + theme_minimal() + theme( panel.background = element_rect(fill = "#C7E7FB", color = NA), panel.border = element_rect(colour = "black", fill = NA) )
sf
polygons, points and linesReturns world country polygons, lines and points at a specified scale, as provided by GISCO. Also, specific areas as Gibraltar or Antarctica are presented separately. The definition of country used on GISCO correspond roughly with territories with an official ISO-3166 code.
gisco_get_countries( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20", spatialtype = "RG", country = NULL, region = NULL )
gisco_get_countries( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20", spatialtype = "RG", country = NULL, region = NULL )
year |
Release year of the file. One
of |
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
resolution |
Resolution of the geospatial data. One of
|
spatialtype |
Type of geometry to be returned:
Note that parameters |
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 |
region |
Optional. A character vector of UN M49 region codes or
European Union membership. Possible values are |
A sf
object specified by spatialtype
.
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.
Regions are defined as per the geographic regions defined by the
UN (see https://unstats.un.org/unsd/methodology/m49/.
Under this scheme Cyprus is assigned to Asia. You may use
region = "EU"
to get the EU members (reference date: 2021).
Please check the download and usage provisions on gisco_attributions()
.
https://gisco-services.ec.europa.eu/distribution/v2/
gisco_countrycode()
, gisco_countries,
countrycode::countrycode()
Other political:
gisco_bulk_download()
,
gisco_get_coastallines()
,
gisco_get_lau()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_units()
,
gisco_get_urban_audit()
cntries <- gisco_get_countries() library(ggplot2) ggplot(cntries) + geom_sf() # Get a region africa <- gisco_get_countries(region = "Africa") ggplot(africa) + geom_sf(fill = "#078930", col = "white") + theme_minimal()
cntries <- gisco_get_countries() library(ggplot2) ggplot(cntries) + geom_sf() # Get a region africa <- gisco_get_countries(region = "Africa") ggplot(africa) + geom_sf(fill = "#078930", col = "white") + theme_minimal()
The dataset contains information on main education services by Member States.
gisco_get_education( year = c("2023", "2020"), cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL )
gisco_get_education( year = c("2023", "2020"), cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL )
year |
Release year of the file. One of |
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
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 |
Files are distributed on EPSG:4326. Metadata available on https://gisco-services.ec.europa.eu/pub/education/metadata.pdf.
A POINT
sf
object.
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.
dieghernan, https://github.com/dieghernan/
https://ec.europa.eu/eurostat/web/gisco/geodata/basic-services
Other infrastructure:
gisco_get_airports()
,
gisco_get_healthcare()
edu_BEL <- gisco_get_education(country = "Belgium") # Plot if downloaded if (nrow(edu_BEL) > 3) { library(ggplot2) ggplot(edu_BEL) + geom_sf(shape = 21, size = 0.15) }
edu_BEL <- gisco_get_education(country = "Belgium") # Plot if downloaded if (nrow(edu_BEL) > 3) { library(ggplot2) ggplot(edu_BEL) + geom_sf(shape = 21, size = 0.15) }
These datasets contain grid cells covering the European land territory, for various resolutions from 1km to 100km. Base statistics such as population figures are provided for these cells.
gisco_get_grid( resolution = "20", spatialtype = c("REGION", "POINT"), cache_dir = NULL, update_cache = FALSE, verbose = FALSE )
gisco_get_grid( resolution = "20", spatialtype = c("REGION", "POINT"), cache_dir = NULL, update_cache = FALSE, verbose = FALSE )
resolution |
Resolution of the grid cells on kms. Available values are
|
spatialtype |
Select one of |
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 |
Files are distributed on EPSG:3035.
The file sizes range is from 428Kb (resolution = "100"
)
to 1.7Gb resolution = "1"
. For resolutions 1km and 2km you would
need to confirm the download.
A POLYGON/POINT
sf
object.
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.
There are specific downloading provisions, please see https://ec.europa.eu/eurostat/web/gisco/geodata/grids
dieghernan, https://github.com/dieghernan/
https://ec.europa.eu/eurostat/web/gisco/geodata/grids
grid <- gisco_get_grid(resolution = 20) # If downloaded correctly proceed if (!is.null(grid)) { library(dplyr) grid <- grid %>% mutate(popdens = TOT_P_2021 / 20) breaks <- c(0, 0.1, 100, 500, 1000, 5000, 10000, Inf) # Cut groups grid <- grid %>% mutate(popdens_cut = cut(popdens, breaks = breaks, include.lowest = TRUE )) cut_labs <- prettyNum(breaks, big.mark = " ")[-1] cut_labs[1] <- "0" cut_labs[7] <- "> 10 000" pal <- c("black", hcl.colors(length(breaks) - 2, palette = "Spectral", alpha = 0.9 )) library(ggplot2) ggplot(grid) + geom_sf(aes(fill = popdens_cut), color = NA, linewidth = 0) + coord_sf( xlim = c(2500000, 7000000), ylim = c(1500000, 5200000) ) + scale_fill_manual( values = pal, na.value = "black", name = "people per sq. kilometer", labels = cut_labs, guide = guide_legend( direction = "horizontal", nrow = 1 ) ) + theme_void() + labs( title = "Population density in Europe (2021)", subtitle = "Grid: 20 km.", caption = gisco_attributions() ) + theme( text = element_text(colour = "white"), plot.background = element_rect(fill = "grey2"), plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5, face = "bold"), plot.caption = element_text( color = "grey60", hjust = 0.5, vjust = 0, margin = margin(t = 5, b = 10) ), legend.position = "bottom", legend.title.position = "top", legend.text.position = "bottom", legend.key.height = unit(0.5, "lines"), legend.key.width = unit(1, "lines") ) }
grid <- gisco_get_grid(resolution = 20) # If downloaded correctly proceed if (!is.null(grid)) { library(dplyr) grid <- grid %>% mutate(popdens = TOT_P_2021 / 20) breaks <- c(0, 0.1, 100, 500, 1000, 5000, 10000, Inf) # Cut groups grid <- grid %>% mutate(popdens_cut = cut(popdens, breaks = breaks, include.lowest = TRUE )) cut_labs <- prettyNum(breaks, big.mark = " ")[-1] cut_labs[1] <- "0" cut_labs[7] <- "> 10 000" pal <- c("black", hcl.colors(length(breaks) - 2, palette = "Spectral", alpha = 0.9 )) library(ggplot2) ggplot(grid) + geom_sf(aes(fill = popdens_cut), color = NA, linewidth = 0) + coord_sf( xlim = c(2500000, 7000000), ylim = c(1500000, 5200000) ) + scale_fill_manual( values = pal, na.value = "black", name = "people per sq. kilometer", labels = cut_labs, guide = guide_legend( direction = "horizontal", nrow = 1 ) ) + theme_void() + labs( title = "Population density in Europe (2021)", subtitle = "Grid: 20 km.", caption = gisco_attributions() ) + theme( text = element_text(colour = "white"), plot.background = element_rect(fill = "grey2"), plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5, face = "bold"), plot.caption = element_text( color = "grey60", hjust = 0.5, vjust = 0, margin = margin(t = 5, b = 10) ), legend.position = "bottom", legend.title.position = "top", legend.text.position = "bottom", legend.key.height = unit(0.5, "lines"), legend.key.width = unit(1, "lines") ) }
The dataset contains information on main healthcare services considered to be 'hospitals' by Member States.
gisco_get_healthcare( year = c("2023", "2020"), cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL )
gisco_get_healthcare( year = c("2023", "2020"), cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL )
year |
Release year of the file. One of |
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
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 |
Files are distributed on EPSG:4326. Metadata available on https://gisco-services.ec.europa.eu/pub/healthcare/metadata.pdf.
A POINT
sf
object.
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.
dieghernan, https://github.com/dieghernan/
https://ec.europa.eu/eurostat/web/gisco/geodata/basic-services
Other infrastructure:
gisco_get_airports()
,
gisco_get_education()
health_be <- gisco_get_healthcare(country = "Belgium") # Plot if downloaded if (inherits(health_be, "sf")) { library(ggplot2) ggplot(health_be) + geom_sf() }
health_be <- gisco_get_healthcare(country = "Belgium") # Plot if downloaded if (inherits(health_be, "sf")) { library(ggplot2) ggplot(health_be) + geom_sf() }
sf
polygons, points and linesgisco_get_communes()
and gisco_get_lau()
download shapes of Local
Urban Areas, that correspond roughly with towns and cities.
gisco_get_communes( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, spatialtype = "RG", country = NULL ) gisco_get_lau( year = "2021", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL, gisco_id = NULL )
gisco_get_communes( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, spatialtype = "RG", country = NULL ) gisco_get_lau( year = "2021", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, country = NULL, gisco_id = NULL )
year |
Release year of the file:
|
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
spatialtype |
Type of geometry to be returned:
Note that parameters |
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 |
gisco_id |
Optional. A character vector of GISCO_ID LAU values. |
A sf
object specified by spatialtype
. In the case of
gisco_get_lau()
, a POLYGON
object.
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.
Please check the download and usage provisions on gisco_attributions()
.
Other political:
gisco_bulk_download()
,
gisco_get_coastallines()
,
gisco_get_countries()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_units()
,
gisco_get_urban_audit()
ire_lau <- gisco_get_communes(spatialtype = "LB", country = "Ireland") if (!is.null(ire_lau)) { library(ggplot2) ggplot(ire_lau) + geom_sf(shape = 21, col = "#009A44", size = 0.5) + labs( title = "Communes in Ireland", subtitle = "Year 2016", caption = gisco_attributions() ) + theme_void() + theme(text = element_text( colour = "#009A44", family = "serif", face = "bold" )) }
ire_lau <- gisco_get_communes(spatialtype = "LB", country = "Ireland") if (!is.null(ire_lau)) { library(ggplot2) ggplot(ire_lau) + geom_sf(shape = 21, col = "#009A44", size = 0.5) + labs( title = "Communes in Ireland", subtitle = "Year 2016", caption = gisco_attributions() ) + theme_void() + theme(text = element_text( colour = "#009A44", family = "serif", face = "bold" )) }
sf
polygons, points and linesReturns NUTS regions polygons, lines and points at a specified scale, as provided by GISCO.
NUTS are provided at three different levels:
"0"
: Country level
"1"
: Groups of states/regions
"2"
: States/regions
"3"
: Counties/provinces/districts
Note that NUTS-level definition may vary across countries. See also https://ec.europa.eu/eurostat/web/gisco/geodata//statistical-units/territorial-units-statistics.
gisco_get_nuts( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20", spatialtype = "RG", country = NULL, nuts_id = NULL, nuts_level = "all" )
gisco_get_nuts( year = "2016", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, resolution = "20", spatialtype = "RG", country = NULL, nuts_id = NULL, nuts_level = "all" )
year |
Release year of the file. One
of |
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
resolution |
Resolution of the geospatial data. One of
|
spatialtype |
Type of geometry to be returned:
Note that parameters |
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 |
nuts_id |
Optional. A character vector of NUTS IDs. |
nuts_level |
NUTS level. One of |
A sf
object specified by spatialtype
. The resulting
sf
object would present an additional column geo
(equal to
NUTS_ID
) for improving compatibility with eurostat package. See
eurostat::get_eurostat_geospatial()
).
See also gisco_nuts to understand the columns and values provided.
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://gisco-services.ec.europa.eu/distribution/v2/
gisco_nuts, gisco_get_countries()
,
eurostat::get_eurostat_geospatial()
Other political:
gisco_bulk_download()
,
gisco_get_coastallines()
,
gisco_get_countries()
,
gisco_get_lau()
,
gisco_get_postalcodes()
,
gisco_get_units()
,
gisco_get_urban_audit()
nuts2 <- gisco_get_nuts(nuts_level = 2) library(ggplot2) ggplot(nuts2) + geom_sf() + # ETRS89 / ETRS-LAEA coord_sf( crs = 3035, xlim = c(2377294, 7453440), ylim = c(1313597, 5628510) ) + labs(title = "NUTS-2 levels") # NUTS-3 for Germany germany_nuts3 <- gisco_get_nuts(nuts_level = 3, country = "Germany") ggplot(germany_nuts3) + geom_sf() + labs( title = "NUTS-3 levels", subtitle = "Germany", caption = gisco_attributions() ) # Select specific regions select_nuts <- gisco_get_nuts(nuts_id = c("ES2", "FRJ", "FRL", "ITC")) ggplot(select_nuts) + geom_sf(aes(fill = CNTR_CODE)) + scale_fill_viridis_d()
nuts2 <- gisco_get_nuts(nuts_level = 2) library(ggplot2) ggplot(nuts2) + geom_sf() + # ETRS89 / ETRS-LAEA coord_sf( crs = 3035, xlim = c(2377294, 7453440), ylim = c(1313597, 5628510) ) + labs(title = "NUTS-2 levels") # NUTS-3 for Germany germany_nuts3 <- gisco_get_nuts(nuts_level = 3, country = "Germany") ggplot(germany_nuts3) + geom_sf() + labs( title = "NUTS-3 levels", subtitle = "Germany", caption = gisco_attributions() ) # Select specific regions select_nuts <- gisco_get_nuts(nuts_id = c("ES2", "FRJ", "FRL", "ITC")) ggplot(select_nuts) + geom_sf(aes(fill = CNTR_CODE)) + scale_fill_viridis_d()
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 )
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)
# 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)
Download individual shapefiles of units. Unlike gisco_get_countries()
,
gisco_get_nuts()
or gisco_get_urban_audit()
, that downloads a full
dataset and applies filters, gisco_get_units()
downloads a single
shapefile for each unit.
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" )
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" )
id_giscoR |
Select the |
unit |
Unit ID to be downloaded. See Details. |
mode |
Controls the output of the function. Possible values are |
year |
Release year of the file. One
of |
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
resolution |
Resolution of the geospatial data. One of
|
spatialtype |
Type of geometry to be returned: |
The function can return a data frame on mode = "df"
or a sf
object on mode = "sf"
.
In order to see the available unit
ids with the required
combination of spatialtype, year
, first run the function on "df"
mode. Once that you get the data frame you can select the required ids
on the unit
parameter.
On mode = "df"
the only relevant parameters are spatialtype, year
.
A sf
object on mode = "sf"
or a data frame on mode = "df"
.
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.
Country-level files would be renamed on your cache_dir
to avoid naming conflicts with NUTS-0 datasets.
Please check the download and usage provisions on gisco_attributions()
.
dieghernan, https://github.com/dieghernan/
https://gisco-services.ec.europa.eu/distribution/v2/
Other political:
gisco_bulk_download()
,
gisco_get_coastallines()
,
gisco_get_countries()
,
gisco_get_lau()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_urban_audit()
cities <- gisco_get_units( id_giscoR = "urban_audit", mode = "df", year = "2020" ) VAL <- cities[grep("Valencia", cities$URAU_NAME), ] # Order from big to small VAL <- VAL[order(as.double(VAL$AREA_SQM), decreasing = TRUE), ] VAL.sf <- gisco_get_units( id_giscoR = "urban_audit", year = "2020", unit = VAL$URAU_CODE ) # Provincia Provincia <- gisco_get_units( id_giscoR = "nuts", unit = c("ES523"), resolution = "01" ) # Reorder VAL.sf$URAU_CATG <- factor(VAL.sf$URAU_CATG, levels = c("F", "K", "C")) # Plot library(ggplot2) ggplot(Provincia) + geom_sf(fill = "gray1") + geom_sf(data = VAL.sf, aes(fill = URAU_CATG)) + scale_fill_viridis_d() + labs( title = "Valencia", subtitle = "Urban Audit", fill = "Urban Audit\ncategory" )
cities <- gisco_get_units( id_giscoR = "urban_audit", mode = "df", year = "2020" ) VAL <- cities[grep("Valencia", cities$URAU_NAME), ] # Order from big to small VAL <- VAL[order(as.double(VAL$AREA_SQM), decreasing = TRUE), ] VAL.sf <- gisco_get_units( id_giscoR = "urban_audit", year = "2020", unit = VAL$URAU_CODE ) # Provincia Provincia <- gisco_get_units( id_giscoR = "nuts", unit = c("ES523"), resolution = "01" ) # Reorder VAL.sf$URAU_CATG <- factor(VAL.sf$URAU_CATG, levels = c("F", "K", "C")) # Plot library(ggplot2) ggplot(Provincia) + geom_sf(fill = "gray1") + geom_sf(data = VAL.sf, aes(fill = URAU_CATG)) + scale_fill_viridis_d() + labs( title = "Valencia", subtitle = "Urban Audit", fill = "Urban Audit\ncategory" )
sf
objectsReturns polygons and points corresponding to cities, greater cities and metropolitan areas included on the Urban Audit report of Eurostat.
gisco_get_urban_audit( year = "2021", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, spatialtype = "RG", country = NULL, level = NULL )
gisco_get_urban_audit( year = "2021", epsg = "4326", cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE, spatialtype = "RG", country = NULL, level = NULL )
year |
Release year of the file. One
of |
epsg |
projection of the map: 4-digit EPSG code. One of:
|
cache |
A logical whether to do caching. Default is |
update_cache |
A logical whether to update cache. Default is |
cache_dir |
A path to a cache directory. See About caching. |
verbose |
Logical, displays information. Useful for debugging,
default is |
spatialtype |
Type of geometry to be returned:
|
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 |
level |
Level of Urban Audit. Possible values are |
A sf
object specified by spatialtype
.
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.
Please check the download and usage provisions on gisco_attributions()
.
https://gisco-services.ec.europa.eu/distribution/v2/
gisco_get_communes()
, gisco_get_lau()
Other political:
gisco_bulk_download()
,
gisco_get_coastallines()
,
gisco_get_countries()
,
gisco_get_lau()
,
gisco_get_nuts()
,
gisco_get_postalcodes()
,
gisco_get_units()
cities <- gisco_get_urban_audit(year = "2020", level = "CITIES") if (!is.null(cities)) { bcn <- cities[cities$URAU_NAME == "Barcelona", ] library(ggplot2) ggplot(bcn) + geom_sf() }
cities <- gisco_get_urban_audit(year = "2020", level = "CITIES") if (!is.null(cities)) { bcn <- cities[cities$URAU_NAME == "Barcelona", ] library(ggplot2) ggplot(bcn) + geom_sf() }
POLYGON
objectA sf
object including all NUTS levels as provided by GISCO
(2016 version).
A POLYGON
data frame (resolution: 1:20million, EPSG:4326) object with
2,016 rows and
11 variables:
NUTS identifier.
NUTS level code (0,1,2,3)
.
Urban Type, see Details.
Eurostat Country code.
NUTS name on Latin characters.
NUTS name on local alphabet.
Mount Type, see Details.
Coast Type, see Details.
FID.
Same as NUTS_ID, provided for compatibility with eurostat.
geometry field.
MOUNT_TYPE: Mountain typology:
1
: More than 50 % of the surface is covered by topographic mountain
areas.
2
: More than 50 % of the regional population lives in topographic
mountain areas.
3
: More than 50 % of the surface is covered by topographic mountain
areas and where more than 50 % of the regional population lives in these
mountain areas.
4
: Non-mountain region / other regions.
0
: No classification provided.
URBN_TYPE: Urban-rural typology:
1
: Predominantly urban region.
2
: Intermediate region.
3
: Predominantly rural region.
0
: No classification provided.
COAST_TYPE: Coastal typology:
1
: Coastal (on coast).
2
: Coastal (less than 50% of population living within 50 km. of the
coastline).
3
: Non-coastal region.
0
: No classification provided.
NUTS_RG_20M_2016_4326.geojson file.
Other dataset:
gisco_coastallines
,
gisco_countries
,
gisco_countrycode
,
gisco_db
data("gisco_nuts") head(gisco_nuts)
data("gisco_nuts") head(gisco_nuts)
This function will store your cache_dir
path on your local machine and
would load it for future sessions. Type Sys.getenv("GISCO_CACHE_DIR")
to
find your cached path or use gisco_detect_cache_dir()
.
Alternatively, you can store the cache_dir
manually with the following
options:
Run Sys.setenv(GISCO_CACHE_DIR = "cache_dir")
. You would need to
run this command on each session (Similar to install = FALSE
).
Write this line on your .Renviron
file:
GISCO_CACHE_DIR = "value_for_cache_dir"
(same behavior than
install = TRUE
). This would store your cache_dir
permanently. See
also usethis::edit_r_environ()
.
gisco_set_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE ) gisco_detect_cache_dir(...)
gisco_set_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE ) gisco_detect_cache_dir(...)
cache_dir |
A path to a cache directory. On missing value the function
would store the cached files on a temporary dir (See |
overwrite |
If this is set to |
install |
If |
verbose |
Logical, displays information. Useful for debugging,
default is |
... |
Ignored |
gisco_set_cache_dir()
returns an (invisible) character with the path to
your cache_dir
, but it is mainly called for its side effect.
gisco_detect_cache_dir()
returns the path to the cache_dir
used in this
session.
Other cache utilities:
gisco_clear_cache()
# Don't run this! It would modify your current state ## Not run: gisco_set_cache_dir(verbose = TRUE) ## End(Not run) Sys.getenv("GISCO_CACHE_DIR") gisco_detect_cache_dir()
# Don't run this! It would modify your current state ## Not run: gisco_set_cache_dir(verbose = TRUE) ## End(Not run) Sys.getenv("GISCO_CACHE_DIR") gisco_detect_cache_dir()