Skip to content

gilang-as/indonesian-region-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indonesian Region Data (Provinces, Regencies/Cities, Districts, Villages)

Sample Data

Provinces

[
  {
    "id": 1,
    "code": "11",
    "name": "ACEH"
  }
]

Regencies

[
  {
    "id": 1,
    "code": "1109",
    "province_code": "11",
    "name": "KAB. SIMEULUE"
  }
]

Districts

[
  {
    "id": 1,
    "code": "110907",
    "regency_code": "1109",
    "province_code": "11",
    "name": "TEUPAH SELATAN"
  }
]

Villages

[
  {
    "id": 1,
    "code": "1109072008",
    "district_code": "110907",
    "regency_code": "1109",
    "province_code": "11",
    "name": "LATIUNG"
  }
]

Generate New Data

In order to generate new data:

# Install Packages
npm i
# Run
npm run main.js

Sources

Data Source
Province https://sig.bps.go.id/rest-bridging-dagri/getwilayah?level=provinsi&parent=0
Regencies/Cities https://sig.bps.go.id/rest-bridging/getwilayah?level=kabupaten&parent={province-id}
Districts https://sig.bps.go.id/rest-bridging/getwilayah?level=kecamatan&parent={regency-id}
Villages https://sig.bps.go.id/rest-bridging/getwilayah?level=kecamatan&parent={district-id}

ToDo

  • Single JSON ✅
  • Split JSON ✅
  • Full JSON ✅
  • SQL ✅
  • Mongo ❌ (From JSON)
  • Generate Data With GitHub Actions

License

Contributing

  1. Fork it (https://github.com/gilang-as/indonesian-region/fork).
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

About

Indonesian Region Code (Json, MySQL)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published