Olaroti commited on
Commit
d918d9c
·
verified ·
1 Parent(s): 2031085

Standardize Electric Sheep Africa dataset card

Browse files
Files changed (1) hide show
  1. README.md +95 -99
README.md CHANGED
@@ -5,87 +5,70 @@ language:
5
  task_categories:
6
  - tabular-classification
7
  - tabular-regression
8
- - time-series-forecasting
9
  multilinguality: monolingual
10
  size_categories:
11
  - 10K<n<100K
12
  tags:
13
- - tabular
14
- - africa
15
- - faostat-(fao)
16
- - land,-inputs-and-sustainability
17
- - faostat
18
- - fao
19
- - agriculture
20
- - food-security
21
- - time-series
22
- pretty_name: "Livestock Patterns — Stocks | Africa (FAOSTAT)"
 
 
 
 
 
 
 
 
23
  ---
24
 
25
- # Livestock Patterns — Stocks | Africa (FAOSTAT)
26
 
27
- 🌍 **35,028 observations** · **54 Africa countries** · **1961–2023** · *Repackaged by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
28
 
29
- ![rows](https://img.shields.io/badge/rows-35,028-blue) ![countries](https://img.shields.io/badge/countries-54-green) ![years](https://img.shields.io/badge/years-1961–2023-orange) ![indicators](https://img.shields.io/badge/indicators-14-purple) ![license](https://img.shields.io/badge/license-cc-by-4.0-lightgrey)
 
 
 
30
 
31
  ## TL;DR
32
 
33
- This dataset contains **35,028 observations** of `Land, Inputs and Sustainability` data across **54 Africa countries**, spanning **1961–2023**, covering **14 distinct indicators**.
34
-
35
- ## About the source
36
-
37
- - **Source:** [FAOSTAT (FAO)](https://www.fao.org/faostat/en/#data/EK)
38
- - **Publisher:** Food and Agriculture Organization of the United Nations (FAO)
39
- - **License:** [cc-by-4.0](https://creativecommons.org/licenses/by/4.0/)
40
- - **Topic:** Land, Inputs and Sustainability
41
-
42
- ## Geographic coverage
43
-
44
- 54 Africa countries · top rows shown below, sorted by row count:
45
-
46
- | Country | Rows | First year | Last year |
47
- |---------|-----:|-----------:|----------:|
48
- | `Egypt` | 882 | 1961 | 2023 |
49
- | `Algeria` | 819 | 1961 | 2023 |
50
- | `Somalia` | 819 | 1961 | 2023 |
51
- | `Tunisia` | 819 | 1961 | 2023 |
52
- | `Mauritius` | 819 | 1961 | 2023 |
53
- | `Morocco` | 819 | 1961 | 2023 |
54
- | `Namibia` | 780 | 1961 | 2023 |
55
- | `Chad` | 756 | 1961 | 2023 |
56
- | `Niger` | 756 | 1961 | 2023 |
57
- | `Mali` | 756 | 1961 | 2023 |
58
- | `South Africa` | 756 | 1961 | 2023 |
59
- | `Sao Tome and Principe` | 756 | 1961 | 2023 |
60
- | `Zimbabwe` | 756 | 1961 | 2023 |
61
- | `Nigeria` | 756 | 1961 | 2023 |
62
- | `Lesotho` | 756 | 1961 | 2023 |
63
- | ... | _39 more countries_ | | |
64
-
65
- ## Indicators (sample)
66
-
67
- - `Goats`
68
- - `Cattle`
69
- - `Sheep and Goats`
70
- - `Major livestock types`
71
- - `Cattle and Buffaloes`
72
- - `Chickens`
73
- - `Sheep`
74
- - `Swine / pigs`
75
- - `Equidae`
76
- - `Asses`
77
-
78
- ## Schema
79
-
80
- | Column | Type | Description | Example |
81
- |--------|------|-------------|---------|
82
- | `country_name` | `string` | — | `Algeria` |
83
- | `country_m49` | `int64` | — | `12` |
84
- | `item` | `string` | — | `Asses` |
85
- | `year` | `int64` | — | `1961` |
86
- | `value` | `float64` | — | `157500.0` |
87
- | `unit` | `string` | — | `LSU` |
88
- | `flag` | `string` | — | `E` |
89
 
90
  ## Usage
91
 
@@ -93,57 +76,70 @@ This dataset contains **35,028 observations** of `Land, Inputs and Sustainabilit
93
  from datasets import load_dataset
94
 
95
  ds = load_dataset("electricsheepafrica/africa-livestock-patterns-stocks")
96
- df = ds["train"].to_pandas()
97
- print(df.head())
 
 
 
 
98
  ```
99
 
100
- ### Filter to one country
101
 
102
  ```python
103
- kenya = df[df["country_name"] == "KEN"]
 
 
 
 
 
104
  ```
105
 
106
- ### Time-series for a single indicator
107
 
108
- ```python
109
- sample = (df[df["item"] == "Asses"]
110
- .sort_values("year"))
111
- sample.plot(x="year", y="value", title="Asses")
112
- ```
113
 
114
- ### Pivot to country × year matrix
115
 
116
- ```python
117
- matrix = (df[df["item"] == "Asses"]
118
- .pivot_table(index="year", columns="country_name", values="value"))
119
- print(matrix.tail())
120
- ```
 
 
 
 
 
 
 
121
 
122
  ## Citation
123
 
124
  ```bibtex
125
- @misc{africa_livestock_patterns_stocks_2023,
126
- title = {Livestock Patterns — Stocks | Africa (FAOSTAT)},
127
- author = {Food and Agriculture Organization of the United Nations (FAO)},
128
- year = {2023},
129
- url = {https://www.fao.org/faostat/en/#data/EK},
130
- publisher = {HuggingFace Datasets, repackaged by Electric Sheep Africa},
131
  howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks}}
132
  }
133
  ```
134
 
135
  ## License
136
 
137
- Released under [cc-by-4.0](https://creativecommons.org/licenses/by/4.0/).
138
-
139
- Original data © Food and Agriculture Organization of the United Nations (FAO). When using this dataset, please cite both the original source above and the Electric Sheep Africa repackaging.
140
 
141
- ## About Electric Sheep
142
 
143
- Electric Sheep Africa is part of the Electric Sheep mission: a unified, ML-ready data layer for Africa on HuggingFace. We pull data from authoritative open sources, normalize the schemas, package as Parquet, and publish with consistent dataset cards so researchers and developers can use `load_dataset()` to start working in seconds.
144
 
145
- Browse the full collection: [huggingface.co/electricsheepafrica](https://huggingface.co/electricsheepafrica)
146
 
147
  ---
148
 
149
- _Provenance: ingested 2026-06-17 via the Electric Sheep pipeline. Source URL: https://www.fao.org/faostat/en/#data/EK_
 
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
+ - "agriculture-food"
17
+ - "parquet"
18
+ - "tabular"
19
+ - "text"
20
+ - "faostat-fao"
21
+ - "land-inputs-and-sustainability"
22
+ - "faostat"
23
+ - "fao"
24
+ - "agriculture"
25
+ - "food-security"
26
+ - "time-series"
27
+ - "livestock"
28
+ - "food"
29
+ pretty_name: "Livestock Patterns — Stocks | Africa (FAOSTAT) | Africa (Electric Sheep Africa metadata inventory)"
30
  ---
31
 
32
+ # Livestock Patterns — Stocks | Africa (FAOSTAT) | Africa (Electric Sheep Africa metadata inventory)
33
 
34
+ **Size category:** `10K<n<100K` - **Formats:** `parquet` - **Sector:** agriculture_food - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
35
 
36
+ ![size](https://img.shields.io/badge/size-10K%3Cn%3C100K-blue)
37
+ ![sector](https://img.shields.io/badge/sector-agriculture_food-green)
38
+ ![downloads](https://img.shields.io/badge/HF_downloads-41-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: Livestock Patterns — Stocks | Africa (FAOSTAT) 🌍 35,028 observations · 54 Africa countries · 1961–2023 · Repackaged by Electric Sheep Africa TL;DR This dataset contains 35,028 observations of Land, Inputs and Sustainability data across 54 Africa countries, spanning 1961–2023, covering 14 distinct indicators. About the source Source: FAOSTAT (FAO) Publisher: Food and Agriculture Organization of the United Nations (FAO) License: cc-by-4.0… See the full description on the dataset page: https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks.
50
+
51
+ ## Dataset Profile
52
+
53
+ | Field | Value |
54
+ |---|---|
55
+ | Hugging Face repo | [`electricsheepafrica/africa-livestock-patterns-stocks`](https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks) |
56
+ | Sector | agriculture_food |
57
+ | Topic tags | tabular, faostat-(fao), land,-inputs-and-sustainability, faostat, fao, agriculture, food-security, time-series |
58
+ | Modalities | `tabular`, `text` |
59
+ | Formats | `parquet` |
60
+ | Size category | `10K<n<100K` |
61
+ | Countries | Africa-wide or source-defined African coverage |
62
+ | ISO3 coverage | `not declared` |
63
+ | Last modified on HF | `2026-06-17 13:24:10+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
 
 
76
  from datasets import load_dataset
77
 
78
  ds = load_dataset("electricsheepafrica/africa-livestock-patterns-stocks")
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-livestock-patterns-stocks](https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks)
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_livestock_patterns_stocks_2026,
124
+ title = {Livestock Patterns — Stocks | Africa (FAOSTAT) | Africa (Electric Sheep Africa metadata inventory)},
125
+ author = {Public dataset metadata},
126
+ year = {2026},
127
+ url = {https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks},
128
+ publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa},
129
  howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-livestock-patterns-stocks}}
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`.