{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Tutorial 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import emipy as ep"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FacilityReportID</th>\n",
       "      <th>PollutantReleaseAndTransferReportID</th>\n",
       "      <th>FacilityID</th>\n",
       "      <th>NationalID</th>\n",
       "      <th>ParentCompanyName</th>\n",
       "      <th>FacilityName</th>\n",
       "      <th>StreetName</th>\n",
       "      <th>BuildingNumber</th>\n",
       "      <th>City</th>\n",
       "      <th>PostalCode</th>\n",
       "      <th>...</th>\n",
       "      <th>PollutantName</th>\n",
       "      <th>PollutantGroupCode</th>\n",
       "      <th>PollutantGroupName</th>\n",
       "      <th>PollutantCAS</th>\n",
       "      <th>MethodBasisCode</th>\n",
       "      <th>MethodBasisName</th>\n",
       "      <th>TotalQuantity</th>\n",
       "      <th>AccidentalQuantity</th>\n",
       "      <th>UnitCode</th>\n",
       "      <th>UnitName</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1856</td>\n",
       "      <td>1</td>\n",
       "      <td>5763</td>\n",
       "      <td>1013410312</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Werkstraße 1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Lenzing</td>\n",
       "      <td>4860</td>\n",
       "      <td>...</td>\n",
       "      <td>Particulate matter (PM10)</td>\n",
       "      <td>INORG</td>\n",
       "      <td>Inorganic substances</td>\n",
       "      <td>NaN</td>\n",
       "      <td>E</td>\n",
       "      <td>Estimated</td>\n",
       "      <td>68200.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>KGM</td>\n",
       "      <td>kilogram</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1856</td>\n",
       "      <td>1</td>\n",
       "      <td>5763</td>\n",
       "      <td>1013410312</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Werkstraße 1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Lenzing</td>\n",
       "      <td>4860</td>\n",
       "      <td>...</td>\n",
       "      <td>Sulphur oxides (SOx/SO2)</td>\n",
       "      <td>OTHGAS</td>\n",
       "      <td>Other gases</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>Measured</td>\n",
       "      <td>420000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>KGM</td>\n",
       "      <td>kilogram</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1856</td>\n",
       "      <td>1</td>\n",
       "      <td>5763</td>\n",
       "      <td>1013410312</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Werkstraße 1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Lenzing</td>\n",
       "      <td>4860</td>\n",
       "      <td>...</td>\n",
       "      <td>Carbon dioxide (CO2)</td>\n",
       "      <td>GRHGAS</td>\n",
       "      <td>Greenhouse gases</td>\n",
       "      <td>124-38-9</td>\n",
       "      <td>E</td>\n",
       "      <td>Estimated</td>\n",
       "      <td>182000000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>KGM</td>\n",
       "      <td>kilogram</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1856</td>\n",
       "      <td>1</td>\n",
       "      <td>5763</td>\n",
       "      <td>1013410312</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Werkstraße 1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Lenzing</td>\n",
       "      <td>4860</td>\n",
       "      <td>...</td>\n",
       "      <td>Nitrogen oxides (NOx/NO2)</td>\n",
       "      <td>OTHGAS</td>\n",
       "      <td>Other gases</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>Measured</td>\n",
       "      <td>818000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>KGM</td>\n",
       "      <td>kilogram</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1857</td>\n",
       "      <td>1</td>\n",
       "      <td>5764</td>\n",
       "      <td>1013410313</td>\n",
       "      <td>Lenzing AG</td>\n",
       "      <td>Wasserreinhalteverband Lenzing - Lenzing AG</td>\n",
       "      <td>Werkstraße 1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Lenzing</td>\n",
       "      <td>4860</td>\n",
       "      <td>...</td>\n",
       "      <td>Zinc and compounds (as Zn)</td>\n",
       "      <td>HEVMET</td>\n",
       "      <td>Heavy metals</td>\n",
       "      <td>NaN</td>\n",
       "      <td>M</td>\n",
       "      <td>Measured</td>\n",
       "      <td>3210.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>KGM</td>\n",
       "      <td>kilogram</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 73 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   FacilityReportID  PollutantReleaseAndTransferReportID  FacilityID  \\\n",
       "0              1856                                    1        5763   \n",
       "1              1856                                    1        5763   \n",
       "2              1856                                    1        5763   \n",
       "3              1856                                    1        5763   \n",
       "4              1857                                    1        5764   \n",
       "\n",
       "   NationalID ParentCompanyName                                 FacilityName  \\\n",
       "0  1013410312        Lenzing AG                                   Lenzing AG   \n",
       "1  1013410312        Lenzing AG                                   Lenzing AG   \n",
       "2  1013410312        Lenzing AG                                   Lenzing AG   \n",
       "3  1013410312        Lenzing AG                                   Lenzing AG   \n",
       "4  1013410313        Lenzing AG  Wasserreinhalteverband Lenzing - Lenzing AG   \n",
       "\n",
       "     StreetName BuildingNumber     City PostalCode  ...  \\\n",
       "0  Werkstraße 1            NaN  Lenzing       4860  ...   \n",
       "1  Werkstraße 1            NaN  Lenzing       4860  ...   \n",
       "2  Werkstraße 1            NaN  Lenzing       4860  ...   \n",
       "3  Werkstraße 1            NaN  Lenzing       4860  ...   \n",
       "4  Werkstraße 1            NaN  Lenzing       4860  ...   \n",
       "\n",
       "                PollutantName PollutantGroupCode    PollutantGroupName  \\\n",
       "0   Particulate matter (PM10)              INORG  Inorganic substances   \n",
       "1    Sulphur oxides (SOx/SO2)             OTHGAS           Other gases   \n",
       "2        Carbon dioxide (CO2)             GRHGAS      Greenhouse gases   \n",
       "3   Nitrogen oxides (NOx/NO2)             OTHGAS           Other gases   \n",
       "4  Zinc and compounds (as Zn)             HEVMET          Heavy metals   \n",
       "\n",
       "   PollutantCAS MethodBasisCode MethodBasisName TotalQuantity  \\\n",
       "0           NaN               E       Estimated       68200.0   \n",
       "1           NaN               M        Measured      420000.0   \n",
       "2      124-38-9               E       Estimated   182000000.0   \n",
       "3           NaN               M        Measured      818000.0   \n",
       "4           NaN               M        Measured        3210.0   \n",
       "\n",
       "  AccidentalQuantity UnitCode  UnitName  \n",
       "0                0.0      KGM  kilogram  \n",
       "1                0.0      KGM  kilogram  \n",
       "2                0.0      KGM  kilogram  \n",
       "3                0.0      KGM  kilogram  \n",
       "4                0.0      KGM  kilogram  \n",
       "\n",
       "[5 rows x 73 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "db = ep.read_db()\n",
    "\n",
    "db.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['FacilityReportID', 'PollutantReleaseAndTransferReportID', 'FacilityID',\n",
       "       'NationalID', 'ParentCompanyName', 'FacilityName', 'StreetName',\n",
       "       'BuildingNumber', 'City', 'PostalCode', 'CountryCode', 'CountryName',\n",
       "       'Lat', 'Long', 'RBDGeoCode', 'RBDGeoName', 'NUTSRegionGeoCode',\n",
       "       'NUTSRegionGeoName', 'RBDSourceCode', 'RBDSourceName',\n",
       "       'NUTSRegionSourceCode', 'NUTSRegionSourceName',\n",
       "       'NACEMainEconomicActivityCode', 'NACEMainEconomicActivityName',\n",
       "       'CompetentAuthorityName', 'CompetentAuthorityAddressStreetName',\n",
       "       'CompetentAuthorityAddressBuildingNumber',\n",
       "       'CompetentAuthorityAddressCity', 'CompetentAuthorityAddressPostalCode',\n",
       "       'CompetentAuthorityAddressCountryCode',\n",
       "       'CompetentAuthorityAddressCountryName',\n",
       "       'CompetentAuthorityTelephoneCommunication',\n",
       "       'CompetentAuthorityFaxCommunication',\n",
       "       'CompetentAuthorityEmailCommunication',\n",
       "       'CompetentAuthorityContactPersonName', 'ProductionVolumeProductName',\n",
       "       'ProductionVolumeQuantity', 'ProductionVolumeUnitCode',\n",
       "       'ProductionVolumeUnitName', 'TotalIPPCInstallationQuantity',\n",
       "       'OperatingHours', 'TotalEmployeeQuantity', 'WebsiteCommunication',\n",
       "       'PublicInformation', 'ConfidentialIndicator',\n",
       "       'ConfidentialityReasonCode', 'ConfidentialityReasonName',\n",
       "       'ProtectVoluntaryData', 'MainIASectorCode', 'MainIASectorName',\n",
       "       'MainIAActivityCode', 'MainIAActivityName', 'MainIASubActivityCode',\n",
       "       'MainIASubActivityName', 'ReportingYear', 'CoordinateSystemCode',\n",
       "       'CoordinateSystemName', 'CdrReleased', 'Published',\n",
       "       'PollutantReleaseID', 'ReleaseMediumCode', 'ReleaseMediumName',\n",
       "       'PollutantCode', 'PollutantName', 'PollutantGroupCode',\n",
       "       'PollutantGroupName', 'PollutantCAS', 'MethodBasisCode',\n",
       "       'MethodBasisName', 'TotalQuantity', 'AccidentalQuantity', 'UnitCode',\n",
       "       'UnitName'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "db.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Austria',\n",
       " 'Belgium',\n",
       " 'Cyprus',\n",
       " 'Czech Republic',\n",
       " 'Germany',\n",
       " 'Denmark',\n",
       " 'Estonia',\n",
       " 'Spain',\n",
       " 'Finland',\n",
       " 'France',\n",
       " 'Greece',\n",
       " 'Hungary',\n",
       " 'Ireland',\n",
       " 'Italy',\n",
       " 'Lithuania',\n",
       " 'Luxembourg',\n",
       " 'Latvia',\n",
       " 'Malta',\n",
       " 'Netherlands',\n",
       " 'Norway',\n",
       " 'Poland',\n",
       " 'Portugal',\n",
       " 'Sweden',\n",
       " 'Slovenia',\n",
       " 'Slovakia',\n",
       " 'United Kingdom',\n",
       " 'Iceland',\n",
       " 'Serbia',\n",
       " 'Romania',\n",
       " 'Bulgaria',\n",
       " 'Switzerland',\n",
       " 'Croatia']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ep.get_CountryList(db)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[2001, 2004, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ep.get_YearList(db)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Particulate matter (PM10)',\n",
       " 'Sulphur oxides (SOx/SO2)',\n",
       " 'Carbon dioxide (CO2)',\n",
       " 'Nitrogen oxides (NOx/NO2)',\n",
       " 'Zinc and compounds (as Zn)',\n",
       " 'Nickel and compounds (as Ni)',\n",
       " 'Chlorides (as total Cl)',\n",
       " 'Fluorides (as total F)',\n",
       " 'Total organic carbon (TOC) (as total C or COD/3)',\n",
       " 'Halogenated organic compounds (as AOX)',\n",
       " 'Non-methane volatile organic compounds (NMVOC)',\n",
       " 'Carbon monoxide (CO)',\n",
       " 'Ammonia (NH3)',\n",
       " 'Copper and compounds (as Cu)',\n",
       " 'Nitrous oxide (N2O)',\n",
       " 'Mercury and compounds (as Hg)',\n",
       " 'Total phosphorus',\n",
       " 'Methane (CH4)',\n",
       " 'Lead and compounds (as Pb)',\n",
       " 'Hydrogen cyanide (HCN)',\n",
       " 'Chlorine and inorganic compounds (as HCl)',\n",
       " 'Benzene',\n",
       " 'Cadmium and compounds (as Cd)',\n",
       " 'Total nitrogen',\n",
       " 'Cyanides (as total CN)',\n",
       " 'Chromium and compounds (as Cr)',\n",
       " '1,2-dichloroethane (DCE)',\n",
       " 'Phenols (as total C)',\n",
       " 'Arsenic and compounds (as As)',\n",
       " 'PCDD + PCDF (dioxins + furans) (as Teq)',\n",
       " 'Polycyclic Aromatic Hydrocarbons (PAH in EPER)',\n",
       " 'BTEX',\n",
       " 'Fluorine and inorganic compounds (as HF)',\n",
       " 'Dichloromethane (DCM)',\n",
       " 'Trichloroethylene',\n",
       " 'Tetrachloroethylene (PER)',\n",
       " 'Tetrachloromethane (TCM)',\n",
       " 'Hexachlorobenzene (HCB)',\n",
       " 'Hexachlorobutadiene (HCBD)',\n",
       " 'Trichloromethane',\n",
       " 'Hydro-fluorocarbons (HFCs)',\n",
       " 'Trichlorobenzenes (TCBs) (all isomers)',\n",
       " 'Sulphur hexafluoride (SF6)',\n",
       " 'Perfluorocarbons (PFCs)',\n",
       " '1,1,1-trichloroethane',\n",
       " '1,2,3,4,5,6-hexachlorocyclohexane (HCH)',\n",
       " 'Organotin compounds (as total Sn)',\n",
       " 'Chloro-alkanes, C10-C13',\n",
       " 'Polycyclic aromatic hydrocarbons (PAHs)',\n",
       " 'Di-(2-ethyl hexyl) phthalate (DEHP)',\n",
       " 'Hydrochlorofluorocarbons(HCFCs)',\n",
       " 'Chlorofluorocarbons (CFCs)',\n",
       " 'Polychlorinated biphenyls (PCBs)',\n",
       " 'Naphthalene',\n",
       " 'Carbon dioxide (CO2) excluding biomass',\n",
       " 'Atrazine',\n",
       " 'Vinyl chloride',\n",
       " 'Lindane',\n",
       " 'Fluoranthene',\n",
       " '1,1,2,2-tetrachloroethane',\n",
       " 'Nonylphenol and Nonylphenol ethoxylates (NP/NPEs)',\n",
       " 'Octylphenols and Octylphenol ethoxylates',\n",
       " 'Xylenes',\n",
       " 'Ethylene oxide',\n",
       " 'Tributyltin and compounds',\n",
       " 'Anthracene',\n",
       " 'Triphenyltin and compounds',\n",
       " 'Pentachlorobenzene',\n",
       " 'Toluene',\n",
       " 'Diuron',\n",
       " 'Asbestos',\n",
       " 'Pentachlorophenol (PCP)',\n",
       " 'Ethyl benzene',\n",
       " 'Halons',\n",
       " 'Simazine',\n",
       " 'Trifluralin',\n",
       " 'Chlorfenvinphos',\n",
       " 'Benzo(g,h,i)perylene',\n",
       " 'Aldrin',\n",
       " 'Isodrin',\n",
       " 'Dieldrin',\n",
       " 'Endrin',\n",
       " 'Isoproturon',\n",
       " 'Brominated diphenylethers (PBDE)',\n",
       " 'Chlorpyrifos',\n",
       " 'Endosulphan',\n",
       " 'Alachlor',\n",
       " 'Hexabromobiphenyl',\n",
       " 'DDT',\n",
       " 'Chlordecone',\n",
       " 'Toxaphene',\n",
       " 'Mirex',\n",
       " 'Heptachlor',\n",
       " 'Chlordane']"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ep.get_PollutantList(db)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>CountryCode</th>\n",
       "      <th>CountryName</th>\n",
       "      <th>Lat</th>\n",
       "      <th>Long</th>\n",
       "      <th>NUTSRegionGeoCode</th>\n",
       "      <th>NACEMainEconomicActivityCode</th>\n",
       "      <th>NACEMainEconomicActivityName</th>\n",
       "      <th>ReportingYear</th>\n",
       "      <th>PollutantReleaseID</th>\n",
       "      <th>PollutantName</th>\n",
       "      <th>TotalQuantity</th>\n",
       "      <th>UnitCode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3683</th>\n",
       "      <td>DE</td>\n",
       "      <td>Germany</td>\n",
       "      <td>54.805185</td>\n",
       "      <td>9.432377</td>\n",
       "      <td>DEF0</td>\n",
       "      <td>NACE_1.1:40.10</td>\n",
       "      <td>Production and distribution of electricity</td>\n",
       "      <td>2001</td>\n",
       "      <td>7341</td>\n",
       "      <td>Sulphur oxides (SOx/SO2)</td>\n",
       "      <td>582000.0</td>\n",
       "      <td>KGM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3684</th>\n",
       "      <td>DE</td>\n",
       "      <td>Germany</td>\n",
       "      <td>54.805185</td>\n",
       "      <td>9.432377</td>\n",
       "      <td>DEF0</td>\n",
       "      <td>NACE_1.1:40.10</td>\n",
       "      <td>Production and distribution of electricity</td>\n",
       "      <td>2001</td>\n",
       "      <td>7340</td>\n",
       "      <td>Nitrogen oxides (NOx/NO2)</td>\n",
       "      <td>378000.0</td>\n",
       "      <td>KGM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3685</th>\n",
       "      <td>DE</td>\n",
       "      <td>Germany</td>\n",
       "      <td>54.340605</td>\n",
       "      <td>10.178735</td>\n",
       "      <td>DEF0</td>\n",
       "      <td>NACE_1.1:40.30</td>\n",
       "      <td>Steam and hot water supply</td>\n",
       "      <td>2001</td>\n",
       "      <td>40850</td>\n",
       "      <td>Chlorine and inorganic compounds (as HCl)</td>\n",
       "      <td>41000.0</td>\n",
       "      <td>KGM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3686</th>\n",
       "      <td>DE</td>\n",
       "      <td>Germany</td>\n",
       "      <td>54.340605</td>\n",
       "      <td>10.178735</td>\n",
       "      <td>DEF0</td>\n",
       "      <td>NACE_1.1:40.30</td>\n",
       "      <td>Steam and hot water supply</td>\n",
       "      <td>2001</td>\n",
       "      <td>40852</td>\n",
       "      <td>Nitrogen oxides (NOx/NO2)</td>\n",
       "      <td>1500000.0</td>\n",
       "      <td>KGM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3687</th>\n",
       "      <td>DE</td>\n",
       "      <td>Germany</td>\n",
       "      <td>54.340605</td>\n",
       "      <td>10.178735</td>\n",
       "      <td>DEF0</td>\n",
       "      <td>NACE_1.1:40.30</td>\n",
       "      <td>Steam and hot water supply</td>\n",
       "      <td>2001</td>\n",
       "      <td>40853</td>\n",
       "      <td>Sulphur oxides (SOx/SO2)</td>\n",
       "      <td>960000.0</td>\n",
       "      <td>KGM</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     CountryCode CountryName        Lat       Long NUTSRegionGeoCode  \\\n",
       "3683          DE     Germany  54.805185   9.432377              DEF0   \n",
       "3684          DE     Germany  54.805185   9.432377              DEF0   \n",
       "3685          DE     Germany  54.340605  10.178735              DEF0   \n",
       "3686          DE     Germany  54.340605  10.178735              DEF0   \n",
       "3687          DE     Germany  54.340605  10.178735              DEF0   \n",
       "\n",
       "     NACEMainEconomicActivityCode                NACEMainEconomicActivityName  \\\n",
       "3683               NACE_1.1:40.10  Production and distribution of electricity   \n",
       "3684               NACE_1.1:40.10  Production and distribution of electricity   \n",
       "3685               NACE_1.1:40.30                  Steam and hot water supply   \n",
       "3686               NACE_1.1:40.30                  Steam and hot water supply   \n",
       "3687               NACE_1.1:40.30                  Steam and hot water supply   \n",
       "\n",
       "      ReportingYear  PollutantReleaseID  \\\n",
       "3683           2001                7341   \n",
       "3684           2001                7340   \n",
       "3685           2001               40850   \n",
       "3686           2001               40852   \n",
       "3687           2001               40853   \n",
       "\n",
       "                                  PollutantName  TotalQuantity UnitCode  \n",
       "3683                   Sulphur oxides (SOx/SO2)       582000.0      KGM  \n",
       "3684                  Nitrogen oxides (NOx/NO2)       378000.0      KGM  \n",
       "3685  Chlorine and inorganic compounds (as HCl)        41000.0      KGM  \n",
       "3686                  Nitrogen oxides (NOx/NO2)      1500000.0      KGM  \n",
       "3687                   Sulphur oxides (SOx/SO2)       960000.0      KGM  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1 = ep.f_db(db,CountryName='Germany')\n",
    "data1 = ep.row_reduction(data1)\n",
    "data1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "data2 = ep.f_db(db, CountryName=['Germany', 'Switzerand', 'Austria'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "CountryName = ['Germany', 'Austria', 'Switzerland']\n",
    "ReportingYear = [2014, 2015, 2016,2017]\n",
    "PollutantName = ['Carbon dioxide (CO2)', 'Methane (CH4)']\n",
    "\n",
    "data3 = ep.f_db(db, CountryName=CountryName, ReportingYear=ReportingYear, PollutantName=PollutantName)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "data4 = ep.f_db(db, ExclaveExclude=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "data5 = ep.f_db(db, CountryName='Germany', ReturnUnknown=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
