npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

bangladeshi-geo-data

v1.0.1

Published

A Lightweight & easy to use package providing Bangladesh's geo data (Divisions, Districts, Upazilas)

Downloads

18

Readme

📌 Bangladesh Geo Data (Divisions, Districts, Upazilas)

🏆 Overview

bangladeshi-geo-data provides Bangladesh's geographical data, including Divisions, Districts, and Upazilas, in a structured and searchable format.

✅ Supports English & Bangla names
Efficient search functionality
✅ Lightweight & easy to use


📦 Installation

Using NPM

npm install bangladeshi-geo-data

Using Yarn

yarn add bangladeshi-geo-data

🚀 Usage Examples

1️⃣ Importing the Package

import { getDivisions, getDivision, getDistricts, getUpazilas, searchGeoData } from "bangladeshi-geo-data";

2️⃣ Get All Divisions

console.log(getDivisions());

3️⃣ Get Division by ID or Name

console.log(getDivision(1)); // Fetch division by ID
console.log(getDivision("Dhaka")); // Fetch division by name
console.log(getDivision("ঢাকা")); // Fetch division by Bangla name

4️⃣ Get Districts by Division ID or Name

console.log(getDistricts(1)); // Fetch districts in division ID 1
console.log(getDistricts("Dhaka")); // Fetch districts in Dhaka division

5️⃣ Get Upazilas by District Name

console.log(getUpazilas("Dhaka", "Dhaka")); // Fetch Upazilas in Dhaka District

6️⃣ Search for Any Division, District, or Upazila

console.log(searchGeoData("Gazipur"));
console.log(searchGeoData("সাভার")); // Bangla search

🎯 Real-Life Use Cases

1️⃣ E-commerce Address Management

If you're building an e-commerce platform, you can use bangladeshi-geo-data to allow users to select their division, district, and upazila while filling out their shipping address.

const userDivision = getDivision("Dhaka");
const userDistricts = getDistricts("Dhaka");
const userUpazilas = getUpazilas("Dhaka", "Dhaka");

2️⃣ Government & NGO Data Analysis

Organizations working in rural development can filter and analyze data by region.

const floodProneDistricts = ["Sunamganj", "Sylhet", "Kurigram"];
const districtsData = floodProneDistricts.map((name) => getDistricts(name));

3️⃣ Location-Based Filtering in Apps

If you're building a real estate, healthcare, or service-based app, you can filter data based on users' locations.

const userSearch = searchGeoData("Comilla");
console.log("Matching Locations:", userSearch);

🎯 Features

  • 📍 Accurate Geo Data (Bangladesh's Divisions, Districts, and Upazilas)
  • 🔍 Searchable (Find by ID, English name, or Bangla name)
  • 🚀 Lightweight & Fast
  • 🔄 Regularly Updated
  • 🏆 Well-structured TypeScript support

⚙️ API Methods

| Method | Description | Input Type | Example Input | | | ----------------- | ------------------------------------------------- | --------------- | ------------------------------- | ----------------------------------------- | | getDivisions() | Get all divisions | () | getDivisions() | | | getDivision() | Get a division by ID or Name | number|string | getDivision(1) / getDivision("Dhaka") | | getDistricts() | Get districts by Division ID or Name | number|string | getDistricts("Dhaka") | | getUpazilas() | Get upazilas by District Name & Division | string,string | getUpazilas("Dhaka", "Dhaka") | | | searchGeoData() | Search for any division, district, or upazila | string | searchGeoData("Gazipur") | |


🛠️ Contributing

Contributions are welcome! 🎉
To contribute:

  1. Fork this repository
  2. Create a new feature branch
  3. Submit a Pull Request (PR)

📌 If you find any missing data or incorrect names, please open an issue.


📜 License

Licensed under the MIT License.
You are free to use, modify, and distribute this package.

📌 Maintainer: Mehedi Hasan Khairul
📌 NPM Package: bangladeshi-geo-data


📢 Contact & Support

🔗 GitHub: GitHub Repo
🔗 NPM: NPM Package
🔗 Facebook: Facebook Profile

🚀 Enjoy using bangladeshi-geo-data! Let us know if you have any suggestions or feedback! 🚀