[![Documentation Status](https://readthedocs.org/projects/japan/badge/?version=latest)](https://japan.readthedocs.io/en/latest/?badge=latest)
***
[Manual to use Japan Air Pollutio ANalytics Package](https://japan.readthedocs.io/en/latest/)
***
# 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
Raw data
{
"_id": null,
"home_page": "https://github.com/UdayLab/japanAirAnalytics",
"name": "japanAirAnalytics",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "",
"author": "Rage Uday Kiran",
"author_email": "uday.rage@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/95/52/189082367191fe5a5a308b73c3e00fc230e38e4e037f07f8d99eb6c407d7/japanAirAnalytics-2023.11.15.1.tar.gz",
"platform": null,
"description": "[![Documentation Status](https://readthedocs.org/projects/japan/badge/?version=latest)](https://japan.readthedocs.io/en/latest/?badge=latest)\n\n***\n\n[Manual to use Japan Air Pollutio ANalytics Package](https://japan.readthedocs.io/en/latest/)\n\n***\n\n# SQL queries\n\n### Execute the following two SQL queries to create tables in a database.\n\n## Step 1: Create Station_info table\n\n CREATE TABLE station_info(stationid integer not null, location geography(POINT,4326), address varchar,constraint Sid unique (stationID));\n\n## Step 2: Create table to store hourlyObservations\n\n 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));\n\n\n***\n\n# Unzipping the data files\n\n### 1.1. Old zip files\n\nThe programs in this directory are meant to store the SORAMAME air pollution data for the period 2018-01-01 to 2021-03-31.\n\n\n1. Create two temporary directories, say _temp_ and _tempBak_.\n\n mkdir temp tempBak \n #temp directory will store the data.\n #tempBak directory is used by the Python program. \n2. Download all the zip files into the _temp_ directory.\n3. Enter into the _temp_ directory.\n \n cd temp\n\n4. Uncompress the zip files using the below provided shell script. \n\n vi uncompressZipFiles.sh\n \n #add the below provided code\n zipFiles=`ls ~/temp/*.zip`\n\n for eachZipFile in $zipFiles\n do\n unzip $eachZipFile\n rm $eachZipFile\n done\n \n subZipFiles=`ls ~/temp/*.zip`\n for eachZipfile in $subZipFiles\n do\n echo 'unzipping ' $eachZipfile\n unzip $eachZipfile\n rm -rf $eachZipfile\n done\n\n5. Execute the shell script. \n\n sh uncompressZipFiles.sh\n\n The above program will create the folders '01' to '47'. Each folder represents a Prefecture in Japan. \n\n\n### 1.2. New zip files\n\nThe programs in this directory are meant to store the SORAMAME air pollution data generated from 2021-04-01~.\n\n\n1. Download the data.zip file from the soramame website.\n2. Move the file into the directory containing the file \"insertDataFromZipFolderToDatabase.py\"\n\n mv ~/Downloads/data.zip .\n\n3. Create a temporary directory, say temp, to store the unzip files. \n \n mkdir temp\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "This software is being developed at the University of Aizu, Aizu-Wakamatsu, Fukushima, Japan",
"version": "2023.11.15.1",
"project_urls": {
"Homepage": "https://github.com/UdayLab/japanAirAnalytics"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "65fb442bb0c599cdd9e436439cc7db0b5328f99fc7d345f68e6ef0c0a61a0cda",
"md5": "9ed39e55ae2b2b12bf333b84d4e66821",
"sha256": "5ac19fe06212da55611204d8744ad72cf01d60b43541f2e01a6c8f65e5557508"
},
"downloads": -1,
"filename": "japanAirAnalytics-2023.11.15.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ed39e55ae2b2b12bf333b84d4e66821",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 24640,
"upload_time": "2023-11-15T09:09:30",
"upload_time_iso_8601": "2023-11-15T09:09:30.537503Z",
"url": "https://files.pythonhosted.org/packages/65/fb/442bb0c599cdd9e436439cc7db0b5328f99fc7d345f68e6ef0c0a61a0cda/japanAirAnalytics-2023.11.15.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9552189082367191fe5a5a308b73c3e00fc230e38e4e037f07f8d99eb6c407d7",
"md5": "d10a2c4feda6396032c406e9fb3692df",
"sha256": "104c5439f7eed2fe06c63a22828ed8db31f682fe644422f67743aa8dd2844ffb"
},
"downloads": -1,
"filename": "japanAirAnalytics-2023.11.15.1.tar.gz",
"has_sig": false,
"md5_digest": "d10a2c4feda6396032c406e9fb3692df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 21887,
"upload_time": "2023-11-15T09:09:32",
"upload_time_iso_8601": "2023-11-15T09:09:32.688875Z",
"url": "https://files.pythonhosted.org/packages/95/52/189082367191fe5a5a308b73c3e00fc230e38e4e037f07f8d99eb6c407d7/japanAirAnalytics-2023.11.15.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-15 09:09:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "UdayLab",
"github_project": "japanAirAnalytics",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "japanairanalytics"
}