Skip to main content

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

Metadata

Release files for aecc 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aecc 0.1.0
File Size Uploaded
aecc-0.1.0.tar.gz 16.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aecc 0.1.0
File Interpreter ABI Platform
aecc-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.5 kB

Release files / aecc-0.1.0.tar.gz

Download URL aecc-0.1.0.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d5ff8b246d025f4841cba051fa82ebb94811b4f57652f2f637d975f5c52de45c
BLAKE2b-256 checksum
How to use checksums
7e1c74095d87059c8524ad689ef42ef09ce698812728f45cf3b4c55e71fcf0d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / aecc-0.1.0-py3-none-any.whl

Download URL aecc-0.1.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15e26f057c015be6558a7abc6adcb595f2844b55c0cfdc1fd8162c94ece623cc
BLAKE2b-256 checksum
How to use checksums
f8c95741ef73aff1fa5d284cc1ee48e468c9fedd57e5ca63a52024877da3164d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page