Skip to main content

Documentation Status


Manual to use Japan Air Pollutio ANalytics Package


SQL queries

Execute the following two SQL queries to create tables in a database.

Step 1: Create Station_info table

CREATE TABLE station_info(stationid integer not null, location geography(POINT,4326), address varchar,constraint Sid unique (stationID));

Step 2: Create table to store hourlyObservations

create table hourly_observations(stationID int not null, obsDate timestamp, SO2 double precision, no double precision, no2 double precision, nox double precision, co double precision, ox double precision, nmhc double precision, ch4 double precision, thc double precision, spm double precision, pm25 double precision, sp double precision, wd varchar, ws double precision, temp double precision, hum double precision, constraint SOH unique (stationID,obsDate));

Unzipping the data files

1.1. Old zip files

The programs in this directory are meant to store the SORAMAME air pollution data for the period 2018-01-01 to 2021-03-31.

  1. Create two temporary directories, say temp and tempBak.

    mkdir temp tempBak 
    #temp directory will store the data.
    #tempBak directory is used by the Python program. 
    
  2. Download all the zip files into the temp directory.

  3. Enter into the temp directory.

    cd temp
    
  4. Uncompress the zip files using the below provided shell script.

    vi uncompressZipFiles.sh
    
    #add the below provided code
    zipFiles=`ls ~/temp/*.zip`
    
    for eachZipFile in $zipFiles
    do
       unzip $eachZipFile
       rm $eachZipFile
    done
    
    subZipFiles=`ls ~/temp/*.zip`
    for eachZipfile in $subZipFiles
    do
           echo 'unzipping ' $eachZipfile
           unzip $eachZipfile
           rm -rf $eachZipfile
    done
    
  5. Execute the shell script.

    sh uncompressZipFiles.sh
    

    The above program will create the folders '01' to '47'. Each folder represents a Prefecture in Japan.

1.2. New zip files

The programs in this directory are meant to store the SORAMAME air pollution data generated from 2021-04-01~.

  1. Download the data.zip file from the soramame website.

  2. Move the file into the directory containing the file "insertDataFromZipFolderToDatabase.py"

    mv ~/Downloads/data.zip .
    
  3. Create a temporary directory, say temp, to store the unzip files.

    mkdir temp
    

Release files for japanAirAnalytics 2023.11.15.1

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

Source distribution (sdist)

Source distribution for japanAirAnalytics 2023.11.15.1
File Size Uploaded
japanAirAnalytics-2023.11.15.1.tar.gz 21.9 kB Details

Built distribution (wheel)

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

Total release size: 46.5 kB

Release files / japanAirAnalytics-2023.11.15.1.tar.gz

Download URL japanAirAnalytics-2023.11.15.1.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
104c5439f7eed2fe06c63a22828ed8db31f682fe644422f67743aa8dd2844ffb
BLAKE2b-256 checksum
How to use checksums
9552189082367191fe5a5a308b73c3e00fc230e38e4e037f07f8d99eb6c407d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / japanAirAnalytics-2023.11.15.1-py3-none-any.whl

Download URL japanAirAnalytics-2023.11.15.1-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ac19fe06212da55611204d8744ad72cf01d60b43541f2e01a6c8f65e5557508
BLAKE2b-256 checksum
How to use checksums
65fb442bb0c599cdd9e436439cc7db0b5328f99fc7d345f68e6ef0c0a61a0cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

2023.11.15.1 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