burundi-m 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ Creative Commons Attribution 3.0 IGO (CC BY 3.0 IGO)
2
+
3
+ Copyright (c) 2026 Blixy4
4
+
5
+ This work is free to use. You may copy, share and adapt it for any purpose,
6
+ including commercial use, as long as you:
7
+
8
+ 1. give credit,
9
+ 2. include a link to the licence, and
10
+ 3. say if you made changes.
11
+
12
+ Full licence text:
13
+ https://creativecommons.org/licenses/by/3.0/igo/legalcode
14
+
15
+ Exception: water.json and roads.json contain OpenStreetMap data and are
16
+ licensed under the Open Database License (ODbL) 1.0:
17
+ https://opendatacommons.org/licenses/odbl/1-0/
18
+
19
+ Third-party sources keep their own terms. See "Sources" in README.md.
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: burundi-m
3
+ Version: 1.0.0
4
+ Summary: Burundi provinces, communes, zones, collines and quartiers: find a place by name or GPS position.
5
+ Author: Blixy4
6
+ License: CC-BY-3.0-IGO
7
+ Project-URL: Homepage, https://github.com/Blixy4/burundi-map
8
+ Project-URL: Map, https://blixy4.github.io/burundi-map/
9
+ Project-URL: Documentation, https://github.com/Blixy4/burundi-map/blob/main/docs/cli.md
10
+ Project-URL: Issues, https://github.com/Blixy4/burundi-map/issues
11
+ Project-URL: Changelog, https://github.com/Blixy4/burundi-map/blob/main/CHANGELOG.md
12
+ Keywords: Burundi,administrative boundaries,geojson,gis,communes,provinces,population
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Scientific/Engineering :: GIS
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
22
+
23
+ # Burundi Map
24
+
25
+ **Created and maintained by [Blixy4](https://github.com/Blixy4).**
26
+
27
+ **[View the live map](https://blixy4.github.io/burundi-map/)**
28
+
29
+ Interactive map and open data for Burundi's new administrative structure: 5 provinces, 42 communes, 451 zones and 3,044 collines and quartiers. The map is available in English, French and Kirundi.
30
+
31
+ ## What you can do
32
+
33
+ | I want to... | Use |
34
+ |---|---|
35
+ | Look at the map | [blixy4.github.io/burundi-map](https://blixy4.github.io/burundi-map/) |
36
+ | Find a place or a GPS position from the terminal | `burundi-m`, see [Quick start](#quick-start) |
37
+ | Use the data in QGIS, Excel or a database | `burundi-geo.geojson`, `burundi-geo.csv` |
38
+ | Use the data in an app or a script | [`burundi-geo.json`](docs/data.md), or the [Python, JavaScript and Dart libraries](docs/libraries.md) |
39
+ | Find where an old commune is now | `burundi-m former Bisoro`, or `former-areas.json` |
40
+
41
+ ## Quick start
42
+
43
+ Install (needs Python 3.8 or later, nothing else):
44
+
45
+ ```
46
+ pip install git+https://github.com/Blixy4/burundi-map
47
+ ```
48
+
49
+ Then:
50
+
51
+ ```
52
+ burundi-m locate Nyanza find a place by name (asks if ambiguous)
53
+ burundi-m locate -c Nyanza -f -l the commune, its former communes, what it contains
54
+ burundi-m locate -3.3822 29.3644 which areas hold a GPS position
55
+ burundi-m list communes --in GT the communes of a province
56
+ burundi-m near -3.3822 29.3644 -n 3 the 3 closest areas
57
+ burundi-m stats counts and population per province
58
+ ```
59
+
60
+ Every command follows the same pattern, `burundi-m COMMAND [WHAT] [SELECT] [SHOW] [OUTPUT]`, and uses the same flags everywhere:
61
+
62
+ | Flag | Meaning |
63
+ |---|---|
64
+ | `-p` `-c` `-z` `-cl` `-q` | provinces, communes, zones, collines, quartiers |
65
+ | `--in PLACE` | only inside this province, commune or zone |
66
+ | `-f` | former communes (pre-2025) |
67
+ | `-l` / `-t` | list children / draw a tree (`--depth N`, `--ascii`) |
68
+ | `--format text\|json\|csv\|geojson`, `--json` | output format |
69
+ | `-h` | help |
70
+
71
+ Exit codes: 0 ok, 1 nothing found, 2 usage error or ambiguous name in a script, 3 data error.
72
+
73
+ The full guide, with every command, output and recipe, is [docs/cli.md](docs/cli.md).
74
+
75
+ ## Documentation
76
+
77
+ | Guide | Contents |
78
+ |---|---|
79
+ | [docs/cli.md](docs/cli.md) | The `burundi-m` command: grammar, flags, commands, output, exit codes, recipes. |
80
+ | [docs/data.md](docs/data.md) | The data files, ids, schema, exports, former communes, sources, licences. |
81
+ | [docs/libraries.md](docs/libraries.md) | Python, JavaScript and Dart usage. |
82
+ | [docs/development.md](docs/development.md) | Rebuilding exports, validating, tests, release checklist. |
83
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | How to report a problem or send a change. |
84
+ | [CHANGELOG.md](CHANGELOG.md) | What changed in each version. |
85
+
86
+ ## Files
87
+
88
+ | File | Purpose |
89
+ |---|---|
90
+ | `burundi-geo.json` | Names, ids, population and coordinates. The map is drawn from this file. |
91
+ | `burundi-geo.geojson` | The same areas as GeoJSON, for QGIS, Leaflet and Mapbox. |
92
+ | `burundi-geo.csv` | One row per area, for spreadsheets and databases. |
93
+ | `former-areas.json` | Where each of the 119 former communes is now. |
94
+ | `water.json`, `roads.json` | Lakes, rivers and national roads (off by default on the map). |
95
+ | `index.html`, `i18n.js` | The map and its English, French and Kirundi text. |
96
+ | `burundi.py`, `burundi-m`, `burundi-m.cmd`, `pyproject.toml` | The command-line tool and its launchers. |
97
+ | `burundi.mjs` | JavaScript module. |
98
+ | `dart/` | Dart and Flutter package `burundi_geo`. |
99
+ | `tools/`, `tests/` | Scripts that rebuild exports, check the data, and run the tests. |
100
+
101
+ ## Read the data without installing anything
102
+
103
+ ```
104
+ curl -O https://raw.githubusercontent.com/Blixy4/burundi-map/main/burundi-geo.json
105
+ ```
106
+
107
+ ```python
108
+ import json, urllib.request
109
+
110
+ url = "https://raw.githubusercontent.com/Blixy4/burundi-map/main/burundi-geo.json"
111
+ data = json.load(urllib.request.urlopen(url))
112
+ for p in data["provinces"]:
113
+ print(p["name"], p["stats"]["population"]["value"])
114
+ ```
115
+
116
+ More examples (PowerShell, `jq`, JavaScript) and the schema are in [docs/data.md](docs/data.md).
117
+
118
+ ## Accuracy
119
+
120
+ Boundaries are simplified for display. Do not use them for surveying or legal purposes.
121
+
122
+ ## Sources
123
+
124
+ Names and structure are based on [Ijwi-ry-Ikirundi-AI/burundi-geo-data](https://github.com/Ijwi-ry-Ikirundi-AI/burundi-geo-data). Boundaries come from IGEBU and OCHA via [HDX](https://data.humdata.org/dataset/cod-ab-bdi). Population (provinces and communes) is from the preliminary 2024 census. Lakes, rivers and roads are from OpenStreetMap. Details are in [docs/data.md](docs/data.md#sources).
125
+
126
+ ## Licences
127
+
128
+ Free to use, including commercially, as long as you give credit.
129
+
130
+ | Files | Licence |
131
+ |---|---|
132
+ | Everything except the two files below | [CC BY 3.0 IGO](https://creativecommons.org/licenses/by/3.0/igo/), see [LICENSE](LICENSE). Credit Blixy4, IGEBU, OCHA (via HDX) and the original data project. |
133
+ | `water.json`, `roads.json` | [ODbL 1.0](https://opendatacommons.org/licenses/odbl/1-0/). Credit OpenStreetMap contributors and share adapted data under ODbL. |
134
+
135
+ To cite this project, see [CITATION.cff](CITATION.cff).
@@ -0,0 +1,113 @@
1
+ # Burundi Map
2
+
3
+ **Created and maintained by [Blixy4](https://github.com/Blixy4).**
4
+
5
+ **[View the live map](https://blixy4.github.io/burundi-map/)**
6
+
7
+ Interactive map and open data for Burundi's new administrative structure: 5 provinces, 42 communes, 451 zones and 3,044 collines and quartiers. The map is available in English, French and Kirundi.
8
+
9
+ ## What you can do
10
+
11
+ | I want to... | Use |
12
+ |---|---|
13
+ | Look at the map | [blixy4.github.io/burundi-map](https://blixy4.github.io/burundi-map/) |
14
+ | Find a place or a GPS position from the terminal | `burundi-m`, see [Quick start](#quick-start) |
15
+ | Use the data in QGIS, Excel or a database | `burundi-geo.geojson`, `burundi-geo.csv` |
16
+ | Use the data in an app or a script | [`burundi-geo.json`](docs/data.md), or the [Python, JavaScript and Dart libraries](docs/libraries.md) |
17
+ | Find where an old commune is now | `burundi-m former Bisoro`, or `former-areas.json` |
18
+
19
+ ## Quick start
20
+
21
+ Install (needs Python 3.8 or later, nothing else):
22
+
23
+ ```
24
+ pip install git+https://github.com/Blixy4/burundi-map
25
+ ```
26
+
27
+ Then:
28
+
29
+ ```
30
+ burundi-m locate Nyanza find a place by name (asks if ambiguous)
31
+ burundi-m locate -c Nyanza -f -l the commune, its former communes, what it contains
32
+ burundi-m locate -3.3822 29.3644 which areas hold a GPS position
33
+ burundi-m list communes --in GT the communes of a province
34
+ burundi-m near -3.3822 29.3644 -n 3 the 3 closest areas
35
+ burundi-m stats counts and population per province
36
+ ```
37
+
38
+ Every command follows the same pattern, `burundi-m COMMAND [WHAT] [SELECT] [SHOW] [OUTPUT]`, and uses the same flags everywhere:
39
+
40
+ | Flag | Meaning |
41
+ |---|---|
42
+ | `-p` `-c` `-z` `-cl` `-q` | provinces, communes, zones, collines, quartiers |
43
+ | `--in PLACE` | only inside this province, commune or zone |
44
+ | `-f` | former communes (pre-2025) |
45
+ | `-l` / `-t` | list children / draw a tree (`--depth N`, `--ascii`) |
46
+ | `--format text\|json\|csv\|geojson`, `--json` | output format |
47
+ | `-h` | help |
48
+
49
+ Exit codes: 0 ok, 1 nothing found, 2 usage error or ambiguous name in a script, 3 data error.
50
+
51
+ The full guide, with every command, output and recipe, is [docs/cli.md](docs/cli.md).
52
+
53
+ ## Documentation
54
+
55
+ | Guide | Contents |
56
+ |---|---|
57
+ | [docs/cli.md](docs/cli.md) | The `burundi-m` command: grammar, flags, commands, output, exit codes, recipes. |
58
+ | [docs/data.md](docs/data.md) | The data files, ids, schema, exports, former communes, sources, licences. |
59
+ | [docs/libraries.md](docs/libraries.md) | Python, JavaScript and Dart usage. |
60
+ | [docs/development.md](docs/development.md) | Rebuilding exports, validating, tests, release checklist. |
61
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | How to report a problem or send a change. |
62
+ | [CHANGELOG.md](CHANGELOG.md) | What changed in each version. |
63
+
64
+ ## Files
65
+
66
+ | File | Purpose |
67
+ |---|---|
68
+ | `burundi-geo.json` | Names, ids, population and coordinates. The map is drawn from this file. |
69
+ | `burundi-geo.geojson` | The same areas as GeoJSON, for QGIS, Leaflet and Mapbox. |
70
+ | `burundi-geo.csv` | One row per area, for spreadsheets and databases. |
71
+ | `former-areas.json` | Where each of the 119 former communes is now. |
72
+ | `water.json`, `roads.json` | Lakes, rivers and national roads (off by default on the map). |
73
+ | `index.html`, `i18n.js` | The map and its English, French and Kirundi text. |
74
+ | `burundi.py`, `burundi-m`, `burundi-m.cmd`, `pyproject.toml` | The command-line tool and its launchers. |
75
+ | `burundi.mjs` | JavaScript module. |
76
+ | `dart/` | Dart and Flutter package `burundi_geo`. |
77
+ | `tools/`, `tests/` | Scripts that rebuild exports, check the data, and run the tests. |
78
+
79
+ ## Read the data without installing anything
80
+
81
+ ```
82
+ curl -O https://raw.githubusercontent.com/Blixy4/burundi-map/main/burundi-geo.json
83
+ ```
84
+
85
+ ```python
86
+ import json, urllib.request
87
+
88
+ url = "https://raw.githubusercontent.com/Blixy4/burundi-map/main/burundi-geo.json"
89
+ data = json.load(urllib.request.urlopen(url))
90
+ for p in data["provinces"]:
91
+ print(p["name"], p["stats"]["population"]["value"])
92
+ ```
93
+
94
+ More examples (PowerShell, `jq`, JavaScript) and the schema are in [docs/data.md](docs/data.md).
95
+
96
+ ## Accuracy
97
+
98
+ Boundaries are simplified for display. Do not use them for surveying or legal purposes.
99
+
100
+ ## Sources
101
+
102
+ Names and structure are based on [Ijwi-ry-Ikirundi-AI/burundi-geo-data](https://github.com/Ijwi-ry-Ikirundi-AI/burundi-geo-data). Boundaries come from IGEBU and OCHA via [HDX](https://data.humdata.org/dataset/cod-ab-bdi). Population (provinces and communes) is from the preliminary 2024 census. Lakes, rivers and roads are from OpenStreetMap. Details are in [docs/data.md](docs/data.md#sources).
103
+
104
+ ## Licences
105
+
106
+ Free to use, including commercially, as long as you give credit.
107
+
108
+ | Files | Licence |
109
+ |---|---|
110
+ | Everything except the two files below | [CC BY 3.0 IGO](https://creativecommons.org/licenses/by/3.0/igo/), see [LICENSE](LICENSE). Credit Blixy4, IGEBU, OCHA (via HDX) and the original data project. |
111
+ | `water.json`, `roads.json` | [ODbL 1.0](https://opendatacommons.org/licenses/odbl/1-0/). Credit OpenStreetMap contributors and share adapted data under ODbL. |
112
+
113
+ To cite this project, see [CITATION.cff](CITATION.cff).