View source: R/gisco_get_urban_audit.R
gisco_get_urban_audit | R Documentation |
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
)
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()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.