Skip to main content

API for get all statistics data from BPS

Project description

STADATA

Introduction

The Indonesian Statistics provides statistical data for the Indonesian government and its citizens. To facilitate public access to the data generated by the Indonesian Statistics, an API has been created to access the data. This package simplifies the process for Python users to access the API using Python. With the existence of this package, it is hoped that the public will no longer need to visit the Indonesian Statistics website to download data.

Table of Contents

Installation

pip install stadata

Requirements

  • Written for Python 3.7+
  • Requires requests, html, pandas, tqdm

back to top

API

Setup Client

import stadata
client = stadata.Client('token')

back to top

API Methods

The following API methods are available:

back to top

List Domain

import stadata
client = stadata.Client('token')

client.list_domain()

List Static Table

import stadata
client = stadata.Client('token')

client.list_statictable(all=False, domain=[])
  • all

    • optional
    • Boolean
    • True: get all static table from all domain, False: get static table from spesific domain
  • domain

    • if all = True : optional else required
    • Array
    • List domain where static table from

List Dynamic Table

import stadata
client = stadata.Client('token')

client.list_dynamictable(all=False, domain=[])
  • all

    • optional
    • Boolean
    • True: get all dynamic table from all domain, False: get dynamic table from spesific domain
  • domain

    • if all = True : optional else required
    • Array
    • List domain where dynamic table from

View Static Table

import stadata
client = stadata.Client('token')

client.view_statictable(domain,table_id,lang='ind')
  • domain

    • required
    • string
    • domain id where static table from
  • table_id

    • required
    • string
    • table id from spesific static table that you want to see. Table id get be get from list static table
  • lang

    • optional, default : 'ind'
    • 'ind' or 'eng'
    • language to display static table

View Dynamic Table

import stadata
client = stadata.Client('token')

client.view_dynamictable(domain,var,th='')
  • domain

    • required
    • string
    • domain id where dynamic table from
  • var

    • required
    • string
    • variable id, get it from list dynamic table
  • th

    • optional, default : ''
    • string
    • period of dynamic table in year

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stadata-0.0.2.tar.gz (11.9 MB view hashes)

Uploaded Source

Built Distribution

stadata-0.0.2-py3-none-any.whl (12.1 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page