Olaroti commited on
Commit
03fd7f2
·
verified ·
1 Parent(s): 404f03b

Standardize Electric Sheep Africa dataset card

Browse files
Files changed (1) hide show
  1. README.md +95 -198
README.md CHANGED
@@ -1,245 +1,142 @@
1
  ---
2
  license: cc-by-4.0
 
 
3
  task_categories:
4
  - tabular-classification
5
  - tabular-regression
6
- language:
7
- - en
8
- tags:
9
- - governance
10
- - civil-service
11
- - public-administration
12
- - sub-saharan-africa
13
- - synthetic
14
- - lmic
15
- pretty_name: African Civil Service Capacity
16
  size_categories:
17
  - 10K<n<100K
18
- configs:
19
- - config_name: baseline
20
- data_files:
21
- - split: train
22
- path: data/baseline.csv
23
- - config_name: reform_modernized
24
- data_files:
25
- - split: train
26
- path: data/reform_modernized.csv
27
- - config_name: underresourced
28
- data_files:
29
- - split: train
30
- path: data/underresourced.csv
31
- data_type: synthetic
 
 
32
  ---
33
 
34
- > ⚠️ **Synthetic dataset** Parameterized from published SSA literature, not real observations. Not suitable for empirical analysis or policy inference.
35
-
36
- # African Civil Service Capacity
37
-
38
- ## Abstract
39
-
40
- This dataset contains 30,000 synthetic records (10,000 per scenario) describing civil-service staffing, qualifications, training, retention, and performance across 12 Sub-Saharan African countries. It is designed for tabular classification (capacity class: critical / low / moderate / high) and regression (capacity score, vacancy rate, digital literacy rate). Three counterfactual scenarios — **baseline**, **reform_modernized**, and **underresourced** — enable policy simulation of civil-service reform outcomes.
41
-
42
- ## Introduction
43
 
44
- Civil service capacity is a primary determinant of public-sector delivery quality across Sub-Saharan Africa (SSA). Across the continent, public employees constitute fewer than 12% of total employment [Mo Ibrahim Foundation, 2018], vacancy rates range from 12% to 40% depending on country and region, and qualification gaps remain substantial — only 9% of African youth possess tertiary education [Mastercard Foundation, 2026].
45
 
46
- Country-level evidence reveals sharp variation. Kenya's Public Service Commission reported 113,340 vacancies (36.5%) against 310,735 approved posts in 2025, alongside 1,019 fake certificates detected and just 46.6% participation in continuous professional development [Kenya PSC, 2025]. South Africa's vacancy rate stands at 19.1% with a public-sector wage bill consuming 10.4% of GDP [SA PSC, 2024; SA National Treasury MTBPS, 2024]. Uganda employs 366,574 public servants for 45.9 million citizens — roughly 80 per 10,000 [Uganda MoPS, 2023]. Botswana and Mauritius rank as top performers on public-service quality indices, while Chad scores lowest at 28.75% on service delivery [Mo Ibrahim Foundation, 2018].
 
 
 
47
 
48
- This dataset provides a parameterised, reproducible synthetic resource for training ML models on African governance capacity without exposing sensitive personnel data.
49
 
50
- ## Methodology
51
 
52
- ### Parameterization
53
 
54
- Country parameters are anchored to published administrative statistics. The table below maps each parameter to its evidence source.
55
 
56
- | Parameter | Country | Value | Source |
57
- |---|---|---|---|
58
- | Vacancy rate | South Africa | 19.1% | SA PSC, Public Service Reforms Report, 2024 |
59
- | Wage bill (% GDP) | South Africa | 10.4% | SA National Treasury, MTBPS Compensation & Employment Data, 2024 |
60
- | Public servants | Uganda | 366,574 (80 per 10k) | Uganda MoPS, State of HR Report, 2023 |
61
- | Population (2023/24) | Uganda | 45.9M | Uganda MoPS, 2023 |
62
- | Public employment share | SSA average | <12% of total employment | Mo Ibrahim Foundation, Public Service in Africa, 2018 |
63
- | Service delivery score | Chad (lowest) | 28.75% | Mo Ibrahim Foundation, 2018 |
64
- | Top performers | Botswana, Mauritius | Ranked highest | Mo Ibrahim Foundation, 2018 |
65
- | Vacancies | Kenya | 113,340 (36.5% of 310,735 approved posts) | Kenya PSC, Annual Report, 2025 |
66
- | Fake certificates | Kenya | 1,019 found | Kenya PSC, 2025 |
67
- | CPD participation | Kenya | 46.6% | Kenya PSC, 2025 |
68
- | Tertiary education rate | SSA youth | 9% | Mastercard Foundation, 2026 |
69
- | Africa development dynamics | Pan-African | Employment & governance metrics | OECD/AUC, Africa's Development Dynamics, 2024 |
70
 
