Package 'geodk'

Title: Access Danish Geospatial Data
Description: This package provides access to all geospatial data provided by the danish agency called Klimadatastyrelsen. Under the hood it wraps the `{dawaR}` and `{dkdata}` packages which provide access to the agency APIs.
Authors: Aleksander Bang-Larsen [aut, cre, cph] , Agency of Climate Data [ctb] (The Danish Agency of Climate Data serves this data for the public and have not actively contributed to the distribution in this package.)
Maintainer: Aleksander Bang-Larsen <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9000
Built: 2024-11-25 13:39:27 UTC
Source: https://github.com/rOpenGov/geodk

Help Index


Get all available levels

Description

Get all available levels

Usage

get_levels()

Value

This funciton returns all available levels for the ⁠plot_*⁠ functions.

Examples

get_levels()

Danish municipalities

Description

A sf dataset providing geometry for the danish municipalities

Usage

municipalities

Format

municipalities

An object of classes sf and data.frame with 99 rows and 9 columns:

code

Unique code

name

The Danish name of the municipality

region_code

The unique code of the region that this municipality is located in

region_name

The name of the region that this municipality is located in

source_changed

When was the source last changed on the data-provider's side

visualcenter_x, visualcenter_y

Visual center of the polygon in WGS84

geometry

Polygons for each municipality

last_update

When was the data in the package last updated by maintainers

Source

Provided by The Danish Agency of Climate Data https://dawadocs.dataforsyningen.dk/dok/om#vilkaar. Terms and conditions apply.


Plot a map of Denmark with given borders

Description

Plot a nice map of Denmark with borders at a given level. Options to fill based on area names or color borders are included. A legend guide is shown if less than 15 areas are plotted.

Usage

plot_denmark(level = "regions", fill = NULL, color = NULL)

Arguments

level

The desired administrative geographic level for the map. Should be one of get_levels()

fill

The desired color for the areas to be filled with. Could be either a R-friendly color (name or hex code) or names to fill based on the area names.

color

The desired color for the area borders to be colored with. Could be either a R-friendly color (name or hex code) or names to fill based on the area names.

Value

Returns a ggplot object that can be manipulated as any other. The object is automatically printed.

Examples

plot_denmark()

plot_denmark(fill = "names")

Plot selected (or all) municipalities

Description

Plot a vector of municipalities in Denmark. Just provide the name.

Usage

plot_municipalities(
  municipality = c("København", "Frederiksberg", "Ballerup", "Brøndby", "Dragør",
    "Gentofte", "Gladsaxe", "Glostrup", "Herlev", "Albertslund", "Hvidovre",
    "Høje-Taastrup", "Lyngby-Taarbæk", "Rødovre", "Ishøj", "Tårnby", "Vallensbæk",
    "Furesø", "Allerød", "Fredensborg", "Helsingør", "Hillerød", "Hørsholm",
    "Rudersdal", "Egedal", "Frederikssund", "Greve", "Køge", "Halsnæs", "Roskilde",
    "Solrød", "Gribskov", "Odsherred", "Holbæk", "Faxe", "Kalundborg", "Ringsted",
    "Slagelse", "Stevns", "Sorø", "Lejre", 
     "Lolland", "Næstved", "Guldborgsund",
    "Vordingborg", "Bornholm", "Middelfart", "Christiansø", "Assens", "Faaborg-Midtfyn",
    "Kerteminde", "Nyborg", "Odense", "Svendborg", "Nordfyns", "Langeland", "ærø",
    "Haderslev", "Billund", "Sønderborg", "Tønder", "Esbjerg", "Fanø", "Varde",
    "Vejen", "Aabenraa", "Fredericia", "Horsens", "Kolding", "Vejle", "Herning",
    "Holstebro", "Lemvig", "Struer", "Syddjurs", "Norddjurs", "Favrskov", "Odder",
    "Randers", "Silkeborg", "Samsø", "Skanderborg", "Aarhus", 
     "Ikast-Brande",
    "Ringkøbing-Skjern", "Hedensted", "Morsø", "Skive", "Thisted", "Viborg",
    "Brønderslev", "Frederikshavn", "Vesthimmerlands", "Læsø", "Rebild",
    "Mariagerfjord", "Jammerbugt", "Aalborg", "Hjørring")
)

Arguments

municipality

Municipality to plot. Mutiple is supported.

Value

Returns a {ggplot2} object and prints the plot as well.

Examples

plot_municipalities(municipality = c("Aarhus", "Favrskov"))

Plot selected (or all) regions

Description

Plot a vector of regions in Denmark. Just provide the name.

Usage

plot_regions(
  region = c("Region Nordjylland", "Region Midtjylland", "Region Syddanmark",
    "Region Hovedstaden", "Region Sjælland")
)

Arguments

region

Region(s) to plot

Value

Returns a {ggplot2} object and prints the plot as well.

Examples

plot_regions(region = c("Region Nordjylland", "Region Midtjylland"))

Danish regions

Description

A sf dataset providing geometry for the danish regions

Usage

regions

Format

regions

An object of classes sf and data.frame with 5 rows and 8 columns:

code

Unique code

name

The Danish name of the region

nuts2

EU nuts division

source_changed

When was the source last changed on the data-provider's side

visualcenter_x, visualcenter_y

Visual center of the polygon in WGS84

geometry

Polygons for each region

last_update

When was the data in the package last updated by maintainers

Source

Provided by The Danish Agency of Climate Data https://dawadocs.dataforsyningen.dk/dok/om#vilkaar. Terms and conditions apply.