Olaroti commited on
Commit
aa705cb
·
verified ·
1 Parent(s): 87d4a85

Standardize Electric Sheep Africa dataset card

Browse files
Files changed (1) hide show
  1. README.md +98 -140
README.md CHANGED
@@ -1,183 +1,141 @@
1
  ---
2
- annotations_creators:
3
- - no-annotation
4
- language_creators:
5
- - found
6
  language:
7
  - en
8
- license: other
9
- multilinguality:
10
- - monolingual
11
- size_categories:
12
- - 10K<n<100K
13
- source_datasets:
14
- - original
15
  task_categories:
16
  - tabular-classification
17
  - tabular-regression
18
- task_ids: []
 
 
19
  tags:
20
- - africa
21
- - humanitarian
22
- - hdx
23
- - electric-sheep-africa
24
- - ports
25
- - trade
26
- - mar
27
- pretty_name: "Morocco: Daily Port Activity Data and Shipment Estimates"
28
- dataset_info:
29
- splits:
30
- - name: train
31
- num_examples: 23443
32
- - name: test
33
- num_examples: 5860
34
  ---
35
 
36
- # Morocco: Daily Port Activity Data and Shipment Estimates
37
 
38
- **Publisher:** PortWatch · **Source:** [HDX](https://data.humdata.org/dataset/morocco-daily-port-activity-data-and-shipment-estimates) · **License:** `hdx-other` · **Updated:** 2026-04-21
39
 
40
- ---
 
 
 
41
 
42
- ## Abstract
43
 
44
- Daily count of port calls, estimates of incoming shipment volumes and outgoing shipment volumes (in metric tons) for ports in Morocco.
45
 
46
- Each row in this dataset represents country-level aggregates. Data was last updated on HDX on 2026-04-21. Geographic scope: **MAR**.
47
 
48
- *Curated into ML-ready Parquet format by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica).*
49
 
50
- ---
51
 
52
- ## Dataset Characteristics
53
 
54
- | | |
55
  |---|---|
56
- | **Domain** | Humanitarian and development data |
57
- | **Unit of observation** | Country-level aggregates |
58
- | **Rows (total)** | 29,304 |
59
- | **Columns** | 31 (24 numeric, 6 categorical, 0 datetime) |
60
- | **Train split** | 23,443 rows |
61
- | **Test split** | 5,860 rows |
62
- | **Geographic scope** | MAR |
63
- | **Publisher** | PortWatch |
64
- | **HDX last updated** | 2026-04-21 |
65
-
66
- ---
67
-
68
- ## Variables
69
-
70
- **Geographic** `year` (range 2019.0–2026.0), `day` (range 1.0–31.0), `country` (Morocco), `iso3` (MAR), `portcalls_dry_bulk` (range 0.0–11.0) and 8 others.
71
-
72
- **Temporal** `date`, `month` (range 1.0–12.0).
73
-
74
- **Identifier / Metadata** — `portid` (port10, port220, port319), `portname` (Agadir, Casablanca, Jorf Lasfar), `esa_source` (HDX), `esa_processed` (2026-04-23).
75
-
76
- **Other** — `portcalls_container` (range 0.0–17.0), `portcalls_general_cargo` (range 0.0–9.0), `portcalls_roro` (range 0.0–5.0), `portcalls_tanker` (range 0.0–7.0), `portcalls_cargo` (range 0.0–22.0) and 7 others.
77
-
78
- ---
79
-
80
- ## Quick Start
81
 
82
  ```python
83
  from datasets import load_dataset
84
 
85
- ds = load_dataset("electricsheepafrica/africa-ports-morocco")
86
- train = ds["train"].to_pandas()
87
- test = ds["test"].to_pandas()
88
 
89
- print(train.shape)
90
- train.head()
 
 
91
  ```
92
 