71
- ### Generation Process
72
 
73
- For each record:
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- 1. A country is sampled uniformly from 12 SSA nations.
76
- 2. A year (2018–2025) is drawn; population is projected forward using each country's growth rate.
77
- 3. Region type (capital / urban / rural / remote) is drawn with weights that depend on the country's development tier, modulating vacancy and qualification rates.
78
- 4. Sector (10 categories) and grade level (5 categories) are sampled from empirical weight distributions.
79
- 5. Vacancy rate, degree rate, training hours, retention, salary, wage bill, performance evaluation, and digital literacy are computed as deterministic functions of country parameters, region adjustments, scenario multipliers, and bounded random noise.
80
- 6. A composite **capacity score** (0–1) is calculated as a weighted sum of vacancy, qualification, training, retention, evaluation, and digital literacy rates.
81
- 7. The score is discretised into four **capacity classes**: high (≥0.65), moderate (0.50–0.65), low (0.35–0.50), critical (<0.35).
82
 
83
- ### Scenario Design
84
-
85
- | Scenario | Vacancy multiplier | Qualification multiplier | Training multiplier | Description |
86
- |---|---|---|---|---|
87
- | `baseline` | 1.0× | 1.0× | 1.0× | Current SSA civil service landscape |
88
- | `reform_modernized` | 0.7× | 1.3× | 1.5× | Meritocratic recruitment reform, digital transformation, increased CPD investment |
89
- | `underresourced` | 1.5× | 0.7× | 0.5× | Austerity, brain drain, reduced training budgets |
90
-
91
- ## Dataset Description
92
-
93
- ### Schema
94
-
95
- | Column | Type | Description | Range |
96
- |---|---|---|---|
97
- | `record_id` | int | Unique record identifier | 1–10000 |
98
- | `country` | str | Country name | 12 SSA nations |
99
- | `year` | int | Observation year | 2018–2025 |
100
- | `region_type` | str | Geographic region type | capital, urban, rural, remote |
101
- | `sector` | str | Government sector | 10 sectors |
102
- | `grade_level` | str | Seniority level | Junior, Mid_Level, Senior, Director, Executive |
103
- | `population_millions` | float | Estimated population (millions) | 0.5–300 |
104
- | `total_posts` | int | Total approved posts | — |
105
- | `vacancy_rate` | float | Proportion of unfilled posts | 0.05–0.60 |
106
- | `filled_posts` | int | Number of filled posts | — |
107
- | `degree_rate` | float | Proportion with tertiary degree | 0.10–0.80 |
108
- | `degree_holders` | int | Number holding degrees | — |
109
- | `training_hours_annual` | int | Annual training hours per employee | 0–100+ |
110
- | `training_participation_rate` | float | Proportion participating in CPD | 0.20–0.95 |
111
- | `retention_rate` | float | Annual staff retention rate | 0.50–0.98 |
112
- | `avg_salary_usd` | float | Average monthly salary (USD) | 20–5000 |
113
- | `wage_bill_pct_gdp` | float | Public wage bill as % of GDP | 0–0.20 |
114
- | `performance_eval_rate` | float | Proportion with formal evaluations | 0.15–0.95 |
115
- | `digital_literacy_rate` | float | Digital literacy rate | 0.10–0.90 |
116
- | `capacity_score` | float | Composite capacity score | 0.0–1.0 |
117
- | `capacity_class` | str | Discretised capacity class | critical, low, moderate, high |
118
-
119
- ### Summary Statistics
120
-
121
- | Metric | Baseline | Reform Modernized | Underresourced |
122
- |---|---|---|---|
123
- | Mean vacancy rate | 0.249 | 0.174 | 0.357 |
124
- | Mean degree rate | 0.308 | 0.400 | 0.218 |
125
- | Mean training hours | 24.5 | 37.0 | 12.0 |
126
- | Mean capacity score | 0.535 | 0.623 | 0.439 |
127
- | Capacity: critical | 908 | 43 | 2,664 |
128
- | Capacity: low | 3,070 | 2,531 | 4,169 |
129
- | Capacity: moderate | 3,322 | 3,564 | 3,164 |
130
- | Capacity: high | 2,700 | 3,862 | 3 |
131
-
132
- ## Validation Results
133
-
134
- All datasets pass column, range, categorical, and consistency checks. A small number of boundary-edge cases (scores landing exactly on class thresholds) are flagged but are benign floating-point artifacts.
135
-
136
- Diagnostic plots (generated by `validate_dataset.py`) are stored in `data/plots/`:
137
-
138
- - `scenario_comparison.png` — Distribution overlays of six key metrics across scenarios
139
- - `capacity_class_distribution.png` — Class count bar charts per scenario
140
- - `vacancy_by_country.png` — Box plots of vacancy rate by country per scenario
141
- - `capacity_by_country.png` — Box plots of capacity score by country per scenario
142
 
143
  ## Usage
144
 
145
- ### Loading Data
146
-
147
  ```python
148
- import pandas as pd
149
-
150
- baseline = pd.read_csv("data/baseline.csv")
151
- reform = pd.read_csv("data/reform_modernized.csv")
152
- underresourced = pd.read_csv("data/underresourced.csv")
153
- ```
154
-
155
- ### Classification Example
156
-
157
- ```python
158
- from sklearn.model_selection import train_test_split
159
- from sklearn.ensemble import RandomForestClassifier
160
- from sklearn.metrics import classification_report
161
-
162
- df = pd.read_csv("data/baseline.csv")
163
- features = ["vacancy_rate", "degree_rate", "training_hours_annual",
164
- "training_participation_rate", "retention_rate", "avg_salary_usd",
165
- "wage_bill_pct_gdp", "performance_eval_rate", "digital_literacy_rate"]
166
- X = df[features]
167
- y = df["capacity_class"]
168
-
169
- X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
170
- clf = RandomForestClassifier(n_estimators=100, random_state=42)
171
- clf.fit(X_train, y_train)
172
- print(classification_report(y_test, clf.predict(X_test)))
173
- ```
174
 
175
- ### Regression Example
 
176
 
177
- ```python
178
- from sklearn.ensemble import GradientBoostingRegressor
179
- from sklearn.metrics import mean_squared_error
180
-
181
- X = df[features]
182
- y = df["capacity_score"]
183
- X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
184
- reg = GradientBoostingRegressor(n_estimators=200, random_state=42)
185
- reg.fit(X_train, y_train)
186
- print("RMSE:", mean_squared_error(y_test, reg.predict(X_test), squared=False))
187
  ```
188
 
189
- ### Hugging Face Datasets
190
 
191
  ```python
192
- from datasets import load_dataset
193
 
194
- ds = load_dataset("electricsheepafrica/african-civil-service-capacity", "baseline")
 
 
 
195
  ```
196
 
197
- ## Reproduction
198
 
199
- ```bash
200
- pip install -r requirements.txt
201
- python generate_dataset.py --scenario baseline --n 10000 --seed 42
202
- python generate_dataset.py --scenario reform_modernized --n 10000 --seed 42
203
- python generate_dataset.py --scenario underresourced --n 10000 --seed 42
204
- python validate_dataset.py
205
- ```
206
 
207
- ## Limitations
208
 
209
- 1. **Synthetic data** All records are generated, not drawn from administrative registers. Correlations are modelled, not empirically estimated from linked micro-data.
210
- 2. **Country uniformity** Records are drawn uniformly across countries, not proportional to actual public employment volumes. Nigeria's 230M population gets the same weight as Botswana's 2.6M.
211
- 3. **Temporal dynamics** Year-to-year changes use a simple growth projection; no autoregressive or lagged effects are modelled.
212
- 4. **Sector/grade independence** — Sector and grade assignments are independent draws; real staffing has cross-tabulation structure.
213
- 5. **No gender or age breakdowns** — The dataset does not disaggregate by demographics.
214
- 6. **Boundary sensitivity** — A small number of capacity scores land exactly on class thresholds due to floating-point arithmetic, producing negligible misclassifications in validation.
215
 
216
- ## References
217
 
218
- 1. South Africa Public Service Commission. *Public Service Reforms Report*. 2024.
219
- 2. South Africa National Treasury. *Medium Term Budget Policy Statement: Compensation and Employment Data*. 2024.
220
- 3. Statistics South Africa. *Annual Report 2023/24*. 2024.
221
- 4. Uganda Ministry of Public Service. *State of Human Resources Report*. 2023.
222
- 5. OECD / African Union Commission. *Africa's Development Dynamics 2024*. 2024.
223
- 6. Mo Ibrahim Foundation. *Public Service in Africa: Working for the People*. 2018.
224
- 7. Kenya Public Service Commission. *Annual Report*. 2025.
225
- 8. Mastercard Foundation. *Africa Youth Employment and Education Report*. 2026.
226
- 9. Africa Careers Network. *Employability in Africa Survey*. 2023.
227
 
228
  ## Citation
229
 
230
- If you use this dataset, please cite:
231
-
232
  ```bibtex
233
- @misc{esa_civil_service_2026,
234
- title = {African Civil Service Capacity Dataset},
235
- author = {Electric Sheep Africa},
236
- year = {2026},
237
- publisher = {Hugging Face},
238
- url = {https://huggingface.co/datasets/electricsheepafrica/african-civil-service-capacity},
239
- note = {Synthetic tabular dataset for civil-service capacity classification and regression}
240
  }
241
  ```
242
 
243
  ## License
244
 
245
- This dataset is released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. You are free to share and adapt the material for any purpose, including commercially, provided you give appropriate credit.
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ language:
4
+ - en
5
  task_categories:
6
  - tabular-classification
7
  - tabular-regression
8
+ multilinguality: monolingual
 
 
 
 
 
 
 
 
 
9
  size_categories:
10
  - 10K<n<100K
11
+ tags:
12
+ - "africa"
13
+ - "electric-sheep-africa"
14
+ - "open-data"
15
+ - "metadata-backed"
16
+ - "governance-security"
17
+ - "csv"
18
+ - "tabular"
19
+ - "text"
20
+ - "governance"
21
+ - "civil-service"
22
+ - "public-administration"
23
+ - "sub-saharan-africa"
24
+ - "synthetic"
25
+ - "lmic"
26
+ pretty_name: "African Civil Service Capacity | Africa (Electric Sheep Africa metadata inventory)"
27
  ---
28
 
29
+ # African Civil Service Capacity | Africa (Electric Sheep Africa metadata inventory)
 
 
 
 
 
 
 
 
30
 
31
+ **Size category:** `10K<n<100K` - **Formats:** `csv` - **Sector:** governance_security - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
32
 
33
+ ![size](https://img.shields.io/badge/size-10K%3Cn%3C100K-blue)
34
+ ![sector](https://img.shields.io/badge/sector-governance_security-green)
35
+ ![downloads](https://img.shields.io/badge/HF_downloads-21-orange)
36
+ ![license](https://img.shields.io/badge/license-cc--by--4.0-lightgrey)
37
 
38
+ ## TL;DR
39
 
40
+ This dataset is part of the Electric Sheep Africa catalog on Hugging Face. It is indexed for African data discovery with standardized metadata, loading guidance, provenance notes, and analyst-oriented context.
41
 
42
+ ## What This Dataset Covers
43
 
44
+ Public datasets help analysts inspect structured evidence, build reproducible workflows, and compare patterns across domains.
45
 
46
+ Dataset context from the existing Hugging Face card: ⚠️ Synthetic dataset — Parameterized from published SSA literature, not real observations. Not suitable for empirical analysis or policy inference. African Civil Service Capacity Abstract This dataset contains 30,000 synthetic records (10,000 per scenario) describing civil-service staffing, qualifications, training, retention, and performance across 12 Sub-Saharan African countries. It is designed for tabular classification (capacity class: critical / low / moderate /… See the full description on the dataset page: https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire.
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
+ ## Dataset Profile
49
 
50
+ | Field | Value |
51
+ |---|---|
52
+ | Hugging Face repo | [`electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire`](https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire) |
53
+ | Sector | governance_security |
54
+ | Topic tags | governance, civil-service, public-administration, sub-saharan-africa, synthetic, lmic |
55
+ | Modalities | `tabular`, `text` |
56
+ | Formats | `csv` |
57
+ | Size category | `10K<n<100K` |
58
+ | Countries | Africa-wide or source-defined African coverage |
59
+ | ISO3 coverage | `not declared` |
60
+ | Last modified on HF | `2026-04-14 22:57:59+00:00` |
61
+ | Inventory snapshot | `2026-07-16T16:00:34Z` |
62
 
63
+ ## How To Read This Dataset
 
 
 
 
 
 
64
 
65
+ - Start from the repository files and the dataset viewer when available.
66
+ - Treat the README context as a fast orientation layer; confirm variable definitions and units in the data files before modeling.
67
+ - Use explicit country columns when present. When geography is only implied by the title or source metadata, document that assumption in downstream analysis.
68
+ - Preserve missing values until you have a defensible imputation rule.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  ## Usage
71
 
 
 
72
  ```python
73
+ from datasets import load_dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
+ ds = load_dataset("electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire")
76
+ print(ds)
77
 
78
+ split_name = next(iter(ds))
79
+ table = ds[split_name]
80
+ print(table.features)
81
+ print(table[:3])
 
 
 
 
 
 
82
  ```
83
 
84
+ ### Convert To Pandas When Tabular
85
 
86
  ```python
87
+ from datasets import Dataset
88
 
89
+ first_split = ds[next(iter(ds))]
90
+ if isinstance(first_split, Dataset):
91
+ df = first_split.to_pandas()
92
+ print(df.head())
93
  ```
94
 
95
+ ## Data Quality Notes
96
 
97
+ - This card was standardized from the Electric Sheep Africa Hugging Face metadata inventory.
98
+ - Exact schema, row counts, and source files should be inspected in the repository data files.
99
+ - Metadata gaps from the inventory: country, upstream_publisher.
100
+ - Do not infer policy meaning from labels alone; confirm definitions, units, and methods in the source material.
 
 
 
101
 
102
+ ## Source And Provenance
103
 
104
+ - **Source context:** Electric Sheep Africa metadata inventory
105
+ - **Publisher/source attribution:** Public dataset metadata
106
+ - **License:** [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
107
+ - **Hugging Face URL:** [https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire](https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire)
108
+ - **Inventory retrieved at:** `2026-07-16T16:00:34Z`
 
109
 
110
+ ## Suggested Analyses
111
 
112
+ - Inspect schema and missingness before modeling.
113
+ - Profile variables by geography, time, and subgroup columns where present.
114
+ - Join with other Electric Sheep Africa datasets using explicit country, year, and indicator fields when available.
115
+ - Build reproducible notebooks that cite both the original source context and the Electric Sheep Africa Hugging Face repo.
 
 
 
 
 
116
 
117
  ## Citation
118
 
 
 
119
  ```bibtex
120
+ @misc{electric_sheep_africa_africa_synth_governance_civil_service_capacity_cote_divoire_2026,
121
+ title = {African Civil Service Capacity | Africa (Electric Sheep Africa metadata inventory)},
122
+ author = {Public dataset metadata},
123
+ year = {2026},
124
+ url = {https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire},
125
+ publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa},
126
+ howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-synth-governance-civil-service-capacity-cote-divoire}}
127
  }
128
  ```
129
 
130
  ## License
131
 
132
+ Released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
133
+
134
+ Original source rights remain with the original publisher or data provider. Electric Sheep Africa engineering standardizes discovery metadata, documentation, and usage guidance for analysis on Hugging Face.
135
+
136
+ ## About Electric Sheep Africa
137
+
138
+ Electric Sheep Africa publishes ML-ready African public datasets on Hugging Face.
139
+
140
+ ---
141
+
142
+ Provenance: metadata-backed README standardized 2026-08-12 by the Electric Sheep Africa README system. Inventory source: `catalog/esa_metadata_inventory/master_metadata.jsonl`.