Guide / Setup
Getting Started
Choose the format that fits your stack. Every export is generated from the same four-level administrative hierarchy.
Clone the repository
git clone https://github.com/bayeziddev/Bangladesh-geocode.git
cd Bangladesh-geocode
Pick a data format
| Format | Best for | Path |
|---|---|---|
| JSON | Web apps and APIs | divisions/divisions.json |
| CSV | Spreadsheets and pipelines | districts/districts.csv |
| SQL | Relational databases | upazilas/upazilas.sql |
| PHP | Simple PHP projects | unions/unions.php |
| XML | Legacy integrations | divisions/divisions.xml |
Tip: Keep the parent IDs when importing. They let you move from division to district to upazila to union without fuzzy name matching.
Use the browser-ready GeoJSON
fetch('geojson/districts.geojson.txt')
.then(response => response.json())
.then(({ features }) => console.log(features.length));