Skip to contents

This function returns map data from DAWA. It is ready to use with {sf} functions. The returned dataframe has date-time columns to inform when the information was last changed. It is returned in Europe/Copenhagen time as that is the local time for the API. You can change that behavior by setting Sys.setenv(TZ = "Your/Timezone").

Usage

get_map_data(type)

Arguments

type

Defines the type of map data to request from DAWA. Run available_sections(format = "geojson") to see your options.

Value

Returns a data.frame object that contains polygons for the section provided.

Examples

x <- get_map_data("regioner")
ggplot2::ggplot(x) +
  ggplot2::geom_sf()