A small package for emission data analysis
emipy is a package for processing data of pollutant releases and pollutant transfers. It's main target is to enable a fast output of individual data set requests and to provide visualisation options.
The data are provided by the European Environment Agency.
The quickest installation is via the package manager pip:
pip install emipy
Inside the environment one can access the three modules rawdata/filter/plot and respective functions with:
from emipy import module_name module_name.function_name()
At first the data have to be prepared for data requests. Create a folder for your project, and add a folder "rawdata" inside of it. Then execute the following lines with 'path', the project folders path. (Remark: All backslashs have to be doubled)
rawdata.download_url('path') rawdata.pickle_rawdata('path') rawdata.merge_frompickle('path')
By now there is a data base with complete information which we can call by:
The output is a dataframe which is used as an input for further processing functions. A short example for a data request and visualisation:
db = filter.read_db('path') #loads data frame DE = filter.f_db(db, CountryName='Germany', PollutantName='Carbon dioxide (CO2)') #filter for Germany and CO2 plot.plot_PollutantVolume(DE) #Plots the CO2 release in Germany against the year
This package uses pandas and matplotlib.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.