japanAirAnalytics.store package

Submodules

japanAirAnalytics.store.config module

japanAirAnalytics.store.config.config(filename='database.ini', section='postgresql')[source]

japanAirAnalytics.store.newHourlyDataFormat module

japanAirAnalytics.store.oldHourlyDataFormat module

japanAirAnalytics.store.stationInfo module

japanAirAnalytics.store.unZipAirPollution module

japanAirAnalytics.store.unZipAirPollution.getFolder(zipFolder, outputLocation)[source]
Description:

This function takes an input zip file (zipFolder) and unzips its contents into the specified output directory (outputLocation). It returns the path to the unzipped folder.

Parameters:
  • zipFolder – str : Input zip file containing data.

  • outputLocation – str : Directory to store the unzipped files.

Returns:

str Returns the path to the unzipped folder.

Executing on terminal

Format:
>>>  python3 getFolder.py <zipFolder> <outputLocation>
Example:
>>>  python3 getFolder.py 'data.zip' 'temp_data'

Note

Specify the name of the database in database.ini file

Importing data files into a python program

from japanAirAnalytics.store import getFolder as db

obj = db(zipFolder, outputLocation)

Module contents