Get NUTS codes for location strings
Usage
nuts_geocode(
locations,
nominatim_api = "https://nominatim.openstreetmap.org",
return_geometry = FALSE
)
Arguments
- locations
Character vector of locations to geocode
- nominatim_api
URL of the Nominatim API
- return_geometry
If TRUE, returns the sf geometry of the geocoded NUTS regions
Value
A data.frame with 5 columns:
location: The input in the
location
argumentname: Name of the geocoded NUTS region
nuts_1, nuts_2, nuts_3: Official region code at NUTS-1, 2, and 3
Examples
nuts_geocode(c("munich", "hamburg"))
#> Error in .data$name: Column `name` not found in `.data`.