Welcome to the GeoThai Data Repository! ππ This repository contains geographic data for Thailand, organized into four versions: v1, v2, v3, and v4. Each version provides different structures and datasets to support various geographic analyses and applications.
This repository is organized into four main versions, each with its own set of files:
- v1: Contains individual JSON files for provinces, districts, and subdistricts.
- v2: Features a more integrated structure with nested relationships and additional postal code data.
- v3: Introduces indexed mappings ideal for optimized lookups and programmatic use.
- v4: Ultra-fast lookup optimized structure with denormalized data and embedded hierarchies.
This version includes separate files for:
- Provinces:
data/v1/provinces.json - Districts:
data/v1/districts.json - Subdistricts:
data/v1/subdistricts.json
For more details, refer to the v1 README.
This version provides a more integrated structure with:
- Provinces:
data/v2/provinces.json - Districts:
data/v2/districts.json - Subdistricts:
data/v2/subdistricts.json - Postal Codes:
data/v2/postal_codes.json
For more details, refer to the v2 README.
This version includes all core data with improved indexing and name/code maps:
- Provinces:
data/v3/provinces.json - Districts:
data/v3/districts.json - Subdistricts:
data/v3/subdistricts.json - Postal Codes:
data/v3/postal_codes.json - Index Maps:
data/v3/*_index.json - Name Maps:
data/v3/*_name_map.json - Code Maps:
data/v3/*_code_map.json - Metadata:
data/v3/metadata.json
For more details, refer to the v3 README.
This version provides ultra-fast lookup optimization with fully denormalized data:
- Complete Hierarchy:
data/v4/geo.json - Provinces by Code:
data/v4/provinces_flat.json - Postal Code Lookup:
data/v4/postal_lookup.json - Search Index:
data/v4/search_index.json - Metadata:
data/v4/metadata.json
For more details, refer to the v4 README.
Each version includes a metadata.json file with:
- Version: The data version.
- Last Updated: The timestamp of the last update.
- Source: GeoThai GitHub Repository.
- Total Counts: Number of provinces, districts, subdistricts, and postal codes (available in v2+).
To use the data, follow these steps:
-
Clone the repository:
git clone https://github.com/GeoThai/data.git cd dataNote: Ensure you have Git installed on your system.
-
Select the version: Choose
v1,v2,v3, orv4based on your needs:- v1: Simple flat files for basic use cases
- v2: Nested structure with postal codes
- v3: Optimized with indexes and maps
- v4: Ultra-fast denormalized structure for high-performance applications
-
Access Data: Navigate to the relevant directory and access the JSON files as required.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions, issues, or feedback, please contact us at geothai@fasu.dev.
Thank you for using the GeoThai Data Repository! π