93
- ---
94
-
95
- ## Schema
96
-
97
- | Column | Type | Null % | Range / Sample Values |
98
- |---|---|---|---|
99
- | `date` | datetime64[ns, UTC] | 0.0% | |
100
- | `year` | int64 | 0.0% | 2019.0 – 2026.0 (mean 2022.1607) |
101
- | `month` | int64 | 0.0% | 1.0 – 12.0 (mean 6.3536) |
102
- | `day` | int64 | 0.0% | 1.0 – 31.0 (mean 15.6813) |
103
- | `portid` | object | 0.0% | port10, port220, port319 |
104
- | `portname` | object | 0.0% | Agadir, Casablanca, Jorf Lasfar |
105
- | `country` | object | 0.0% | Morocco |
106
- | `iso3` | object | 0.0% | MAR |
107
- | `portcalls_container` | int64 | 0.0% | 0.0 – 17.0 (mean 1.1156) |
108
- | `portcalls_dry_bulk` | int64 | 0.0% | 0.0 – 11.0 (mean 0.3708) |
109
- | `portcalls_general_cargo` | int64 | 0.0% | 0.0 – 9.0 (mean 0.3578) |
110
- | `portcalls_roro` | int64 | 0.0% | 0.0 – 5.0 (mean 0.1249) |
111
- | `portcalls_tanker` | int64 | 0.0% | 0.0 – 7.0 (mean 0.4924) |
112
- | `portcalls_cargo` | int64 | 0.0% | 0.0 – 22.0 (mean 1.9692) |
113
- | `portcalls` | int64 | 0.0% | 0.0 – 24.0 (mean 2.4616) |
114
- | `import_container` | int64 | 0.0% | 0.0 – 692677.0 (mean 12900.4012) |
115
- | `import_dry_bulk` | int64 | 0.0% | 0.0 – 274938.0 (mean 6962.1928) |
116
- | `import_general_cargo` | int64 | 0.0% | 0.0 – 43366.0 (mean 615.9629) |
117
- | `import_roro` | int64 | 0.0% | 0.0 – 7196.0 (mean 32.5774) |
118
- | `import_tanker` | int64 | 0.0% | 0.0 – 158808.0 (mean 3757.8559) |
119
- | `import_cargo` | int64 | 0.0% | 0.0 – 692677.0 (mean 20511.2374) |
120
- | `import` | int64 | 0.0% | 0.0 – 694583.0 (mean 24269.1555) |
121
- | `export_container` | int64 | 0.0% | 0.0 – 585423.0 (mean 12130.4076) |
122
- | `export_dry_bulk` | int64 | 0.0% | 0.0 – 156407.0 (mean 3946.1661) |
123
- | `export_general_cargo` | int64 | 0.0% | 0.0 – 35535.0 (mean 371.5821) |
124
- | `export_roro` | int64 | 0.0% | |
125
- | `export_tanker` | int64 | 0.0% | |
126
- | `export_cargo` | int64 | 0.0% | |
127
- | `export` | int64 | 0.0% | |
128
- | `esa_source` | object | 0.0% | HDX |
129
- | `esa_processed` | object | 0.0% | 2026-04-23 |
130
 
131
- ---
132
-
133
- ## Numeric Summary
134
-
135
- | Column | Min | Max | Mean | Median |
136
- |---|---|---|---|---|
137
- | `year` | 2019.0 | 2026.0 | 2022.1607 | 2022.0 |
138
- | `month` | 1.0 | 12.0 | 6.3536 | 6.0 |
139
- | `day` | 1.0 | 31.0 | 15.6813 | 16.0 |
140
- | `portcalls_container` | 0.0 | 17.0 | 1.1156 | 0.0 |
141
- | `portcalls_dry_bulk` | 0.0 | 11.0 | 0.3708 | 0.0 |
142
- | `portcalls_general_cargo` | 0.0 | 9.0 | 0.3578 | 0.0 |
143
- | `portcalls_roro` | 0.0 | 5.0 | 0.1249 | 0.0 |
144
- | `portcalls_tanker` | 0.0 | 7.0 | 0.4924 | 0.0 |
145
- | `portcalls_cargo` | 0.0 | 22.0 | 1.9692 | 0.0 |
146
- | `portcalls` | 0.0 | 24.0 | 2.4616 | 1.0 |
147
- | `import_container` | 0.0 | 692677.0 | 12900.4012 | 0.0 |
148
- | `import_dry_bulk` | 0.0 | 274938.0 | 6962.1928 | 0.0 |
149
- | `import_general_cargo` | 0.0 | 43366.0 | 615.9629 | 0.0 |
150
- | `import_roro` | 0.0 | 7196.0 | 32.5774 | 0.0 |
151
- | `import_tanker` | 0.0 | 158808.0 | 3757.8559 | 0.0 |
152
 
