Skip to contents

One search across every catalogue the package reads, each result with the call that retrieves it.

knbs_search() experimental
Search everything the package can retrieve

Surveys

Discovering studies and their documentation in the Kenya National Data Archive. Metadata only: the archive gates its microdata behind an account.

knbs_search_surveys() experimental
Search official survey and census studies
knbs_survey_metadata() experimental
Retrieve the full metadata record for a study
knbs_variables() experimental
Search the variables described by a study
knbs_survey_files() experimental
List the data files belonging to a study
knbs_download_microdata() experimental
Download public-use microdata

Open microdata

The FinAccess household and MSE Tracker surveys, whose anonymised, weighted microdata are published openly: verified downloads and a reader that keeps labels and provenance.

knbs_finaccess_files() experimental
List the FinAccess survey files
knbs_download_finaccess() experimental
Download FinAccess survey files
knbs_read_microdata() experimental
Read a microdata file into R

Publications

Statistical releases, reports and workbooks from the KNBS website, with verified, checksummed downloads.

knbs_publications() experimental
Search official KNBS publications
knbs_download_publication() experimental
Download a publication and verify what arrived
knbs_releases() experimental
What KNBS has released lately
knbs_release_series() experimental
KNBS's regular release series

Statistical Abstract tables

Curated, validated extraction of the Statistical Abstract’s chapter workbooks into tidy tables.

knbs_abstract_tables() experimental
List the curated Statistical Abstract tables
knbs_abstract_table() experimental
Retrieve one Statistical Abstract table as tidy observations

Indicators and prices

Census tables (CC BY 4.0), the monthly consumer price series, and the retail prices of the CPI basket commodities.

knbs_indicators() experimental
List available aggregate indicators
knbs_get_indicator() experimental
Retrieve an indicator as tidy observations
knbs_retail_prices() experimental
National average retail prices of the CPI basket commodities

Geography

The coded territorial hierarchy of the 2019 census frame — the join keys the census tables themselves use — and official county codes for county names written any way.

knbs_geographies() experimental
Kenya's geographic reference codes
knbs_county_code() experimental
Official county codes for county names written any way
knbs_match_counties() experimental
See how county names were matched

Sources

What the package knows about each KNBS source, and how far that source has been verified.

knbs_sources()
Supported KNBS sources
knbs_status()
Report on the health of supported sources

Provenance

Every object the package returns carries where it came from, when it was retrieved and how to cite it — and keeps it when written to Excel, CSV, Stata or SPSS.

knbs_metadata()
Inspect the provenance of a knbsdata object
knbs_cite()
Cite a knbsdata object
knbs_write() experimental
Write KNBS data to a file, with its provenance

Configuration

Session options controlling caching, timeouts and retries.

knbs_option()
Get a knbsdata option
knbs_options()
Set knbsdata options

Cache

Inspecting and clearing locally cached responses.

knbs_cache_dir()
Where knbsdata stores cached responses
knbs_cache_info()
What is in the cache
knbs_cache_clear()
Empty the cache
knbs_cache_prune()
Remove expired cache entries