Catalog PyPI
PACKAGE EXPLORERView in registry

aecc

PyPI
airpollution
Versions collected1
Direct dependencies1From release 0.1.0
Last observed20 Oct, 20:09 UTC

README

Version 0.1.0 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.08 Mar 20231

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
danielmsk/aecc

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:fdad0fc0e710291bae08911a76dc691d7a3ac7257de8c2bb4a61296fe520ca8f