South Africa's official statistics in plain English: inflation, unemployment, GDP and the repo rate, plus a Census 2022 profile for every municipality. Each figure shows its source.
DataTypeScript · PythonGitHub @ubayd-hattasOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
A public platform making South African data accessible through interactive visualizations, transparent methodologies and educational insights.
Taken from the repository README
Loading the full README.
Read the full README ↗South Africa's official numbers, explained where you live, with every figure traced to its source.
Live at sadatahub.tech. Independent and not affiliated with any government department. MIT licensed.
| Home | Municipality | Release explainer |
|---|---|---|
Official South African statistics are published as PDFs, Excel workbooks and portals that assume you already know where to look. SA Data Hub takes the same figures from Stats SA, the South African Reserve Bank (SARB), the South African Police Service (SAPS) and the Department of Basic Education (DBE), and puts them in plain English next to the place or release people are asking about.
Search Console for the three months to 23 October 2026 shows who uses it: 92% of clicks came from South Africa and about 80% landed on municipality pages. The product follows that. Municipality pages get the most care, and each monthly or quarterly release gets an explainer.
/updates, a platform changelog, and an RSS feed. Datasets carry schema.org Dataset markup. Every page has a "Report an error" link.Every figure shows three things: its source, the date the source released it, and the date it was last checked on SA Data Hub. The build fails if a displayed statistic is missing any of them (assertSiteSourced() in src/lib/sourcing.ts), so an unsourced number cannot ship by accident.
Other rules the project follows:
automation/ and the PostgreSQL migration in db/ are paused.The full set of rules is in docs/PRODUCT_DIRECTION.md, and what is built, paused and still missing is in docs/CURRENT_STATE.md. The visual system (light by default, serif headings, one accent colour, no gradients) is in docs/DESIGN.md. A draft write-up of the October 2026 redesign, with before and after screenshots, is in docs/case-study/.
| Source | Used for |
|---|---|
| Statistics South Africa | Census 2022 (Provinces at a glance, Municipal fact sheet), Quarterly Labour Force Survey, CPI, GDP, mid-year population estimates |
| South African Reserve Bank | Repo and prime rates |
| South African Police Service | Crime statistics |
| Department of Basic Education | Matric results |
| Department of Higher Education and Training | Higher education enrolment |
Definitions, release schedules and known limits are on the methodology page. Source files used for entry are kept in sources/ (PDFs are not committed).
Next.js 15 (App Router), TypeScript, Tailwind CSS, Recharts, Vitest, ESLint. Source Serif 4 and Inter for type. Deployed on Vercel from main.
Data lives in JSON files in src/data/datasets/ and is read at build time, so almost every page is static. Setting DATA_SOURCE=database with a DATABASE_URL switches the data layer to PostgreSQL on Neon, which is paused and not used in production.
git clone https://github.com/ubayd-hattas/SA_DataHub.git
cd SA_DataHub
npm install
npm run dev # http://localhost:3000
No environment variables are needed for the default JSON data layer.
npm test # Vitest
npm run lint
npm run build # also runs the sourcing check
On the last full run of main, type-checking was clean and Vitest reported 455 passed and 27 skipped (the skipped ones need a database).
sources/releases/.src/data/datasets/, keeping the source, release date and checked date for each figure.src/data/update-history.ts so it appears on /updates.npm test and npm run build. The sourcing check will name any figure that is missing a field.Per-dataset steps (what to download, which files, the explainer and the 2-working-day target) are in docs/RUNBOOK.md.
src/app/ Pages: home, municipalities, provinces, category, explainers,
answers, insights, tools, methodology, updates, downloads
src/components/ editorial/ (shared page pieces), charts/, explainers/, home/, layout/
src/data/ datasets/*.json, answers.ts, explainers/, stories.ts, update-history.ts
src/lib/ sourcing.ts, search*.ts, compare.ts, money-value.ts, citation.ts, seo.ts
tests/ unit/ and equivalence/
docs/ Product direction, design system, case study, architecture notes
automation/, db/ Paused: scheduled data checks and the PostgreSQL migration
The most useful contribution is a correction. If a figure looks wrong, open an issue with the page, the figure and where you saw the right one, or use the "Report an error" link on any page. Suggestions for questions the Answers section should cover are also welcome. Please open an issue before a large pull request.
Built and maintained by Ubayd Hattas, a Computer Science, Statistics and Data Science student at the University of Cape Town. More on the About page.
MIT. The underlying data remains subject to the terms of the original publishers.