nuts_geocode: Get NUTS codes for location strings

View source: R/geocode.R

nuts_geocodeR Documentation

Get NUTS codes for location strings

Description

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 argument

  • name: 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"))

long39ng/nutscoder documentation built on March 11, 2024, 11:11 p.m.