• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
  • License
    MIT License
  • Created over 4 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Indonesia Postal Code & Area (BPS)

INDONESIA POSTAL CODE & AREA

This is collections of Indonesia area & postal codes.

This repository contains THOUSANDS & Binary Data!

Before clone, make sure you know what you'll do.

AWESOME OF YOU

GitHub Sponsor

COLLECTIONS

  • Postal Code : 14955
  • Villages : 83342
  • Sub-Districts : 7228
  • Cities : 514
  • Provinces : 34
  • Countries : 1 (Indonesia Only)

STRUCTURES

Data Directory

data/
    β”œβ”€β”€β”€ csv/
    |   └─── 62/                                        (Country csv directory)
    |       β”œβ”€β”€β”€ countries.csv                          (Countries csv data)
    |       β”œβ”€β”€β”€ provinces.csv                          (Provinces csv data)
    |       β”œβ”€β”€β”€ cities.csv                             (Cities csv data)
    |       β”œβ”€β”€β”€ subDistricts.csv                       (Sub-Districts csv data)
    |       β”œβ”€β”€β”€ villages.csv                           (Villages csv data)
    |       β”œβ”€β”€β”€ postalCodes.csv                        (Postal Codes csv data)
    |       └─── translations.csv                       (Translations csv data)
    β”œβ”€β”€β”€ database/
    |   β”œβ”€β”€β”€ records.sqlite.db                          (SQLite Binary Database - geometry records has been set to null)
    |   β”œβ”€β”€β”€ ddl.sql                                    (DDL)
    |   β”œβ”€β”€β”€ ddl.uml
    |   └─── ddl.uml.png
    β”œβ”€β”€β”€ json/
    |   β”œβ”€β”€β”€ area/
    |   |   └─── 62/                                    (country root directory)
    |   |       β”œβ”€β”€β”€ 62.json                            (country json info)
    |   |       └─── [0-9]{2}/                          (provinces root directory)
    |   |           β”œβ”€β”€β”€ [0-9]{2}.json                  (province json info)
    |   |           └─── [0-9]{4}/                      (cities root directory)
    |   |               β”œβ”€β”€β”€ [0-9]{4}.json              (city json info)
    |   |               └─── [0-9]{7}/                  (sub-districts root directory)
    |   |                   └─── [0-9]{7}.json          (sub-district json info)
    |   |                       └─── [0-9]{11}/         (villages root directory - contain single file)
    |   |                           └─── [0-9]{11}.json (village json info)
    |   β”œβ”€β”€β”€ postal/                                    (country postal codes root directory)
    |   |   └─── 62.json                                (list of country postal codes)
    |   └─── translations/
    |       └─── 62/                                    (country translations root directory)
    |           └─── en.json                            (list of available areas translations)    
    └─── geojson/
       └─── 62/                                         (country geojson root directory)
           β”œβ”€β”€β”€ 62.json                                 (country geojson)
           └─── [0-9]{2}/                               (provinces geojson root directory)
               β”œβ”€β”€β”€ [0-9]{2}.json                       (province geojson)
               └─── [0-9]{4}/                           (cities geojson root directory)
                   β”œβ”€β”€β”€ [0-9]{4}.json                   (city geojson)
                   └─── [0-9]{7}/                       (sub-districts geojson root directory)
                       └─── [0-9]{7}.json               (sub-district geojson)


Json Areas

Latitude & Longitude contains centroid of MultiPolygon take from geojson using geophp

{
  "code": "integer",
  "name": "string",
  "parent": "integer",
  "latitude": "float|null",
  "longitude": "float|null",
  "postal": ["array<integer>"],
  "children": ["array<integer>"]
}

GEO-JSON

Geo-JSON only available from Country to Sub-Districts, villages are not available.

Read More About GeoJSON

{
  "type": "FeatureCollections",
  "features": ["array<object>"]
}

Example :

{
  "type": "FeatureCollections",
  "features": [
    {
      "type": "Feature",
      "code": "integer",
      "properties" : {
        "Kind"  : "string",
        "Code"  : "integer",
        "Name"  : "string",
        "Year"  : "integer|string",
        "Source": "BPS",
        "Parent": "integer"
      },
      "geometry": {
        "type": "MultiPolygon",
        "coordinates" : [
          [
            [
                [
                  91.0000001,
                  1.00000001
                ],
                [
                  92.0000002,
                  2.00000002
                ]
            ]
          ]
        ]
      }
    }
  ]
}

DATA SOURCE

DATA PROCESSOR

NOTE

  • Badan Pusat Statistik Indonesia (BPS) contains detailed polygons, it will make this repository contains huge data.
  • Some of GeoJson not available
  • Database Files on all columns with xxxx_geometry has been set to null. Please insert manually from data/geojson, Trees file name as code

DISCUSSION

LICENSE

MIT LICENSE