Giter Site home page Giter Site logo

ibed-berto / wilayah-administratif-indonesia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edwardsamuel/wilayah-administratif-indonesia

0.0 0.0 0.0 6.47 MB

Data Provinsi, Kota/Kabupaten, Kecamatan, dan Kelurahan/Desa di Indonesia

License: MIT License

Python 76.14% Shell 23.86%

wilayah-administratif-indonesia's Introduction

Data Provinsi, Kota/Kabupaten, Kecamatan, dan Kelurahan/Desa di Indonesia

Data ini diambil dari situs Pemutakhiran MFD dan MBS Badan Pusat Statistik (http://mfdonline.bps.go.id/) pada 11 Januari 2018.

Administrative Subdivisions of Indonesia (Provinces, Regencies/Cities, Districts, Villages)

The data were taken from Central Agency on Statistics (BPS) - MFD and MBS Update (http://mfdonline.bps.go.id/) on 11th January 2018.

The data were curl-ed from BPS site:

curl http://mfdonline.bps.go.id/index.php?link=hasil_pencarian --data "pilihcari=desa&kata_kunci="

with a, i, u, e and o as the keywords.

Statistics

+------+---------------------------+----------------+-----------+----------------+
| Kode | Provinsi                  | Kabupaten/Kota | Kecamatan | Desa/Kelurahan |
+------+---------------------------+----------------+-----------+----------------+
| 11   | ACEH                      |             23 |       289 |           6509 |
| 12   | SUMATERA UTARA            |             33 |       448 |           6102 |
| 13   | SUMATERA BARAT            |             19 |       179 |           1160 |
| 14   | RIAU                      |             12 |       169 |           1876 |
| 15   | JAMBI                     |             11 |       141 |           1562 |
| 16   | SUMATERA SELATAN          |             17 |       236 |           3263 |
| 17   | BENGKULU                  |             10 |       128 |           1515 |
| 18   | LAMPUNG                   |             15 |       228 |           2642 |
| 19   | KEPULAUAN BANGKA BELITUNG |              7 |        47 |            366 |
| 21   | KEPULAUAN RIAU            |              7 |        70 |            395 |
| 31   | DKI JAKARTA               |              6 |        44 |            254 |
| 32   | JAWA BARAT                |             27 |       627 |           5832 |
| 33   | JAWA TENGAH               |             35 |       573 |           8008 |
| 34   | DI YOGYAKARTA             |              5 |        78 |            414 |
| 35   | JAWA TIMUR                |             38 |       666 |           7856 |
| 36   | BANTEN                    |              8 |       155 |           1501 |
| 51   | BALI                      |              9 |        57 |            653 |
| 52   | NUSA TENGGARA BARAT       |             10 |       116 |           1062 |
| 53   | NUSA TENGGARA TIMUR       |             22 |       307 |           3202 |
| 61   | KALIMANTAN BARAT          |             14 |       174 |           2073 |
| 62   | KALIMANTAN TENGAH         |             14 |       136 |           1537 |
| 63   | KALIMANTAN SELATAN        |             13 |       152 |           1971 |
| 64   | KALIMANTAN TIMUR          |             10 |       103 |           1002 |
| 65   | KALIMANTAN UTARA          |              5 |        53 |            466 |
| 71   | SULAWESI UTARA            |             15 |       171 |           1790 |
| 72   | SULAWESI TENGAH           |             13 |       175 |           1953 |
| 73   | SULAWESI SELATAN          |             24 |       307 |           2975 |
| 74   | SULAWESI TENGGARA         |             17 |       222 |           2301 |
| 75   | GORONTALO                 |              6 |        77 |            722 |
| 76   | SULAWESI BARAT            |              6 |        69 |            639 |
| 81   | MALUKU                    |             11 |       118 |           1180 |
| 82   | MALUKU UTARA              |             10 |       116 |           1155 |
| 91   | PAPUA BARAT               |             13 |       217 |           1730 |
| 94   | PAPUA                     |             29 |       567 |           4866 |
+------+---------------------------+----------------+-----------+----------------+

Note:

The data was provided as-it-is and looks like there are two anomalies:

There was entries that not in ASCII format.

72  SULAWESI TENGAH 09  KABUPATEN TOJO UNA-UNA  070 TOGEAN  016 TITIRIí POPOLION
94  PAPUA 33  KABUPATEN PUNCAK  042 MAGEÁBUME

There are duplicate village id.

91  PAPUA BARAT 07  KABUPATEN SORONG  182 WEMAK 005 KAMLIN
91  PAPUA BARAT 07  KABUPATEN SORONG  182 WEMAK 005 KWARI

91  PAPUA BARAT 09  KABUPATEN TAMBRAUW  070 KEBAR 015 ANARUM
91  PAPUA BARAT 09  KABUPATEN TAMBRAUW  070 KEBAR 015 JAMBUANI

The above statistics was generated by MySQL version and uses INSERT IGNORE statements. This will skip the duplicate items.

Generate new data

In order to generate new data:

cd scripts
pip install -r requirements.txt
./run.sh

We use mysql as default database hostname and root as default database username, but if you have different database setup on your local machine, you can simply run it with argument:

./run -h [my-db-host] -u [my-db-username]

You can also run docker-compose (more preferred):

docker-compose build
docker-compose up

License

  • The scripts are license under: MIT.
  • The data (CSV and SQL) are under: ODBL v1.0.
  • The source data is attributed to Badan Pusat Statistik (BPS) Indonesia.

Contributing

  1. Fork it (https://github.com/edwardsamuel/Wilayah-Administratif-Indonesia/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.

wilayah-administratif-indonesia's People

Contributors

edwardsamuel avatar feryardiant avatar jayvdb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.