Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

codeforthailand/datasource-air4thai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package for Air4Thai's API

DISCLAIMER: This is an unofficial package. It's just a wrapper for the actual API.

This Python package provides a convenient way to retrieve data Air4Thai's history data API.

Installation

pip install code4th-datasource-air4thai

Usage

from code4th.datasources import Air4Thai

df = Air4Thai.fetch(
    stations=['03t', '05t'],
    measurements=['O3', 'CO', 'NO2', 'PM25'],
    sdate='2019-01-01',
    edate='2019-02-03',
    verbose=True
)

Please visit DATA-DICTIONARY.md for available values of stations and measurements

Tutorial

Currently, there is a tutorial on how to use the package to retrieve Air4Thai's historical data. The tutorial also includes simple time series analysis that one can do with the data, such as seasonal decomposing or forecasting models. Feel free to check it out at ./examples/tutorial.ipynb.

Relevant Projects

Contributions

Any feedback, suggestions, or pull-requests are more than welcome.