knbsdata: Discover, Retrieve and Cite Official Kenyan Statistics

Provides a consistent interface for discovering and retrieving official data and statistical products of the Kenya National Bureau of Statistics (KNBS): its survey archive <https://statistics.knbs.or.ke/nada/>, publications library, census, consumer price and economic data portals <https://opendata.knbs.or.ke/beta/databrowser/>, the open FinAccess survey microdata <https://finaccess.knbs.or.ke/>, and the Kenya Demographic and Health Survey indicators published through the DHS Program API <https://api.dhsprogram.com/>. Standardises them into documented schemas, preserves provenance metadata such as release dates and checksums, and generates reproducible citations. This is an independent open-source project and is not an official KNBS product.

Version: 0.5.0
Depends: R (≥ 4.1)
Imports: cli, digest, httr2 (≥ 1.0.0), jsonlite, lifecycle, readxl, rlang (≥ 1.1.0), tibble, tools, utils, vctrs, yaml
Suggests: covr, dplyr, haven, knitr, rmarkdown, spelling, testthat (≥ 3.0.0), tidyr, withr, writexl
Published: 2026-11-25
DOI: 10.32614/CRAN.package.knbsdata (may not be active yet)
Author: Mustapha Wasseja Mohammed [aut, cre], Pascal Ochieng Owiti [aut] (affiliation: Kenya National Bureau of Statistics)
Maintainer: Mustapha Wasseja Mohammed <muswaseja at gmail.com>
BugReports: https://github.com/Mustapha-Wasseja/knbsdata/issues
License: MIT + file LICENSE
URL: https://github.com/Mustapha-Wasseja/knbsdata, https://Mustapha-Wasseja.github.io/knbsdata/
NeedsCompilation: no
Language: en-GB
Citation: knbsdata citation info
Materials: README, NEWS
CRAN checks: knbsdata results

Documentation:

Reference manual: knbsdata.html , knbsdata.pdf
Vignettes: Indicators: census tables and consumer prices (source, R code)
County codes and joins (source, R code)
Getting started with knbsdata (source, R code)
Source status and limitations (source, R code)
The Statistical Abstract as tidy tables (source, R code)
Working with the survey catalogue (source, R code)

Downloads:

Package source: knbsdata_0.5.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=knbsdata to link to this page.