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

FormatBest forPath
JSONWeb apps and APIsdivisions/divisions.json
CSVSpreadsheets and pipelinesdistricts/districts.csv
SQLRelational databasesupazilas/upazilas.sql
PHPSimple PHP projectsunions/unions.php
XMLLegacy integrationsdivisions/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));