Git Product home page Git Product logo

idn-area-data's Introduction

F for Fityan

You can call me Fityan. I'm a software engineer from 🇮🇩 Indonesia. I love coding and building things that make people's lives easier. Most of the time was working with PHP, JavaScript, and TypeScript, using various frameworks to build front-end and back-end applications such as Laravel, React, Next.js, and NestJS. I'm interest with website, android, and open source project 🚀

An image of @fityannugroho's Holopin badges, which is a link to view their full Holopin profile

Statistics

Fityan's Most Used Language Fityan's Github Stats

Keep Connected

LinkedIn X / Twitter YouTube Medium

Support Me

Buy Me a ko-fi Trakteer Saya

idn-area-data's People

Contributors

dependabot[bot] avatar fityannugroho 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

idn-area-data's Issues

[SUGGEST] Transform any empty data with `null`

Is your feature request related to a problem? Please describe.

Currently, the island that doesn't belong to any regency will give the regency_code value with empty string ''.

Describe the solution you'd like

It is better if the regency_code value of the island that doesn't belong to any regency (and any empty value later) is transformed into null.

v3.0.0 plans

  • Migrate to TypeScript
  • Use Node.js 18
  • Bundle using tsup and publish only necessary files
  • Migrate jest to vitest for testing
  • Add options to transform the header and value
  • Rename getter functions (provinces() -> getProvinces(), etc)
  • Update the CI since the Node.js 16 is no longer supported
  • #46
  • #45
  • #52

Add dot separator in the `code` field

Add dot separator in the code field like the original data from PDF

Original Code (PDF) Code in Data
Province 11 11
Regency 11.01 1101
District 11.01.01 110101
Island 11.01.40001 110140001
Village 11.01.01.2001 1101012001

Translate the README into other language

Description

Translate the README into Bahasa Indonesia and other languages.

Guides

  • Save the translation files in docs folder and named it with README_{2 letter of language code}.md the language code must follows the ISO 639-1 code languages, e.g. README_id.md for Indonesian (Bahasa Indonesia).
  • Create new PR and fill the form by following the contribution guide. Make sure you reference this issue in your PR.
  • Translate the title into your language only. Remove the <i>Data Wilayah Indonesia</i>.
  • Make sure all links is working, especially link in TOC and link to other file in this repo.
    • The links in the table of content (TOC) also need to be translated to make it work. The link is a snake-case version of the header without any symbol.
    • Use relative paths for links that go to other files (see the following article).
  • DON'T translate blocks of code, unless there are comments that need to be translated.
  • DON'T translate the GitHub Alerts syntax ([!NOTE], [!IMPORTANT], and [!WARNING]).

For everyone who wants to contribute to this issue, please fork this repo, make changes, and create a new PR. When ready, ask me to review your work. I will not assign each person individually.

💡 Penambahan File SQL

Halo,

Sebelumnya terimakasih telah membuat projek yang sangat bagus seperti ini, sangat berguna sekali diprojekan saya.

Tapi disisi lain, menurut saya ada yang kurang diprojek ini, yaitu file SQL untuk programmer yang masih berkutat dibidang RDBMS seperti saya ini.

Dengan tersedianya file SQL, programmer tidak perlu repot-repot lagi untuk mengubah dari CSV ke SQL atau melakukan pembuatan table wilayah lalu import csvnya.

Apa mas @fityannugroho berkenan kalau saya open PR untuk menambahkan file SQL tersebut?

Terimakasih ☕️

[SUGGEST] Add island data

Is your feature request related to a problem? Please describe.

This package is currently not providing the islands data contained in REF-2022-1 (starts from page 3548 to 4038).

The island data consists of:

  • Island code, for example: 11.06.40007
    11.06 is the regency code, 4 is digit indicating it's an island, and 0007 is the serial number starts from 0001.

    But sometimes, the island does not belong to any regency. So that, the third and fourth digits will be zero (00). See 12.00.40001 Pulau Babi for the example.

  • Island name, for example: Pulau Bateeleblah

  • Island coordinate, for example: 05°47'34.72" U 094°58'26.09" T
    The coordinate is written in DMS (degree minute seconds) format. U stands for "Utara" or "North", and T stands for "Timur" or "East".

  • Island information, for example: TBP (PPKT)
    The information available includes:

    • BT: stands for "Berpenghuni" or "Populated".
    • TBP: stands for "Tidak Berpenghuni" or "Unpopulated".
    • PPKT: stands for "Pulau-Pulau Kecil Terluar" or "Outermost Small Islands" (see the definition).

Describe the solution you'd like

  1. Create islands.csv file that contains this column:

    • code for the island code without dot separation. For example: 110640007.
    • regency_code for relation to the regency data. For example: 1106. If the island does not belong to any regency, just leave the regency_code column empty (put , and go to the next column).
    • coordinate for the island coordinate with English term. For example: 05°47'34.72" N 094°58'26.09" E.
    • is_populated with value 1 if the island is populated (BT), or 0 if (TBP) and no available data.
    • is_outermost_small with value 1 if the island is The Outermost Small Islands (PPKT), or 0 if not.
    • name for the island name. For example: Pulau Bateeleblah.
  2. Create new function to get all island data.

  3. Create a tests suite to test the islands data.

Describe alternatives you've considered

None

Additional context

Especially for the development of this feature, please PR to feat/islands branch.

To adding the island data, you can ask ChatGPT help to formatting the data with this prompt:

I need you to sanitize and format this raw data.
First you must learn and analyze the pattern of this raw data and the result.

// raw data
11.09.40017 Pulau Babi 02°10'08.00" U 096°38'10.00" T
11.09.40018 Pulau Balok 02°28'58.49" U 096°23'11.95" T TBP
11.09.40019 Pulau Balubuk 02°53'52.51" U 095°50'14.15" BP
11.09.40020 Pulau Balung 02°40'13.00" U 096°07'58.00" T PPTK
11.09.40023 Pulau Batuberlayar Kecil 02°25'29.46" U 096°31'18.48" T BP (PPTK)
11.09.40024 Pulau Batuhek 02°21'37.72" U 096°12'13.66" T BP
11.09.40025 Pulau Benar 02°32'17.33" U 096°21'27.12" T TBP (PPTK)
// result
code,regency_code,coordinate,is_populated,is_outermost_small,name
110940017,1109,02°10'08.00" N 096°38'10.00" E,0,0,Pulau Babi
110940018,1109,02°28'58.49" N 096°23'11.95" E,0,0,Pulau Balok
110940019,1109,02°53'52.51" N 095°50'14.15" E,1,0,Pulau Balubuk
110940020,1109,02°40'13.00" N 096°07'58.00" E,0,1,Pulau Balung
110940023,1109,02°25'29.46" N 096°31'18.48" E,1,1,Pulau Batuberlayar Kecil
110940024,1109,02°21'37.72" N 096°12'13.66" E,1,0,Pulau Batuhek
110940025,1109,02°32'17.33" N 096°21'27.12" E,0,1,Pulau Benar

Hint for you:
- Value for is_populated: `1` if `BP` present, and `0` if not.
- Value for is_outermost_small, `1` if `PPKT` present, and `0` if not .
- `BP` not same with `TBP`.
- Just ignore the `TBP`.

DON'T RETURN ANY RESPONSE NOW! Just analyze the data.

Then you can start asking ChatGPT to formatting the real data in the next prompt.

Make sure you check the ChatGPT answer from wrong data, typo, etc.
Don't trust ChatGPT completely.

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.