Changelog
Source:NEWS.md
rKolada 0.3.1
Breaking changes
-
magrittrpipe removed: The%>%pipe is no longer re-exported. Use the native R pipe|>instead (available since R 4.1.0, which is already the minimum version for rKolada). If you rely on%>%in your own code, addlibrary(magrittr)or switch to|>.
New features
-
kolada_cache_dir(): New exported function returning the persistent cache directory path (usingtools::R_user_dir()). -
kolada_clear_cache(): New exported function for clearing cached files. -
Lightweight
kolada_available(): Now performs a fast HTTP check (single request, 5s timeout) instead of downloading actual data. Much faster in examples and tests. - HTTP retry with backoff: API requests now automatically retry on HTTP 429 (rate limiting) with exponential backoff, up to 3 retries.
Documentation
- Improved quickstart vignette: explains the three-dimension data model, enriched metadata entity descriptions, clearer
simplify = TRUEexplanation, inline ggplot comments, and “K”-filter explanations. - Improved introduction vignette: prominent Swedish-only note, inline ggplot comments, clearer groups/unnest explanation, and ggplot2 reference link.
Internal improvements
-
gluereplaced bycli: All string interpolation now usesclifor user-facing messages andpaste0()for URL construction.glueis no longer a dependency. -
magrittrremoved: All internal code uses the native pipe|>.magrittris no longer a dependency. -
Structured messaging:
message(),warning(), andstop()replaced withcli::cli_inform(),cli::cli_warn(), andcli::cli_abort()throughout. -
Roxygen2 markdown: Documentation now uses markdown syntax (e.g.,
[func()]instead of\code{\link{func}}). -
kolada_get()internal helper: Centralised HTTP request logic withtryCatch(), timeout, and retry. - Removed legacy
CRAN-RELEASEfile. - Removed legacy
test_api.Rtest stub.
rKolada 0.3.0
CRAN release: 2026-03-04
Breaking changes
-
KPI field rename: The
auspicescolumn returned byget_kpi()is now namedauspice(matching the v3 API schema). -
ou_publication_dateremoved: This field is no longer returned by the v3 API and has been removed fromkpi_describe()output. -
is_divided_by_gender: Now returns a logical (TRUE/FALSE) instead of integer (0/1). -
remove_undocumented_columnsremoved:kpi_minimize()no longer accepts theremove_undocumented_columnsparameter as the API has been updated with proper documentation for all data properties.
New features
-
Kolada API v3: All API calls now use
https://api.kolada.se/v3/instead ofhttp://api.kolada.se/v2/. The v2 API is being shut down on March 31, 2026. -
get_municipality()gains aregion_typeparameter to filter by municipality type (e.g.,"K"for municipalities,"L"for regions). -
get_values()gains afrom_dateparameter to fetch only data updated after a specific date. -
get_values()gains akeep_deletedparameter (defaultFALSE). Rows marked as deleted in the v3 API are filtered out by default. - Pagination now uses the v3
next_urlfield and supports up to 5000 results per page (up from 2000). -
kolada_available()is now more resilient to v3 response shape changes.
Internal improvements
-
httrreplaced byhttr2: The HTTP backend has been migrated fromhttrtohttr2. This is an internal change with no user-facing API differences. -
urltoolsremoved: No longer a dependency. - Deprecated
dplyr::filter_at()anddplyr::select_if()replaced with moderndplyr::if_any()/dplyr::all_of()equivalents. - New internal
entity_search()helper eliminates code duplication acrosskpi_search(),municipality_search(), andou_search(). - New internal
append_query_params()helper replacesurltools::param_set(). - Deprecated
.data$pronoun usage in tidyselect contexts replaced with string column names. - Comprehensive test suite added: 140+ tests covering query composers, utilities, search functions, KPI/municipality/group operations, mocked API responses, and live integration tests.
- Test infrastructure uses testthat edition 3.
-
get_values()andget_metadata()now automatically chunk oversized path parameters into batches of 25 to respect the Kolada v3 API limit. Previously, passing more than 25 KPIs, municipalities, or periods would return an error. Chunking is transparent — results are combined into a single tibble.
rKolada 0.2.3
CRAN release: 2024-05-14
- Add
kolada_available()for programming with therKoladapackage - Fix vignettes and examples so they don’t crash when the Kolada API is unavailable
rKolada 0.2.2
- Correctly print URLs on
verbose = TRUE(#6) - Check if the Kolada API is available using
kolada_available()
rKolada 0.2.0
CRAN release: 2021-03-22
- add support for paging. This implies that queries that produce a result with more than 5,000 rows are no longer truncated
- vignette polish
- graceful fail on no internet connection (and other HTTP problems)
- add
max_resultsargument to allget_functions
rKolada 0.1.3
CRAN release: 2020-06-07
- add option to download OU data to
get_values() - improved some error messages
- add link to package website