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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aecc-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file aecc-0.1.0.tar.gz.

File metadata

  • Download URL: aecc-0.1.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for aecc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5ff8b246d025f4841cba051fa82ebb94811b4f57652f2f637d975f5c52de45c
MD5 3c5f1d396ee2410c863aa21fed888b36
BLAKE2b-256 7e1c74095d87059c8524ad689ef42ef09ce698812728f45cf3b4c55e71fcf0d2

See more details on using hashes here.

File details

Details for the file aecc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aecc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for aecc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15e26f057c015be6558a7abc6adcb595f2844b55c0cfdc1fd8162c94ece623cc
MD5 6512bbe504196aaec09f1d7f631568a1
BLAKE2b-256 f8c95741ef73aff1fa5d284cc1ee48e468c9fedd57e5ca63a52024877da3164d

See more details on using hashes here.

Supported by

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