GithubHelp home page GithubHelp logo

ans-4175 / download-c1 Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 44.73 MB

Project ini bertujuan untuk mengarsipkan dan menyalin Data Gambar C1 yang ada, apabila suatu waktu URL KPU tidak bisa diakses atau ada perubahan yang tidak diharapkan. Semua orang bisa mudah memiliki arsipnya sendiri-sendiri terdistribusi lokal.

License: MIT License

JavaScript 100.00%

download-c1's Introduction

Download C1

Table of Contents

  1. Overview
  2. Opportunities
  3. Getting Started
  4. Next Steps
  5. Contributing

Overview

Project ini bertujuan untuk mengarsipkan dan menyalin Data Gambar C1 yang ada, apabila suatu waktu URL KPU tidak bisa diakses atau ada perubahan yang tidak diharapkan. Semua orang bisa mudah memiliki arsipnya sendiri-sendiri terdistribusi lokal.

Opportunities

Adanya Data Gambar C1 ini bisa digunakan sebagai data pembanding untuk diolah lagi dengan verifikasi manual atau diperiksa ulang di sistem lain. Sedangkan untuk rekap dan scraper data angka dll-nya sendiri tersedia, seperti:

Getting Started

Sebagai awalan, sementara ini file yang penting ada di modul BatchDownloadTpsC1 logic utama projectnya. Idenya mengambil list TPS yang belum di-download dari modul GetIncompleteTps lalu diunduh ke lokal dan disimpan di Google Drive apabila diperlukan

Prerequisites

Beberapa hal yang perlu diperhatikan

  • Jalankan tar -xzf result.db.tar.gz untuk extract data
  • memastikan sudah ada result.db dari ekstrak result.db.tar.gz sebagai database sqlite lokal mapping tps dan bisa diakses untuk melihat kondisi data terakhir
  • memastikan ada folder image-c1 untuk menampung gambar unduhan
  • (opsional) apabila ingin disimpan di Google Drive dapat memanfaatkan GDrive API dengan otentikasi ./service-account.json credential ditaruh di root folder repo, serta sebuah GDrive folder sudah yang diberi hak akses untuk email credential key-nya

Installation

  1. Pastikan sudah melengkapi Prerequisites

  2. Copy .env.example ke .env dan sesuaikan dengan informasi yang dimiliki (opsional) Apabila akan memakai GDrive, isi Folder ID dari pola URL https://drive.google.com/drive/u/0/folders/{folder_id} saat membuka folder

  3. Melakukan instalasi

    npm install
    or
    yarn
  4. Sesuaikan di main.js Apabila ingin menjalankan secara sekali jalan, pilih count sekali batch, atau menjalankan secara kontinyu dengan node-cron

  5. Menjalankan aplikasi

    node main.js [--iterative] [--province-code string] [--kota-kabupaten-code string]

    Masing-masing flag memiliki fungsi seperti ini

    Options:
    --iterative                      Perform scraping from start to finish using pagination by incomplete tps.
                                     If not specified, the program will perform a singular batched download
                                     then exit
    --province-code [string]         Province code to scrape, if any
    --kota-kabupaten-code [string]   Kota kabupated code to scrape, if any
    -h, --help                       display help for command
    

    or

    node -e 'require("./src/runners/BatchDownloadTpsC1")(100)'
    
  6. Mengecek data gambar yang sudah diunduh di image-c1 atau di folder GDrive

  7. Melakukan reset data apabila dibutuhkan

       node -e 'require("./src/runners/ResetTpsDownload")()'

Next Steps

Project ini belum beres semuanya, diantaranya hal yang sudah terpikirkan

  • Batch continue tanpa berhenti menelusuri semua TPS null dengan backoff delay

  • Reset tanda sudah di-download untuk semua atau kode tertentu

  • Melakukan selektif fetch/batch berdasar kode Provinsi dan Kota

  • Melakukan selektif fetch/batch dengan membaca Data TPS KawalPemilu yang masih kosong untuk ditarik data C1-nya apabila sudah ada (berdasarkan kode area wilayah tps)

Contributing

Kontak @harippe atau @ans4175

download-c1's People

Contributors

aerios avatar ans-4175 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.