Data v3
GeoThai Data - Version 3
Welcome to GeoThai Data Version 3! 🌏📊 This directory contains the latest and most modular version of the geographic data for Thailand. Version 3 introduces schema-based validation and decomposes the dataset into atomic, reusable structures optimized for performance and maintainability.
📁 Directory Structure
Version 3 is composed of structured JSON files, each validated against a corresponding schema. This modular architecture improves reliability and facilitates integration with various applications.
provinces.json: Map of province data keyed by province code.districts.json: Map of district data keyed by district code.subdistricts.json: Map of subdistrict data keyed by subdistrict code.postal_codes.json: Map of postal code data keyed by postal code.- Name maps:
province_name_map.jsondistrict_name_map.jsonsubdistrict_name_map.json
- Index maps:
province_index.jsondistrict_index.jsonsubdistrict_index.jsonpostal_code_map.json
- Metadata:
metadata.json
- Schemas:
- JSON Schema definitions for validation (e.g.,
provinces.schema.json,metadata.schema.json, etc.)
- JSON Schema definitions for validation (e.g.,
📊 Data Details
Provinces
File: provinces.json
Each province entry contains:
code: Integer province codename_en/name_th: English and Thai namesdistricts: List of district codes
Districts
File: districts.json
Each district entry includes:
code: Integer district codeprovince_code: Parent province codename_en/name_th: English and Thai namessubdistricts: List of subdistrict codes
Subdistricts
File: subdistricts.json
Each subdistrict entry includes:
code: Integer subdistrict codedistrict_code: Parent district codeprovince_code: Parent province codename_en/name_th: English and Thai namespostal_code: Associated postal code
Postal Codes
File: postal_codes.json
Each postal code maps to one or more subdistrict codes.
Name Maps
These files provide reverse mappings from Thai or English names to their respective IDs:
Index Maps
These files enable efficient lookup of hierarchical relationships:
province_index.json: List of province codesdistrict_index.json: Districts grouped by province codesubdistrict_index.json: Subdistricts grouped by district codepostal_code_map.json: Subdistricts grouped by postal code
Metadata
File: metadata.json
Contains versioning and summary statistics such as:
{
"version": "3.0.0",
"last_updated": "YYYY-MM-DD HH:MM:SS",
"source": "GeoThai Team (https://github.com/GeoThai/data.git)",
"stats": {
"provinces": 77,
"districts": 928,
"subdistricts": 7436,
"postal_codes": 954
}
}📚 Documentation
For more context on the structure and usage of this repository, see the main README. Each schema file can also be used to validate corresponding data programmatically.
📝 License
This dataset is licensed under the MIT License. See the LICENSE file for full terms.
🙋♂️ Contact
Have questions or feedback? Reach out to us at contact@fasu.dev.
Thank you for using GeoThai Data Version 3! 🚀