Coder Social home page Coder Social logo

flores-jacob / philippine-regions-provinces-cities-municipalities-barangays Goto Github PK

View Code? Open in Web Editor NEW
104.0 9.0 31.0 661 KB

List of Philippine regions, provinces, cities, municipalities, and their barangays as of the 2019 national elections

License: MIT License

Python 100.00%
philippine-regions municipalities province cities philippines json barangay philippines-json philippine-barangays philippine-cities philippine-municipalities philippine-provinces

philippine-regions-provinces-cities-municipalities-barangays's Introduction

List of Philippine Regions, Provinces, Cities, Municipalities, and Barangays

Download

Get the version 4(2019v2) file here: philippine_provinces_cities_municipalities_and_barangays_2019v2.json

How to use, and notes on format

The file is in json format, and should be accessible to most languages. For python users, it can be loaded using the json library.

import json
with open("/path/to/file/philippine_provinces_cities_municipalities_and_barangays_2019v2.json") as myjsonfile:
    mydata = json.load(myjsonfile)  

An overview of the structure:
structure

Region keys are of the string values "01", "02", "03", "4A", "4B, "05", "06", "07", "08", "09", "10", "11", "12", "13", "BARMM", "CAR", "NCR", (including "NIR" for version 2, and ARMM for version 3 and 3.1).

  1. Each region has the following properties:

    1. A "region_name" property which maps to a string
      • example: "region_name": "REGION XIII"
    2. A "province_list" property which maps to a dictionary that has the province name in all caps as the keys
      • example: "province_list": { BATANGAS:{ ... }, "CAVITE":{ ... }, ... }
  2. Each province has the following property:

    1. A "municipality_list" which maps to a dictionary containing municipality names in all caps as the keys
      • example: "municipality_list": { "BACOLOD CITY": { ... }, "BAGO CITY": { ... }, "BINALBAGAN" { ... }, ...}
  3. Each municipality has the following property:

    1. A "barangay_list" which maps to a list containing the barangay names
      • example: "barangay_list": ["AMPUCAO", "DALUPIRIP", "GUMATDANG", ...]

What is this?

This is a nested list of Philippine regions, provinces, cities/municipalities and barangays in json format.

Why?

Getting an authoritative list of Philippine geographical areas can be pretty tedious and challenging.

Is this accurate?

Short answer: Yes, it is accurate.

Long answer:

  • It was definitely accurate as of 13 May 2019, the date of the 2019 Philippine elections. Or at least, it was as accurate as the COMELEC records for that election.
  • The only warning we have for this resource is that if any municipalities or barangays have either been created, renamed, moved, or destroyed since the 2019 elections, such changes would not be reflected on this resource. If you know of any such changes, please file an issue, or better yet, make a pull request, so that we can have it fixed.

Any changes from the version 3 file I should know about?

Several municipalities have been renamed, some barangays have been moved, and some barangays not present in the previous version have been introduced. ARMM has also been changed to BARMM. Running a diff between the properly formatted version 3.1 (2017) and version 4 (May 15, 2019v1) (prior to the correction of ร‘ characters on July 29, 2019), should show which portions have changed (there should be around 14 material differences).

So which version should I get?

Get the version 4 (2019v2) file. philippine_provinces_cities_municipalities_and_barangays_2019v2.json

I've spotted some inaccuracies!

Please file an issue or make a pull request. I can also be reached at the email address associated with this github account.

Obligatory disclaimer

Data is provided as is and without guarantees. It should however be fairly accurate, as it is based on the 2019 Comelec election data.

philippine-regions-provinces-cities-municipalities-barangays's People

Contributors

flores-jacob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

philippine-regions-provinces-cities-municipalities-barangays's Issues

Outdated

The current list is already outdated. Kindly update the file.

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.