turkey-location-data
v1.1.1
Published
Turkey province, district and neighborhood data
Downloads
23
Maintainers
Readme
🇹🇷 Turkey Location Data
Access Turkey's location data including provinces, districts, neighborhoods, and plate codes with ease.
✨ Features
- 📍 Get all provinces with their API IDs
- 🏘️ Get districts by province name or API ID
- 🏡 Get neighborhoods by district API ID
- 🚗 Get province name by plate code
- ⚙️ Written in TypeScript
- 🚀 Lightweight & fast
📦 Installation
npm install turkey-location-data🔧 Usage
📍 Get All Provinces
import { getAllProvinces } from "turkey-location-data";
const provinces = getAllProvinces();
// Returns: [{ name: "İstanbul", apiId: 34 }, ...]🏘️ Get Districts by Province
import {
getDistrictsByProvinceName,
getDistrictsByProvinceApiId,
} from "turkey-location-data";
// By province name
const districts = getDistrictsByProvinceName("İstanbul");
// Returns: [{ name: "Kadıköy", apiId: 1234 }, ...]
// By province API ID
const districts2 = getDistrictsByProvinceApiId(34);
// Returns: [{ name: "Kadıköy", apiId: 1234 }, ...]🏡 Get Neighborhoods
import { getNeighborhoodsByDistrictApiId } from "turkey-location-data";
const neighborhoods = getNeighborhoodsByDistrictApiId(1234);
// Returns: ["Caferağa", "Fenerbahçe", ...]🚗 Get Province by Plate Code
import { getProvinceNameByPlateCode } from "turkey-location-data";
const province = getProvinceNameByPlateCode(34); // "İstanbul"📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
📧 Contact
Feel free to contact me with any questions or suggestions.
- 📧 Email: [email protected]
- 💬 Instagram: @ismetcanbyk
- 💬 LinkedIn: ismetcanbyk
- 💬 GitHub: ismetcanbyk
