Skip to content

rOpenGov/geodk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9b4d2ee · Feb 13, 2025

History

36 Commits
Nov 25, 2024
Nov 24, 2024
Nov 24, 2024
Nov 24, 2024
Nov 25, 2024
Nov 25, 2024
Feb 12, 2025
Oct 28, 2024
Nov 25, 2024
Oct 21, 2024
Nov 24, 2024
Oct 28, 2024
Nov 25, 2024
Oct 28, 2024
Nov 24, 2024
Nov 25, 2024
Nov 25, 2024
Feb 12, 2025
Feb 13, 2025

Repository files navigation

geodk

geodk status badge R-CMD-check Codecov test coverage Project Status: WIP – Development in progress rOG-badge

{geodk} provides access to Danish geospatial data.

Installation

You can install {geodk} from r-universe with:

install.packages(
  "geodk",
  repos = c(
    ropengov = "https://ropengov.r-universe.dev",
    getOption("repos")
  )
)

You can install the latest development version of {geodk} from GitHub with:

# install.packages("devtools")
devtools::install_github("rOpenGov/geodk")

Functions

{geodk} provides to main sets of functions:

  • Data retrieval
  • Plotting

Plotting

The plotting functions include plot_denmark() which easily plots a basic map of Denmark and returns it as a {ggplot2} object for you to edit. It also includes plot_region() and plot_municipality() which plots a subset of Denmark with focus on provided regions or municipalities.

library(geodk)
plot_denmark()
#> → Getting data on `regioner`. This usually takes 10.24s.
#> Fetching data from the API. This will take some time.
#> Reading data to `st`.
#> Converting map data to `sf` object

region <- plot_regions(region = c("Region Nordjylland", "Region Midtjylland"))
#> → Using cached response.
#> Change this behaviour by setting cache = FALSE
municipality <- plot_municipalities(municipality = c("Aarhus", "Favrskov", "Vejle"))
#> → Getting data on `kommuner`. This usually takes 13.13s.
#> Fetching data from the API. This will take some time.
#> Reading data to `st`.
#> Converting map data to `sf` object
library(patchwork)
region + municipality