Geo json files contain the lat-long informations about any place, so that it can be mapped. Every country has their unique geo json, that can be used for visualizations. However, for Bangladesh
, the updated geojson file along with example was not available. This repo is aimed to solve this issue.
Shape files in SHP format: [Bangladesh - Subnational Administrative Boundaries] (Original Source)
From there, download the file: bgd_adm_bbs_20201113_SHP.zip (186.6M)
Extract and save the 64 files in a folder.
- adm = Administration Regions
- adm0 = Entire Bangladesh
- adm1 = 8 Divisions
- adm2 = 64 Districts/Zilas
- adm3 = 492 Upazilas
- adm4 = 5160 Thanas/Unions
The folder Geo Json Maps
contains the geo json files of 2,3 and 4. You can do for the rest if needed.
import shapeTojson
from osgeo import ogr
shapeTojson.shp2json('Shape_files/path_to_shp_file.shp')
Source of converter function: Yash Sanghvi
Installing Osgeo to import ogr: Open Source Geo Spatial Foundation
-
All the instructions given in the
bd map.ipynb
file. -
A friendly tutorial on choropleth map using plotly can be found here.
The repo from Yasser Aziz inspired this work.