cmg777 commited on
Commit
9c05340
·
verified ·
1 Parent(s): a4d3439

Update dataset card

Browse files
Files changed (1) hide show
  1. README.md +67 -55
README.md CHANGED
@@ -1,60 +1,72 @@
1
- # Data
2
-
3
- This directory holds the **ds4bolivia v20250523** dataset: socioeconomic, satellite, and geographic measures for Bolivia's **339 municipalities** across its **9 departments**.
4
- Every file is keyed on `asdf_id` (integer, `0`–`338`), the universal join key used across all datasets in this project.
5
- Data derive from the [`quarcs-lab/ds4bolivia`](https://github.com/quarcs-lab/ds4bolivia) dataset; the 64-dimensional satellite embeddings are Google Satellite Embeddings (Google Earth Engine — simple-mean for 2017, population-weighted for the 2017–2025 panel), and the SDG indices and IMDS index follow Andersen et al. (2020).
6
-
7
- ## Top-level files
8
-
9
- | File | Rows × Cols | Description |
10
- | ---- | ----------- | ----------- |
11
- | `ds4bolivia_v20250523.csv` | 339 × 351 | Analysis-ready **merged master** — all subfolder datasets joined on `asdf_id`. See the definitions file for every column. |
12
- | `definitions_ds4bolivia_v20250523.csv` | 350 × 3 | **Data dictionary** for the master file: `varname` → `varlabel`. |
13
-
14
- ## Subfolders
15
-
16
- Each subfolder has its own README with a full variable dictionary, methodology, and example code.
17
-
18
- | Folder | Contents | Key file(s) | Docs |
19
- | ------ | -------- | ----------- | ---- |
20
- | `regionNames/` | Administrative IDs & names — the join foundation | `regionNames.csv` | [README](regionNames/README.md) |
21
- | `sdg/` | IMDS + 14 composite SDG indices (0–100 scale) | `sdg.csv` | [README](sdg/README.md) |
22
- | `sdgVariables/` | 64 individual SDG indicators across all 17 goals | `sdgVariables.csv` | [README](sdgVariables/README.md) |
23
- | `pop/` | Total population, 2001–2020 | `pop.csv` | [README](pop/README.md) |
24
- | `ntl/` | Log night-time lights per capita, 2012–2020 (+ trend component) | `ln_NTLpc.csv` | [README](ntl/README.md) |
25
- | `satelliteEmbeddings/` | 64-dimensional Google embeddings — simple-mean (2017) and population-weighted (**2017–2025 panel**) | `bolivia_embeddings_unweighted_2017.csv`, `bolivia_pop_weighted_<year>.csv` | [README](satelliteEmbeddings/README.md) |
26
- | `maps/` | Municipality boundary polygons (GeoJSON), keyed by `asdf_id` — used by the ESDA notebooks | `bolivia339geoqueryOpt.geojson` (web-optimized), `bolivia339geoqueryFull.geojson` | — |
27
- | `rawData/` | Placeholder for raw source inputs (currently empty) | — | [README](rawData/README.md) |
28
-
29
- ## Join key
30
-
31
- Every CSV is keyed on **`asdf_id`**.
32
- To attach municipality and department labels to any dataset, merge it to `regionNames/regionNames.csv` on `asdf_id`.
33
- Note that `mun_id` is the official government municipality code, whereas `asdf_id` is the spatial identifier that guarantees consistency across the satellite, population, and optimized map files.
34
-
35
- ## Raw data
36
-
37
- Files in `rawData/` are **source-of-truth inputs and must never be modified** (CLAUDE.md Critical Rule #3).
38
- All transformations must produce new files in `data/` or other output directories.
39
- See [`rawData/README.md`](rawData/README.md).
40
-
41
- ## Loading from Hugging Face
42
-
43
- A clean subset of this folder is mirrored to the public HF dataset [`cmg777/project2026e`](https://huggingface.co/datasets/cmg777/project2026e) (superseded `maps/archive/` and `OLD-*` files are excluded).
44
- Push or re-sync it with `uv run python scripts/upload_data_hf.py` (needs a write-scoped `HF_TOKEN` in `.env`).
45
-
46
- Use the `code/hf_data.py` helper to load any file by its path relative to `data/`.
47
- It returns the local copy when present and otherwise streams the file from the Hub — so large future datasets can live only on Hugging Face without breaking existing code.
 
 
 
 
 
 
 
 
 
 
48
 
49
  ```python
50
  import pandas as pd
51
- from hf_data import data_path # or: from code.hf_data import data_path
52
- df = pd.read_csv(data_path("satelliteEmbeddings/bolivia_pop_weighted_2017.csv"))
 
 
 
 
 
 
53
  ```
54
 
55
- ## Coverage & provenance
56
-
57
- - **Spatial unit:** 339 Bolivian municipalities (9 departments).
58
- - **Time coverage:** population 2001–2020; night-time lights 2012–2020; most SDG variables 2012–2019; satellite embeddings 2017 (simple-mean) and 2017–2025 (population-weighted panel).
59
- - **Version:** `v20250523`.
60
- - **Source:** [`quarcs-lab/ds4bolivia`](https://github.com/quarcs-lab/ds4bolivia); satellite embeddings from Google (2017); SDG indices and IMDS from Andersen et al. (2020).
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ - es
6
+ pretty_name: "ds4bolivia — Bolivian municipalities: SDGs, satellite embeddings & nighttime lights"
7
+ tags:
8
+ - bolivia
9
+ - sdg
10
+ - sustainable-development
11
+ - satellite-embeddings
12
+ - nighttime-lights
13
+ - remote-sensing
14
+ - geospatial
15
+ size_categories:
16
+ - n<1K
17
+ ---
18
+
19
+ # Bolivian Municipalities — SDGs, Satellite Embeddings & Nighttime Lights
20
+
21
+ Socioeconomic, satellite, and geographic measures for Bolivia's **339 municipalities**
22
+ across its **9 departments** — the analysis data for the project *"Predicting the
23
+ Sustainable Development of Bolivian Municipalities with Satellite Embeddings and Machine
24
+ Learning"* (Carlos Mendez, Nagoya University).
25
+
26
+ This dataset is a public **mirror** of the `data/` folder in
27
+ [`cmg777/project2026e`](https://github.com/cmg777/project2026e). Every file is keyed on
28
+ `asdf_id` (integer, `0`–`338`), the universal join key across all datasets. To attach
29
+ municipality/department labels, merge any file to `regionNames/regionNames.csv` on `asdf_id`.
30
+
31
+ ## Contents
32
+
33
+ | Path | Description |
34
+ | ---- | ----------- |
35
+ | `ds4bolivia_v20250523.csv` | Analysis-ready **merged master** (339 × 351) — all subfolders joined on `asdf_id`. |
36
+ | `definitions_ds4bolivia_v20250523.csv` | **Data dictionary** for the master file (`varname` → `varlabel`). |
37
+ | `regionNames/` | Administrative IDs & names — the join foundation. |
38
+ | `sdg/` | IMDS + 14 composite SDG indices (0–100 scale). |
39
+ | `sdgVariables/` | 64 individual SDG indicators across all 17 goals. |
40
+ | `satelliteEmbeddings/` | 64-dim Google Satellite Embeddings — simple-mean (2017) and population-weighted (**2017–2025** panel). |
41
+ | `nighttimeLights/` | VIIRS nighttime lights (simple-average & population-weighted, **2017–2021**), plus `rasters/` GeoTIFF. |
42
+ | `predictions/` | Out-of-sample predictions for SDG 1, 7 and 13 (four-view: actual, lights, embeddings, combined) plus space-time forward projections. |
43
+ | `maps/` | Municipality boundary polygons (GeoJSON), keyed by `asdf_id`. |
44
+ | `sdg/`, `regionNames/`, … | Each subfolder ships its own `README.md` with a full variable dictionary. |
45
+
46
+ ## Provenance & coverage
47
+
48
+ - **Spatial unit:** 339 Bolivian municipalities (9 departments); **version** `v20250523`.
49
+ - **Source:** [`quarcs-lab/ds4bolivia`](https://github.com/quarcs-lab/ds4bolivia); the 64-dim
50
+ satellite embeddings are Google Satellite Embeddings (Google Earth Engine); SDG indices and
51
+ the IMDS index follow Andersen et al. (2020).
52
+ - **Time coverage:** population 2001–2020; nighttime lights 2012–2021; most SDG variables 2012–2019;
53
+ satellite embeddings 2017 (simple-mean) and 2017–2025 (population-weighted panel).
54
+
55
+ ## Load from Python
56
+
57
+ Load any file straight from the Hub (no full clone needed):
58
 
59
  ```python
60
  import pandas as pd
61
+ from huggingface_hub import hf_hub_download
62
+
63
+ path = hf_hub_download(
64
+ repo_id="cmg777/project2026e",
65
+ repo_type="dataset",
66
+ filename="satelliteEmbeddings/bolivia_pop_weighted_2017.csv",
67
+ )
68
+ df = pd.read_csv(path)
69
  ```
70
 
71
+ The companion repo ships a `code/hf_data.py` helper with a `data_path()` function that
72
+ prefers a local copy and otherwise streams the file from this dataset.