Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KNBS Open Data Browser

The KNBS Open Data Browser (ODB) is an Angular web application developed in the framework of the cooperation project between the Kenya National Bureau of Statistics (KNBS) and the Italian National Institute of Statistics (Istat), funded by the Italian Agency for Development Cooperation (AICS).

ODB is the public exploration layer of a lightweight open-source dissemination pipeline for Kenya's 2019 Population and Housing Census. The pipeline transforms CSPro tabulations into structured data cubes, stores them in a Data Dissemination Database (DDB), exposes them through a JSON-stat API, and makes them browsable through this front-end.

The project is intentionally lightweight. It does not aim to replace enterprise statistical dissemination platforms such as SDMX-based infrastructures. Instead, it demonstrates how a national statistical office can move from static dissemination products to structured, API-accessible, and interactively explorable census tables using open-source components and existing institutional skills.

Main Features

  • Browse census data themes and datasets published by the backend API.
  • Open a dataset as a JSON-stat cube in the browser.
  • Explore a table slice with configurable row, column, and filter dimensions.
  • Change filter values for multidimensional tables.
  • Download the currently displayed table as CSV.
  • Download the full dataset as CSV from the backend API.

Repository Structure

  • front-end/: Angular application source code.
  • front-end/src/environments/: runtime endpoint configuration.
  • front-end/src/app/pages/: main ODB screens for dashboard, themes, dataset browsing, and table settings.
  • front-end/src/app/@core/: services, data models, JSON-stat utilities, and CSV export helpers.
  • docs/: short project documentation for academic and institutional users.

Documentation

Requirements

The application is built with Angular 14 and Node/npm. No lockfile is currently committed, so exact dependency resolution may vary by npm version. For reproducible archival work, generating and committing a lockfile is recommended in a future maintenance pass.

ODB requires a compatible backend exposing two HTTP endpoints:

  • getDatasetList?lang=en: returns the list of themes and datasets.
  • getDataset?id=<dataset-id>: returns a dataset in JSON-stat format.
  • getDataset?id=<dataset-id>&type=csv: returns the full dataset as CSV.

The current environment files point to the KNBS API host:

http://api1.knbs.or.ke/getDatasetList
http://api1.knbs.or.ke/getDataset

Running Locally

From the repository root:

cd front-end
npm install
npm start

The Angular development server normally starts at:

http://localhost:4200/

Use the production build with:

cd front-end
npm run build:prod

The production artifacts are generated under front-end/dist/.

Validation

Useful checks for maintainers:

cd front-end
npm run build
npm run lint

At the time of this documentation update, there are no application-level *.spec.ts tests under front-end/src/app. The most meaningful minimal validation is therefore a successful build plus a manual smoke test of the main flow:

  1. Open the dashboard.
  2. Navigate to Themes.
  3. Select a dataset.
  4. Change one filter value.
  5. Open table settings and change the row/column/filter layout.
  6. Export the current table as CSV.
  7. Download the full dataset as CSV.

Known Limitations

  • The repository contains only the front-end application. The DDB and JSON-stat API are external to this codebase.
  • The application depends on the shape of the KNBS backend responses and on JSON-stat metadata being consistently produced upstream.
  • The first two dimensions of a dataset are selected by default as row and column dimensions; remaining dimensions become filters.
  • There is currently no independent metadata governance layer in this front-end.
  • Automated tests are not yet present for the core table-building and filtering behavior.

Citation

If you use or discuss this software, please cite both the software repository and the related methodological paper:

IstatCooperation. KNBS Open Data Browser source code repository.
https://github.com/IstatCooperation/knbs-databrowser
Bruno, M., Grassia, F., Patruno, V., Quaresima, C., and Zindato, D.
Democratizing Access to Official Statistics Data: A Sustainable Model from Kenya's 2019 Census.
Manuscript, 2026.

License

This project is released under the MIT License. See LICENSE.

About

This repository contains the code of KNBS Databroser Project

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages