Olaroti commited on
Commit
70ad52d
·
verified ·
1 Parent(s): a0e80c6

Standardize Electric Sheep Africa dataset card

Browse files
Files changed (1) hide show
  1. README.md +99 -284
README.md CHANGED
@@ -1,330 +1,145 @@
1
  ---
 
2
  language:
3
  - en
4
- license: cc-by-4.0
5
- size_categories:
6
- - 100K<n<1M
7
  task_categories:
8
- - tabular-regression
9
  - tabular-classification
10
- pretty_name: African Agriculture & Food Security Synthetic Dataset
 
 
 
11
  tags:
12
- - agriculture
13
- - food-security
14
- - africa
15
- - synthetic-data
16
- - smallholder-farming
17
- - climate
18
- - yields
19
- - synthetic
20
- data_type: synthetic
 
 
 
 
 
 
 
 
 
21
  ---
22
 
23
- > ⚠️ **Synthetic dataset** — Parameterized from published SSA literature, not real observations. Not suitable for empirical analysis or policy inference.
24
 
25
- # African Agriculture & Food Security Synthetic Dataset v2.0
26
 
27
- ## Dataset Summary
 
 
 
28
 
29
- This dataset contains **1,000,000 synthetic household records** for African agriculture and food security research. Every variable is grounded in peer-reviewed literature, making it ideal for algorithm development, methods research, and education without privacy concerns.
30
 
31
- **Key Features:**
32
- - 🌍 **African-specific**: Patterns from Sub-Saharan Africa
33
- - 📚 **Literature-grounded**: 23 peer-reviewed sources
34
- - 🔒 **100% synthetic**: No real households
35
- - ✅ **Validated**: 88.9% validation success rate
36
- - 🔄 **Reproducible**: Fixed random seed (42)
37
 
38
- ## Dataset Details
39
 
40
- ### Dataset Description
41
 
42
- **Size**: 1,000,000 rows × 12 variables
43
- **Format**: CSV (162 MB) + Parquet (64 MB)
44
- **License**: CC-BY-4.0
45
- **Created**: November 2025
46
- **Version**: 2.0
47
 
48
- ### Variables
49
 
50
- | Variable | Type | Description | Source |
51
- |----------|------|-------------|--------|
52
- | `agro_ecological_zone` | categorical | AEZ classification (5 zones) | FAO (2003) |
53
- | `region_type` | categorical | Settlement type (rural/peri-urban/urban) | Tacoli (2003) |
54
- | `farm_size_ha` | continuous | Farm size in hectares | Lowder et al. (2016) |
55
- | `soil_quality_index` | continuous | Soil quality (0-100 scale) | Vagen et al. (2016) |
56
- | `rainfall_mm_annual` | continuous | Annual rainfall (mm) | Sheffield et al. (2014) |
57
- | `household_size` | count | Number of household members | DHS (2018-2020) |
58
- | `market_distance_km` | continuous | Distance to nearest market (km) | Minten et al. (2013) |
59
- | `livestock_tlu` | continuous | Livestock in Tropical Livestock Units | Robinson et al. (2011) |
60
- | `extension_access` | binary | Agricultural extension access (yes/no) | Davis et al. (2010) |
61
- | `fertilizer_use_kg_ha` | continuous | Fertilizer application rate (kg/ha) | Sheahan & Barrett (2017) |
62
- | `rainfall_mm_season` | continuous | Growing season rainfall (mm) | Ramirez-Villegas & Thornton (2015) |
63
- | `maize_yield_kg_ha` | continuous | Maize grain yield (kg/ha) | FAO Stat |
64
 
65
- ### Dataset Structure
66
 
67
- ```python
68
- import pandas as pd
 
 
69
 
70
- # Load data (Parquet recommended for speed)
71
- df = pd.read_parquet('synthetic_data.parquet')
72
 
73
- # Shape
74
- print(df.shape) # (1000000, 12)
75
 
76
- # Preview
77
- print(df.head())
78
- ```
79
 
80
- **Example row:**
81
- ```
82
- agro_ecological_zone: semi_arid
83
- region_type: rural_accessible
84
- farm_size_ha: 1.79
85
- soil_quality_index: 22.5
86
- rainfall_mm_annual: 520
87
- household_size: 5
88
- market_distance_km: 8.1
89
- livestock_tlu: 13.6
90
- extension_access: no
91
- fertilizer_use_kg_ha: 0.0
92
- rainfall_mm_season: 314
93
- maize_yield_kg_ha: 1064
94
  ```
95
 
96
- ## Uses
97
-
98
- ### Direct Use
99
-
100
- ✅ **Permitted:**
101
- - Machine learning algorithm development & testing
102
- - Statistical methods research
103
- - Educational tutorials & training
104
- - Reproducible research examples
105
- - Capacity building in data-scarce environments
106
- - Policy simulation (with appropriate caveats)
107
-
108
- ❌ **Prohibited:**
109
- - Real-world policy targeting
110
- - Actual resource allocation decisions
111
- - Surveillance or monitoring
112
- - Any use that could harm vulnerable populations
113
-
114
- ### Out-of-Scope Use
115
-
116
- - **NOT for real targeting**: Never use for selecting actual households for programs
117
- - **Context-specific**: Designed for Sub-Saharan African contexts only
118
- - **Validate before deployment**: Always test on real data before production use
119
-
120
- ## Dataset Creation
121
-
122
- ### Curation Rationale
123
-
124
- African agriculture research faces a **data paradox**: high-stakes decisions require robust evidence, but household-level data is scarce, restricted, or privacy-sensitive. This synthetic dataset enables:
125
-
126
- 1. **Algorithm development** without waiting for data access
127
- 2. **Reproducible research** with shareable datasets
128
- 3. **Capacity building** in data science for agriculture
129
- 4. **Privacy preservation** while maintaining realistic patterns
130
-
131
- ### Source Data
132
-
133
- #### Data Collection
134
-
135
- This is **100% synthetic data** - no real households were included. All parameters derived from:
136
-
137
- - **Peer-reviewed publications** (primary source)
138
- - **FAO statistical databases**
139
- - **DHS (Demographic & Health Surveys)**
140
- - **LSMS-ISA (Living Standards Measurement Study)**
141
- - **Climate databases** (FEWS NET, Sheffield et al.)
142
-
143
- #### Who are the source data producers?
144
-
145
- **Literature sources** (23 peer-reviewed papers):
146
- - Agricultural economics journals
147
- - Climate science publications
148
- - Development economics research
149
- - Soil science literature
150
- - Livestock systems research
151
-
152
- Full bibliography in `literature_inventory.csv`
153
-
154
- ### Annotations
155
-
156
- #### Annotation process
157
-
158
- Not applicable - this is fully synthetic data generated from statistical distributions.
159
-
160
- #### Who are the annotators?
161
-
162
- N/A - synthetic generation
163
-
164
- ### Personal and Sensitive Information
165
 
166
- **None** - This dataset contains NO personal information. All data is synthetically generated.
167
-
168
- ## Bias, Risks, and Limitations
169
-
170
- ### Known Limitations
171
-
172
- 1. **Simplified relationships**: Real agricultural systems are more complex
173
- 2. **Cross-sectional only**: No panel/longitudinal data (yet)
174
- 3. **Missing variables**: Not all relevant variables included (e.g., prices, credit access)
175
- 4. **No spatial coordinates**: Zone-level only, no GPS
176
- 5. **Generalized parameters**: Represents "typical" SSA patterns, not country-specific
177
-
178
- ### Biases
179
-
180
- - **Literature bias**: Parameters reflect published research, which may under-represent marginalized populations
181
- - **Geographic bias**: Primarily East/Southern Africa (where more data exists)
182
- - **Temporal**: Reflects 2010-2020 period patterns
183
-
184
- ### Recommendations
185
 
186
- Users should:
187
- 1. **Always validate** on real data before production deployment
188
- 2. **Acknowledge synthetic nature** in all uses
189
- 3. **Understand limitations** for their specific use case
190
- 4. **Consider biases** in the underlying literature
191
- 5. **Cite properly** (see below)
192
 
193
- ## Additional Information
194
 
195
- ### Dataset Curators
 
 
 
196
 
197
- Created using the **Synthetic Data Generation Playbook** methodology:
198
- - Parameter extraction from 23 peer-reviewed sources
199
- - Literature-grounded distributions
200
- - African context constraints
201
- - Validated against benchmarks (88.9% success rate)
202
 
203
- ### Licensing Information
 
 
 
 
204
 
205
- - **Dataset**: Creative Commons Attribution 4.0 (CC-BY-4.0)
206
- - **Code**: MIT License
207
- - **Documentation**: CC-BY-4.0
208
 
209
- **Requirements**:
210
- - ✅ Attribution required
211
- - ✅ Must acknowledge synthetic nature
212
- - ✅ Follow acceptable use policy
213
- - ❌ No warranty provided
214
 
215
- ### Citation Information
216
 
217
  ```bibtex
218
- @dataset{african_agriculture_synthetic_2024,
219
- title = {African Agriculture and Food Security Synthetic Dataset v2.0},
220
- author = {Electric Sheep Africa},
221
- year = {2024},
222
- publisher = {HuggingFace},
223
- version = {2.0.0},
224
- url = {https://huggingface.co/datasets/electricsheepafrica/african-agriculture-synthetic},
225
- note = {1 million synthetic household records, 12 variables, 23 literature sources}
226
  }
227
  ```
228
 
229
- ### Contributions
230
-
231
- Contributions welcome! Please see `CONTRIBUTING.md` for guidelines.
232
-
233
- **Report issues**:
234
- - Data quality issues
235
- - Documentation improvements
236
- - New variable suggestions
237
- - Validation findings
238
-
239
- ## Quality Metrics
240
-
241
- ### Validation Results
242
-
243
- **Overall**: 88.9% validation success rate (32/36 tests passed)
244
-
245
- **Passed Tests** ✅:
246
- - Schema validation (all 12 variables present)
247
- - Range validation (all variables within bounds)
248
- - Distribution shapes (skewness, zero-inflation)
249
- - Key correlations (rainfall-yield, fertilizer-yield)
250
- - Missing data patterns
251
- - Logical consistency (seasonal ≤ annual rainfall)
252
- - Benchmark comparisons
253
-
254
- **Known Issues** ⚠️:
255
- - Farm size median 1.28 ha vs. expected 1.6 ha (acceptable - reflects peri-urban farms)
256
- - Some correlations weaker than literature (expected for synthetic data)
257
-
258
- Full validation report in `output/validation_results.json`
259
-
260
- ## Technical Specifications
261
 
262
- ### Generation Details
263
 
264
- - **Sample size**: 1,000,000 households
265
- - **Random seed**: 42 (reproducible)
266
- - **Generation time**: ~47 seconds
267
- - **Framework**: Python 3.8+, NumPy, Pandas, SciPy
268
- - **Methodology**: Conditional generation with dependency graphs
269
 
270
- ### Distribution Types Used
271
 
272
- - **Normal/Lognormal**: Farm size, market distance
273
- - **Gamma**: Rainfall, household size
274
- - **Beta**: Soil quality (0-100 bounded)
275
- - **Zero-inflated Gamma**: Livestock, fertilizer
276
- - **Categorical**: AEZ, region type, extension access
277
-
278
- ### Conditional Dependencies
279
-
280
- Variables respect realistic dependencies:
281
- - **Farm size** varies by region type (peri-urban smaller)
282
- - **Livestock** varies by AEZ, farm size, rainfall
283
- - **Fertilizer** affected by market distance, extension, AEZ
284
- - **Yields** driven by rainfall, soil, fertilizer, AEZ
285
-
286
- ## Version History
287
-
288
- ### v2.0 (November 2025) - Current
289
-
290
- **Changes from v1.0**:
291
- - ✅ Added 5 new variables (soil quality, extension, fertilizer, seasonal rainfall, region type)
292
- - ✅ Fixed soil quality scaling (now 0-100)
293
- - ✅ Fixed seasonal ≤ annual rainfall constraint
294
- - ✅ Improved conditional dependencies
295
- - ✅ Comprehensive validation framework
296
- - ✅ 88.9% validation success (up from 83.3%)
297
-
298
- **Stats**:
299
- - 1,000,000 rows × 12 variables
300
- - 23 literature sources
301
- - 162 MB (CSV) / 64 MB (Parquet)
302
-
303
- ### v1.0 (November 2025) - Initial
304
-
305
- - 1,000,000 rows × 7 variables
306
- - 11 literature sources
307
- - Basic validation
308
-
309
- ## Acknowledgments
310
-
311
- **Literature sources**: 23 peer-reviewed publications (see `literature_inventory.csv`)
312
-
313
- **Key references**:
314
- - Lowder et al. (2016) - Farm size distributions
315
- - Sheahan & Barrett (2017) - Fertilizer use patterns
316
- - Vagen et al. (2016) - Soil quality
317
- - Robinson et al. (2011) - Livestock systems
318
- - Ramirez-Villegas & Thornton (2015) - Climate impacts
319
-
320
- **Methodology**: Synthetic Data Generation Playbook
321
 
322
  ---
323
 
324
- **Questions?** See full documentation in repository `README.md`
325
-
326
- **Ready to use!** Load with:
327
- ```python
328
- from datasets import load_dataset
329
- dataset = load_dataset("electricsheepafrica/african-agriculture-synthetic")
330
- ```
 
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
+ - 1M<n<10M
11
  tags:
12
+ - "africa"
13
+ - "electric-sheep-africa"
14
+ - "open-data"
15
+ - "metadata-backed"
16
+ - "agriculture-food"
17
+ - "parquet"
18
+ - "tabular"
19
+ - "text"
20
+ - "agriculture"
21
+ - "food-security"
22
+ - "synthetic-data"
23
+ - "smallholder-farming"
24
+ - "climate"
25
+ - "yields"
26
+ - "synthetic"
27
+ - "farming"
28
+ - "food"
29
+ pretty_name: "African Agriculture & Food Security Synthetic Dataset | Africa (Electric Sheep Africa metadata inventory)"
30
  ---
31
 
32
+ # African Agriculture & Food Security Synthetic Dataset | Africa (Electric Sheep Africa metadata inventory)
33
 
34
+ **Size category:** `1M<n<10M` - **Formats:** `parquet` - **Sector:** agriculture_food - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
35
 
36
+ ![size](https://img.shields.io/badge/size-1M%3Cn%3C10M-blue)
37
+ ![sector](https://img.shields.io/badge/sector-agriculture_food-green)
38
+ ![downloads](https://img.shields.io/badge/HF_downloads-15-orange)
39
+ ![license](https://img.shields.io/badge/license-cc--by--4.0-lightgrey)
40
 
41
+ ## TL;DR
42
 
43
+ 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.
 
 
 
 
 
44
 
45
+ ## What This Dataset Covers
46
 
47
+ Public datasets help analysts inspect structured evidence, build reproducible workflows, and compare patterns across domains.
48
 
49
+ 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 Agriculture & Food Security Synthetic Dataset v2.0 Dataset Summary This dataset contains 1,000,000 synthetic household records for African agriculture and food security research. Every variable is grounded in peer-reviewed literature, making it ideal for algorithm development, methods research, and education without… See the full description on the dataset page: https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all.
 
 
 
 
50
 
51
+ ## Dataset Profile
52
 
53
+ | Field | Value |
54
+ |---|---|
55
+ | Hugging Face repo | [`electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all`](https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all) |
56
+ | Sector | agriculture_food |
57
+ | Topic tags | agriculture, food-security, synthetic-data, smallholder-farming, climate, yields, synthetic |
58
+ | Modalities | `tabular`, `text` |
59
+ | Formats | `parquet` |
60
+ | Size category | `1M<n<10M` |
61
+ | Countries | Africa-wide or source-defined African coverage |
62
+ | ISO3 coverage | `not declared` |
63
+ | Last modified on HF | `2026-04-14 22:38:13+00:00` |
64
+ | Inventory snapshot | `2026-07-16T16:00:34Z` |
 
 
65
 
66
+ ## How To Read This Dataset
67
 
68
+ - Start from the repository files and the dataset viewer when available.
69
+ - Treat the README context as a fast orientation layer; confirm variable definitions and units in the data files before modeling.
70
+ - Use explicit country columns when present. When geography is only implied by the title or source metadata, document that assumption in downstream analysis.
71
+ - Preserve missing values until you have a defensible imputation rule.
72
 
73
+ ## Usage
 
74
 
75
+ ```python
76
+ from datasets import load_dataset
77
 
78
+ ds = load_dataset("electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all")
79
+ print(ds)
 
80
 
81
+ split_name = next(iter(ds))
82
+ table = ds[split_name]
83
+ print(table.features)
84
+ print(table[:3])
 
 
 
 
 
 
 
 
 
 
85
  ```
86
 
87
+ ### Convert To Pandas When Tabular
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
+ ```python
90
+ from datasets import Dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
+ first_split = ds[next(iter(ds))]
93
+ if isinstance(first_split, Dataset):
94
+ df = first_split.to_pandas()
95
+ print(df.head())
96
+ ```
 
97
 
98
+ ## Data Quality Notes
99
 
100
+ - This card was standardized from the Electric Sheep Africa Hugging Face metadata inventory.
101
+ - Exact schema, row counts, and source files should be inspected in the repository data files.
102
+ - Metadata gaps from the inventory: country, upstream_publisher.
103
+ - Do not infer policy meaning from labels alone; confirm definitions, units, and methods in the source material.
104
 
105
+ ## Source And Provenance
 
 
 
 
106
 
107
+ - **Source context:** Electric Sheep Africa metadata inventory
108
+ - **Publisher/source attribution:** Public dataset metadata
109
+ - **License:** [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
110
+ - **Hugging Face URL:** [https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all](https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all)
111
+ - **Inventory retrieved at:** `2026-07-16T16:00:34Z`
112
 
113
+ ## Suggested Analyses
 
 
114
 
115
+ - Inspect schema and missingness before modeling.
116
+ - Profile variables by geography, time, and subgroup columns where present.
117
+ - Join with other Electric Sheep Africa datasets using explicit country, year, and indicator fields when available.
118
+ - Build reproducible notebooks that cite both the original source context and the Electric Sheep Africa Hugging Face repo.
 
119
 
120
+ ## Citation
121
 
122
  ```bibtex
123
+ @misc{electric_sheep_africa_africa_synth_agriculture_and_food_security_dataset_all_2026,
124
+ title = {African Agriculture & Food Security Synthetic Dataset | Africa (Electric Sheep Africa metadata inventory)},
125
+ author = {Public dataset metadata},
126
+ year = {2026},
127
+ url = {https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all},
128
+ publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa},
129
+ howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-synth-agriculture-and-food-security-dataset-all}}
 
130
  }
131
  ```
132
 
133
+ ## License
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
+ Released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
136
 
137
+ 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.
 
 
 
 
138
 
139
+ ## About Electric Sheep Africa
140
 
141
+ Electric Sheep Africa publishes ML-ready African public datasets on Hugging Face.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
  ---
144
 
145
+ Provenance: metadata-backed README standardized 2026-08-12 by the Electric Sheep Africa README system. Inventory source: `catalog/esa_metadata_inventory/master_metadata.jsonl`.