153
- ---
 
 
 
 
154
 
155
- ## Curation
156
 
157
- Raw data was downloaded from HDX via the CKAN API and converted to Parquet. Column names were lowercased and standardised to snake_case. Common missing-value markers (`N/A`, `null`, `none`, `-`, `unknown`, `no data`, `#N/A`) were unified to `NaN`. 1 column(s) were cast from string to numeric or datetime based on parse-success rate (>85% threshold). The dataset was split 80/20 into train and test partitions using a fixed random seed (42) and saved as Snappy-compressed Parquet.
 
 
 
158
 
159
- ---
160
 
161
- ## Limitations
 
 
 
 
162
 
163
- - Data originates from PortWatch and has not been independently validated by ESA.
164
- - Automated cleaning cannot correct for misreported values, definitional inconsistencies, or sampling bias in the original collection.
165
- - Refer to the [original HDX dataset page](https://data.humdata.org/dataset/morocco-daily-port-activity-data-and-shipment-estimates) for the publisher's own methodology notes and caveats.
166
 
167
- ---
 
 
 
168
 
169
  ## Citation
170
 
171
  ```bibtex
172
- @dataset{hdx_africa_ports_morocco,
173
- title = {Morocco: Daily Port Activity Data and Shipment Estimates},
174
- author = {PortWatch},
175
- year = {2026},
176
- url = {https://data.humdata.org/dataset/morocco-daily-port-activity-data-and-shipment-estimates},
177
- note = {Repackaged for machine learning by Electric Sheep Africa (https://huggingface.co/electricsheepafrica)}
 
178
  }
179
  ```
180
 
 
 
 
 
 
 
 
 
 
 
181
  ---
182
 
183
- *[Electric Sheep Africa](https://huggingface.co/electricsheepafrica) Africa's ML dataset infrastructure. Lagos, Nigeria.*
 
1
  ---
2
+ license: other
 
 
 
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
+ - "economics-finance"
17
+ - "parquet"
18
+ - "tabular"
19
+ - "text"
20
+ - "humanitarian"
21
+ - "hdx"
22
+ - "ports"
23
+ - "trade"
24
+ - "mar"
25
+ pretty_name: "Morocco: Daily Port Activity Data and Shipment Estimates | Africa (original)"
26
  ---
27
 
28
+ # Morocco: Daily Port Activity Data and Shipment Estimates | Africa (original)
29
 
30
+ **Size category:** `10K<n<100K` - **Formats:** `parquet` - **Sector:** economics_finance - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)*
31
 
32
+ ![size](https://img.shields.io/badge/size-10K%3Cn%3C100K-blue)
33
+ ![sector](https://img.shields.io/badge/sector-economics_finance-green)
34
+ ![downloads](https://img.shields.io/badge/HF_downloads-7-orange)
35
+ ![license](https://img.shields.io/badge/license-other-lightgrey)
36
 
37
+ ## TL;DR
38
 
39
+ 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.
40
 
41
+ ## What This Dataset Covers
42
 
43
+ Public datasets help analysts inspect structured evidence, build reproducible workflows, and compare patterns across domains.
44
 
45
+ Dataset context from the existing Hugging Face card: Morocco: Daily Port Activity Data and Shipment Estimates Publisher: PortWatch · Source: HDX · License: hdx-other · Updated: 2026-04-21 Abstract Daily count of port calls, estimates of incoming shipment volumes and outgoing shipment volumes (in metric tons) for ports in Morocco. Each row in this dataset represents country-level aggregates. Data was last updated on HDX on 2026-04-21. Geographic scope: MAR. Curated into ML-ready Parquet format by Electric Sheep Africa.… See the full description on the dataset page: https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco.
46
 
47
+ ## Dataset Profile
48
 
49
+ | Field | Value |
50
  |---|---|
51
+ | Hugging Face repo | [`electricsheepafrica/africa-ports-morocco`](https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco) |
52
+ | Sector | economics_finance |
53
+ | Topic tags | humanitarian, hdx, electric-sheep-africa, ports, trade, mar |
54
+ | Modalities | `tabular`, `text` |
55
+ | Formats | `parquet` |
56
+ | Size category | `10K<n<100K` |
57
+ | Countries | Morocco |
58
+ | ISO3 coverage | `MAR` |
59
+ | Last modified on HF | `2026-04-23 12:05:49+00:00` |
60
+ | Inventory snapshot | `2026-07-16T16:00:34Z` |
61
+
62
+ ## How To Read This Dataset
63
+
64
+ - Start from the repository files and the dataset viewer when available.
65
+ - Treat the README context as a fast orientation layer; confirm variable definitions and units in the data files before modeling.
66
+ - Use explicit country columns when present. When geography is only implied by the title or source metadata, document that assumption in downstream analysis.
67
+ - Preserve missing values until you have a defensible imputation rule.
68
+
69
+ ## Usage
 
 
 
 
 
 
70
 
71
  ```python
72
  from datasets import load_dataset
73
 
74
+ ds = load_dataset("electricsheepafrica/africa-ports-morocco")
75
+ print(ds)
 
76
 
77
+ split_name = next(iter(ds))
78
+ table = ds[split_name]
79
+ print(table.features)
80
+ print(table[:3])
81
  ```
82
 
83
+ ### Convert To Pandas When Tabular
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ ```python
86
+ from datasets import Dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
88
+ first_split = ds[next(iter(ds))]
89
+ if isinstance(first_split, Dataset):
90
+ df = first_split.to_pandas()
91
+ print(df.head())
92
+ ```
93
 
94
+ ## Data Quality Notes
95
 
96
+ - This card was standardized from the Electric Sheep Africa Hugging Face metadata inventory.
97
+ - Exact schema, row counts, and source files should be inspected in the repository data files.
98
+ - Metadata gaps from the inventory: upstream_publisher.
99
+ - Do not infer policy meaning from labels alone; confirm definitions, units, and methods in the source material.
100
 
101
+ ## Source And Provenance
102
 
103
+ - **Source context:** original
104
+ - **Publisher/source attribution:** original
105
+ - **License:** Source-specific or other license
106
+ - **Hugging Face URL:** [https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco](https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco)
107
+ - **Inventory retrieved at:** `2026-07-16T16:00:34Z`
108
 
109
+ ## Suggested Analyses
 
 
110
 
111
+ - Inspect schema and missingness before modeling.
112
+ - Profile variables by geography, time, and subgroup columns where present.
113
+ - Join with other Electric Sheep Africa datasets using explicit country, year, and indicator fields when available.
114
+ - Build reproducible notebooks that cite both the original source context and the Electric Sheep Africa Hugging Face repo.
115
 
116
  ## Citation
117
 
118
  ```bibtex
119
+ @misc{electric_sheep_africa_africa_ports_morocco_2026,
120
+ title = {Morocco: Daily Port Activity Data and Shipment Estimates | Africa (original)},
121
+ author = {original},
122
+ year = {2026},
123
+ url = {https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco},
124
+ publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa},
125
+ howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-ports-morocco}}
126
  }
127
  ```
128
 
129
+ ## License
130
+
131
+ Released under Source-specific or other license.
132
+
133
+ 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.
134
+
135
+ ## About Electric Sheep Africa
136
+
137
+ Electric Sheep Africa publishes ML-ready African public datasets on Hugging Face.
138
+
139
  ---
140
 
141
+ Provenance: metadata-backed README standardized 2026-08-12 by the Electric Sheep Africa README system. Inventory source: `catalog/esa_metadata_inventory/master_metadata.jsonl`.