Skip to main content

No project description provided

Project description

AECC

AECC is the air quality database maintained by SNU APCC.

Installation

To install aecc,

pip install https://github.com/danielmsk/snuair/dist/aecc-0.0.1-py3-none-any.whl
pip install aecc

Prerequisite

Getting Started

>>> import aecc
>>> aecc.download_key(file="~/user.key")
email: user@email.com
password: userpassword
>>> conn = aecc.connector()
>>> conn.all_regions
['','', '', '', '', ...
>>> conn.all_pollutants
['CO', '']
>>> conn.count_pollutants
{'CO': 323, 'NO': 25}
>>> r = conn.request(region="", from="2007-08-12", to="2020-09-15")
>>> r.download_to_file(path="data/raw.tsv", type="tsv")
>>> r.all_pollutants
['CO', '']
>>> r.count_pollutants
{'CO': 323, 'NO': 25}
>>> list1 = r.to_list()
>>> list1
[ 
	{datetime:"2007-08-12", region="CN", CO2=25.3, },
	{datetime:"2007-08-13", region="CN", CO2=25.3, },
]
>>> s1 = r.to_series()
>>> df1 = r.to_dataframe()

### upload data
>>> conn.dataupload(file="data/update.tsv", type="tsv")
>>> conn.close()

Sing-up and sign-in

Sign-up

>>> import aecc
>>> aecc.signup()
user email: user@email.com
user name: Tom
affiliation: snu
password: userpassword

Download token file

>>> aecc.download_token(file="~/user.aecctoken")
email: user@email.com
password: userpassword

Request Data

List Data

listing regions

>>> conn.all_regions
['','', '', '', '', ...

listing pollutants

>>> conn.all_regions
['','', '', '', '', ...

listing pmf results

>>> conn.list_pmf
['','', '', '', '', ...

Print statistics

>>> conn.stat
>>> conn.stat_regions
>>> r.stat

Download Data

>>> r.download_to_file(path="data/raw.csv", type="csv")
>>> r.download_to_file(path="data/raw.xlsx", type="xlsx")

Upload Data

This uploading data function is for the users that have permission to upload data. If you don't have permission to upload data, please contact the admin.

from file

When the excel file has two sheets, the sheet name should include 'conc_' or 'unc_'. 'conc_' means concentration and 'unc_' means uncertainty.

>>> conn.upload_from_file(file="data/raw_unc.tsv", filetype="raw", datatype="unc", region="GJ")
>>> conn.upload_from_file(file="data/raw_unc.tsv", filetype="raw", datatype="unc", region="GJ", update_force=True)
>>> conn.upload_from_file(file="data/raw_conc.tsv", filetype="raw", datatype="conc", region="GJ")
>>> conn.upload_from_file(file="data/raw.xlsx", filetype="raw")
>>> conn.upload_from_file(file="data/test_Constrained.xls", filetype="pmf", title="2019_Seoul")

Adminitstration

Version History

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

aecc-0.1.0.tar.gz (16.7 kB view hashes)

Uploaded Source

Built Distribution

aecc-0.1.0-py3-none-any.whl (16.8 kB 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