rKolada is an R package for downloading, inspecting and processing data from Kolada, an open database containing over 4,000 Key Performance Indicators for Swedish municipalities and regions.
To learn more about using rKolada, it is recommended you use the following resources in order:
rKolada is open source licensed under the Affero Gnu Public License version 3. This means you are free to download the source, modify and redistribute it as you please, but any copies or modifications must retain the original license. Please see the file LICENSE.md for further information.
rKolada is on CRAN. To install it, run the following code in R:
install.packages("rKolada")
To install the latest development version from GitHub, use the remotes package:
library("remotes")
# remotes::install_github("LCHansson/rKolada")
install.packages("rKolada", repos = c('https://lchansson.r-universe.dev', 'https://cloud.r-project.org'))
For multi-user web applications or workflows that benefit from a shared,
persistent cache, rKolada integrates with the
nordstatExtras package.
When installed, get_values(), get_kpi(), and other functions can
write to a shared SQLite file instead of per-session .rds files:
# install.packages("devtools")
devtools::install_github("LCHansson/nordstatExtras")
library(nordstatExtras)
handle <- nxt_open("cache.sqlite")
# Data and metadata are cached in the same SQLite file
kpis <- get_kpi(cache = TRUE, cache_location = handle)
vals <- get_values(
kpi = "N03700", municipality = c("0180", "1480"),
cache = TRUE, cache_location = handle
)
nxt_close(handle)
Features include cell-level deduplication across overlapping queries,
cross-query freshness propagation, and FTS5-powered typeahead search
via nxt_search(). See the
nordstatExtras README
for details.
You are welcome to contribute to the further development of the rKolada package in any of the following ways:
rKolada is part of a family of R packages for Swedish and Nordic open statistics that share the same design philosophy — tibble-based, pipe-friendly, and offline-safe:
Please note that the rKolada project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.