Standardize Electric Sheep Africa dataset card
Browse files
README.md
CHANGED
|
@@ -5,79 +5,103 @@ language:
|
|
| 5 |
task_categories:
|
| 6 |
- tabular-classification
|
| 7 |
- tabular-regression
|
| 8 |
-
multilinguality:
|
| 9 |
size_categories:
|
| 10 |
- n<1K
|
| 11 |
tags:
|
| 12 |
-
- tabular
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# Code
|
| 22 |
|
| 23 |
-
943 rows - 1 Africa country - not-
|
| 24 |
|
| 25 |

|
| 26 |

|
| 27 |
-

|
| 29 |

|
| 30 |
|
| 31 |
## TL;DR
|
| 32 |
|
| 33 |
-
This dataset
|
| 34 |
-
ML-ready Parquet. The source file is the provenance boundary; all usable
|
| 35 |
-
indicators or tabular columns from the resource stay together in this repo.
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
## Geographic
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
|
| 51 |
-
|------
|
| 52 |
| `MAR` | 943 | n/a | n/a | `Morocco` |
|
| 53 |
|
| 54 |
-
## Indicators
|
| 55 |
|
| 56 |
-
- This source
|
| 57 |
|
| 58 |
## Schema
|
| 59 |
|
| 60 |
| Column | Type | Description | Example |
|
| 61 |
|--------|------|-------------|---------|
|
| 62 |
-
| `source_record_id` | `string` | Stable row identifier
|
| 63 |
-
| `country_iso3` | `string` | ISO3 country code. | `MAR` |
|
| 64 |
-
| `country_name` | `string` | Country name. | `Morocco` |
|
| 65 |
-
| `source_sheet` | `string` |
|
| 66 |
-
| `code_agence` | `int64` | Source column. | `78000` |
|
| 67 |
-
| `nom_agence` | `string` | Source column. | `ZAG` |
|
| 68 |
-
| `region` | `string` | Source column. | `AGADIR` |
|
| 69 |
-
| `ville_commune` | `string` | Source column. | `ZAG` |
|
| 70 |
-
| `adresse` | `string` | Source column. | `Avenue Hassan II 81006 Zag` |
|
| 71 |
-
| `tel_dca` | `
|
| 72 |
-
| `fax` | `
|
| 73 |
| `source_provider` | `string` | Publishing organization. | `Poste Maroc` |
|
| 74 |
-
| `source_dataset` | `string` | Source package title. | `Code postal des agences Barid Al Maghrib` |
|
| 75 |
-
| `source_resource` | `string` | Source resource title. | `Codes postaux des agences et des centres de Barid Al Maghrib` |
|
| 76 |
-
| `source_package_id` | `string` |
|
| 77 |
-
| `source_resource_id` | `string` |
|
| 78 |
-
| `source_url` | `string` | Original source
|
| 79 |
| `license_id` | `string` | Source license identifier. | `odc-odbl` |
|
| 80 |
-
| `retrieved_at` | `string` | UTC retrieval timestamp. | `2026-07-16T22:26:50Z` |
|
| 81 |
|
| 82 |
## Usage
|
| 83 |
|
|
@@ -89,29 +113,76 @@ df = ds["train"].to_pandas()
|
|
| 89 |
print(df.head())
|
| 90 |
```
|
| 91 |
|
| 92 |
-
###
|
| 93 |
|
| 94 |
```python
|
| 95 |
-
|
|
|
|
| 96 |
```
|
| 97 |
|
| 98 |
-
###
|
| 99 |
|
| 100 |
```python
|
| 101 |
-
if "
|
| 102 |
-
|
| 103 |
-
sample = df.sort_values([c for c in ["indicator_id", "year"] if c in df.columns])
|
| 104 |
```
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
## Citation
|
| 107 |
|
| 108 |
```bibtex
|
| 109 |
@misc{electric_sheep_africa_africa_morocco_code_postal_des_agences_barid_al_maghrib_078c8930_2026,
|
| 110 |
-
title = {Code
|
| 111 |
author = {Poste Maroc},
|
| 112 |
year = {2026},
|
| 113 |
url = {https://data.gov.ma/data/dataset/code-postal-des-agences-barid-al-maghrib},
|
| 114 |
-
publisher = {
|
| 115 |
howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-morocco-code-postal-des-agences-barid-al-maghrib-078c8930}}
|
| 116 |
}
|
| 117 |
```
|
|
@@ -120,20 +191,14 @@ if "indicator_id" in df.columns:
|
|
| 120 |
|
| 121 |
Released under [Open Data Commons Open Database License](https://opendatacommons.org/licenses/odbl/).
|
| 122 |
|
| 123 |
-
Original data
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
## About Electric Sheep
|
| 127 |
|
| 128 |
-
|
| 129 |
-
ML-ready data layer for Africa on Hugging Face. We pull data from authoritative
|
| 130 |
-
open sources, normalize the schemas, package as Parquet, and publish with
|
| 131 |
-
consistent dataset cards so researchers and developers can use `load_dataset()`
|
| 132 |
-
to start working in seconds.
|
| 133 |
|
| 134 |
-
|
| 135 |
|
| 136 |
---
|
| 137 |
|
| 138 |
-
Provenance:
|
| 139 |
-
http://datagovma.webhi.net/data/fr/dataset/27428259-f156-4f65-9192-9a569a3fd757/resource/437ed56d-d491-44e8-afe5-fadf8ca070e9/download/liste-des-agences-de-poste-fev-2011-barid-al-maghrib.xls
|
|
|
|
| 5 |
task_categories:
|
| 6 |
- tabular-classification
|
| 7 |
- tabular-regression
|
| 8 |
+
multilinguality: multilingual
|
| 9 |
size_categories:
|
| 10 |
- n<1K
|
| 11 |
tags:
|
| 12 |
+
- "tabular"
|
| 13 |
+
- "africa"
|
| 14 |
+
- "open-data"
|
| 15 |
+
- "official-statistics"
|
| 16 |
+
- "morocco"
|
| 17 |
+
- "poste-maroc"
|
| 18 |
+
- "morocco-open-data"
|
| 19 |
+
- "demographics"
|
| 20 |
+
- "cartographie"
|
| 21 |
+
- "poste"
|
| 22 |
+
configs:
|
| 23 |
+
- config_name: default
|
| 24 |
+
data_files:
|
| 25 |
+
- split: train
|
| 26 |
+
path: data/train-00000-of-00001.parquet
|
| 27 |
+
pretty_name: "Code Postal Des Agences Barid Al Maghrib | Africa (Morocco Open Data)"
|
| 28 |
---
|
| 29 |
|
| 30 |
+
# Code Postal Des Agences Barid Al Maghrib | Africa (Morocco Open Data)
|
| 31 |
|
| 32 |
+
**943 rows** - **1 Africa country/area** - **time not specified** - **source table** - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
|
| 33 |
|
| 34 |

|
| 35 |

|
| 36 |
+

|
| 37 |

|
| 38 |

|
| 39 |
|
| 40 |
## TL;DR
|
| 41 |
|
| 42 |
+
This dataset contains **943 rows** from **Morocco Open Data**, covering **Code Postal Des Agences Barid Al Maghrib**. It is published as ML-ready Parquet with consistent Hugging Face metadata, source provenance, and analysis-friendly loading examples.
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
## What This Dataset Measures
|
| 45 |
|
| 46 |
+
Demographic datasets help analysts understand population structure, household conditions, migration, gender, age, and settlement patterns.
|
| 47 |
+
|
| 48 |
+
Source-provided context: Liste des codes postaux des agences et des centres de Barid Al Maghrib
|
| 49 |
+
|
| 50 |
+
## How To Read This Dataset
|
| 51 |
+
|
| 52 |
+
- **One row means:** one source record from the original tabular resource, with Electric Sheep Africa provenance columns added where available.
|
| 53 |
+
- **Primary geography column:** `country_iso3`.
|
| 54 |
+
- **Best time column:** `not detected`.
|
| 55 |
+
- **Time coverage basis:** not detected.
|
| 56 |
+
- **Recommended join keys:** `country_iso3` where available plus source-specific keys.
|
| 57 |
+
|
| 58 |
+
## Coverage
|
| 59 |
+
|
| 60 |
+
| Dimension | Value |
|
| 61 |
+
|---|---:|
|
| 62 |
+
| Rows | 943 |
|
| 63 |
+
| Countries/areas | 1 |
|
| 64 |
+
| First period | n/a |
|
| 65 |
+
| Last period | n/a |
|
| 66 |
+
| Indicators | 0 |
|
| 67 |
+
| Columns | 19 |
|
| 68 |
+
| Source format | XLS |
|
| 69 |
|
| 70 |
+
## Geographic Coverage
|
| 71 |
|
| 72 |
+
Top areas shown below, sorted by row count when available:
|
| 73 |
|
| 74 |
+
| Area | Rows | First year | Last year | Name |
|
| 75 |
+
|------|-----:|-----------:|----------:|------|
|
| 76 |
| `MAR` | 943 | n/a | n/a | `Morocco` |
|
| 77 |
|
| 78 |
+
## Indicators, Variables, Or Resource Contents
|
| 79 |
|
| 80 |
+
- This repo preserves one source tabular resource with its usable columns kept together.
|
| 81 |
|
| 82 |
## Schema
|
| 83 |
|
| 84 |
| Column | Type | Description | Example |
|
| 85 |
|--------|------|-------------|---------|
|
| 86 |
+
| `source_record_id` | `string` | Stable row identifier assigned during Electric Sheep Africa engineering. | `437ed56d-d491-44e8-afe5-fadf8ca070e9:feuil1:0` |
|
| 87 |
+
| `country_iso3` | `string` | ISO3 country or area code. | `MAR` |
|
| 88 |
+
| `country_name` | `string` | Country or area name. | `Morocco` |
|
| 89 |
+
| `source_sheet` | `string` | Source column from the original resource. | `Feuil1` |
|
| 90 |
+
| `code_agence` | `int64` | Source column from the original resource. | `78000` |
|
| 91 |
+
| `nom_agence` | `string` | Source column from the original resource. | `ZAG` |
|
| 92 |
+
| `region` | `string` | Source column from the original resource. | `AGADIR` |
|
| 93 |
+
| `ville_commune` | `string` | Source column from the original resource. | `ZAG` |
|
| 94 |
+
| `adresse` | `string` | Source column from the original resource. | `Avenue Hassan II 81006 Zag` |
|
| 95 |
+
| `tel_dca` | `double` | Source column from the original resource. | `528704098.0` |
|
| 96 |
+
| `fax` | `double` | Source column from the original resource. | `` |
|
| 97 |
| `source_provider` | `string` | Publishing organization. | `Poste Maroc` |
|
| 98 |
+
| `source_dataset` | `string` | Source dataset or package title. | `Code postal des agences Barid Al Maghrib` |
|
| 99 |
+
| `source_resource` | `string` | Source resource title, table name, or file name. | `Codes postaux des agences et des centres de Barid Al Maghrib` |
|
| 100 |
+
| `source_package_id` | `string` | Source package identifier. | `27428259-f156-4f65-9192-9a569a3fd757` |
|
| 101 |
+
| `source_resource_id` | `string` | Source resource identifier. | `437ed56d-d491-44e8-afe5-fadf8ca070e9` |
|
| 102 |
+
| `source_url` | `string` | Original source URL or download URL. | `http://datagovma.webhi.net/data/fr/dataset/27428259-f156-4f65-9192-9a...` |
|
| 103 |
| `license_id` | `string` | Source license identifier. | `odc-odbl` |
|
| 104 |
+
| `retrieved_at` | `string` | UTC source retrieval timestamp from the Electric Sheep Africa pipeline. | `2026-07-16T22:26:50Z` |
|
| 105 |
|
| 106 |
## Usage
|
| 107 |
|
|
|
|
| 113 |
print(df.head())
|
| 114 |
```
|
| 115 |
|
| 116 |
+
### Inspect Columns
|
| 117 |
|
| 118 |
```python
|
| 119 |
+
print(df.info())
|
| 120 |
+
print(df.head())
|
| 121 |
```
|
| 122 |
|
| 123 |
+
### Filter By Geography
|
| 124 |
|
| 125 |
```python
|
| 126 |
+
if "country_iso3" in df.columns:
|
| 127 |
+
sample = df[df["country_iso3"] == "MAR"]
|
|
|
|
| 128 |
```
|
| 129 |
|
| 130 |
+
### Time-Series Pattern
|
| 131 |
+
|
| 132 |
+
```python
|
| 133 |
+
if "value" in df.columns and "year" in df.columns:
|
| 134 |
+
trend = df.sort_values("year")
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
### Pivot For Analysis
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
if {"indicator_id", "year", "value"}.issubset(df.columns):
|
| 141 |
+
matrix = df.pivot_table(index="year", columns="indicator_id", values="value")
|
| 142 |
+
print(matrix.tail())
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
## Data Quality Notes
|
| 146 |
+
|
| 147 |
+
- No canonical year/date column was detected in the packaged table; use source metadata and domain context for temporal interpretation.
|
| 148 |
+
- Missing values are preserved rather than silently imputed.
|
| 149 |
+
- Column names are standardized for machine use; source meanings are preserved where known.
|
| 150 |
+
- Always confirm source methodology, units, and collection definitions before policy, production, or redistribution-sensitive use.
|
| 151 |
+
|
| 152 |
+
## Source And Provenance
|
| 153 |
+
|
| 154 |
+
- **Source:** [Morocco Open Data](https://data.gov.ma/data/dataset/code-postal-des-agences-barid-al-maghrib)
|
| 155 |
+
- **Publisher:** Poste Maroc
|
| 156 |
+
- **Portal:** [https://data.gov.ma/data](https://data.gov.ma/data)
|
| 157 |
+
- **Resource:** [Codes postaux des agences et des centres de Barid Al Maghrib](http://datagovma.webhi.net/data/fr/dataset/27428259-f156-4f65-9192-9a569a3fd757/resource/437ed56d-d491-44e8-afe5-fadf8ca070e9/download/liste-des-agences-de-poste-fev-2011-barid-al-maghrib.xls)
|
| 158 |
+
- **License:** [Open Data Commons Open Database License](https://opendatacommons.org/licenses/odbl/)
|
| 159 |
+
- **Retrieved/generated:** `2026-07-16T22:30:06Z`
|
| 160 |
+
- **Hugging Face repo:** [electricsheepafrica/africa-morocco-code-postal-des-agences-barid-al-maghrib-078c8930](https://huggingface.co/datasets/electricsheepafrica/africa-morocco-code-postal-des-agences-barid-al-maghrib-078c8930)
|
| 161 |
+
|
| 162 |
+
## Transformations Applied
|
| 163 |
+
|
| 164 |
+
- Converted the source table to Parquet for efficient analytics and ML workflows.
|
| 165 |
+
- Added or preserved source provenance columns where available.
|
| 166 |
+
- Standardized README metadata, dataset loading configuration, schema documentation, and citation format.
|
| 167 |
+
- Preserved source-reported values without analytical imputation.
|
| 168 |
+
|
| 169 |
+
## Suggested Analyses
|
| 170 |
+
|
| 171 |
+
- Build demographic profiles
|
| 172 |
+
- Normalize indicators per capita
|
| 173 |
+
- Join with service-delivery datasets
|
| 174 |
+
- Check missingness before modeling
|
| 175 |
+
- Use `country_iso3` as the safest geography join key when present
|
| 176 |
+
|
| 177 |
## Citation
|
| 178 |
|
| 179 |
```bibtex
|
| 180 |
@misc{electric_sheep_africa_africa_morocco_code_postal_des_agences_barid_al_maghrib_078c8930_2026,
|
| 181 |
+
title = {Code Postal Des Agences Barid Al Maghrib | Africa (Morocco Open Data)},
|
| 182 |
author = {Poste Maroc},
|
| 183 |
year = {2026},
|
| 184 |
url = {https://data.gov.ma/data/dataset/code-postal-des-agences-barid-al-maghrib},
|
| 185 |
+
publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa},
|
| 186 |
howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-morocco-code-postal-des-agences-barid-al-maghrib-078c8930}}
|
| 187 |
}
|
| 188 |
```
|
|
|
|
| 191 |
|
| 192 |
Released under [Open Data Commons Open Database License](https://opendatacommons.org/licenses/odbl/).
|
| 193 |
|
| 194 |
+
Original data is published by Poste Maroc. Electric Sheep Africa
|
| 195 |
+
engineering standardizes the data for discovery, loading, and analysis on
|
| 196 |
+
Hugging Face. Cite both the original source and this ML-ready dataset when used.
|
|
|
|
| 197 |
|
| 198 |
+
## About Electric Sheep Africa
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
+
Electric Sheep Africa publishes ML-ready African public datasets on Hugging Face.
|
| 201 |
|
| 202 |
---
|
| 203 |
|
| 204 |
+
Provenance: README standardized 2026-08-11 by the Electric Sheep Africa README system. Source URL: https://data.gov.ma/data/dataset/code-postal-des-agences-barid-al-maghrib
|
|
|