diff --git a/checksums.txt b/checksums.txt index 165d5b4..98412eb 100644 --- a/checksums.txt +++ b/checksums.txt @@ -1,4 +1,4 @@ -national_generation_capacity.xlsx,98d39a331e8bd330a119af95c07c6309cdb2fc3746a292cab5bc98de8ef950e9 -national_generation_capacity_stacked.csv,9dc97fede98bff606610cbab41f68871bcad73621ee65733a25db19acead7b6f -national_generation_capacity_stacked.xlsx,1c690e601c8f9318257e171e5f719f37257cf0ec31a0e3d91614be4949570af0 -national_generation_capacity.sqlite,89f8024d57a719b8f83ec04a172cca0e17709856029a703173bc85535ea857c4 +national_generation_capacity.xlsx,eaef1236b93c9ee1458cc995f74aed6346911a36aa964aec8597c45b2809d068 +national_generation_capacity_stacked.csv,b8aa71c64711e4586f51586a248e38e031c9a82dcfaf4b77401c1366944f9a14 +national_generation_capacity_stacked.xlsx,4b15daae348cf3fc9ae51d6cd1f5f0d5842f9d132d66ba96925b0fa386bb3e64 +national_generation_capacity.sqlite,5cd9b688f709ec4244e479898d1c215be30f725397d975382c17ad809c3e5abf diff --git a/processing.ipynb b/processing.ipynb index c255744..9d59d03 100644 --- a/processing.ipynb +++ b/processing.ipynb @@ -90,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -132,7 +132,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -148,7 +148,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -186,7 +186,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -293,9 +293,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "05 Apr 2019 17:09:39 - root - INFO - Using local file from download\\2019-4-5-nrg_113a.tsv.gz\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "download\\2019-4-5-nrg_113a.tsv.gz\n" + ] + } + ], "source": [ "# Data source for EUROSTAT data\n", "# http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&downfile=data%2Fnrg_113a.tsv.gz\n", @@ -310,7 +325,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -356,9 +371,171 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "05 Apr 2019 17:09:39 - root - INFO - Using local file from download\\2019-4-5-Statistics.xls\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countryyearhydroof which storageof which run of riverof which pumped storagenuclearrenewableof which windof which solarof which biomassfossil_fuelsotherrepresentativity
0AT201012665.07205.05241.00.001031.01002.00.00.07389.00.0100.0
1AT201113200.00.00.00.001542.01056.055.00.07818.068.0100.0
2AT201213350.00.00.00.001906.01307.0172.0427.07834.074.0100.0
3AT201313427.00.00.00.002305.01555.0324.0426.07847.0244.0100.0
4AT201413569.00.00.00.003413.02110.0589.0512.07243.00.0100.0
\n", + "
" + ], + "text/plain": [ + " country year hydro of which storage of which run of river \\\n", + "0 AT 2010 12665.0 7205.0 5241.0 \n", + "1 AT 2011 13200.0 0.0 0.0 \n", + "2 AT 2012 13350.0 0.0 0.0 \n", + "3 AT 2013 13427.0 0.0 0.0 \n", + "4 AT 2014 13569.0 0.0 0.0 \n", + "\n", + " of which pumped storage nuclear renewable of which wind of which solar \\\n", + "0 0.0 0 1031.0 1002.0 0.0 \n", + "1 0.0 0 1542.0 1056.0 55.0 \n", + "2 0.0 0 1906.0 1307.0 172.0 \n", + "3 0.0 0 2305.0 1555.0 324.0 \n", + "4 0.0 0 3413.0 2110.0 589.0 \n", + "\n", + " of which biomass fossil_fuels other representativity \n", + "0 0.0 7389.0 0.0 100.0 \n", + "1 0.0 7818.0 68.0 100.0 \n", + "2 427.0 7834.0 74.0 100.0 \n", + "3 426.0 7847.0 244.0 100.0 \n", + "4 512.0 7243.0 0.0 100.0 " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Data source for ENTSO-E capacity data\n", "# https://docstore.entsoe.eu/Documents/Publications/Statistics/NGC_2010-2015.xlsx\n", @@ -389,9 +566,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "05 Apr 2019 17:09:39 - root - INFO - Using local file from download\\2019-4-5-SO_AF_2011_-_2025_.zip\n", + "05 Apr 2019 17:09:42 - root - INFO - Using local file from download\\2019-4-5-120705_SOAF_2012_Dataset.zip\n", + "05 Apr 2019 17:09:44 - root - INFO - Using local file from download\\2019-4-5-130403_SOAF_2013-2030_dataset.zip\n", + "05 Apr 2019 17:09:47 - root - INFO - Using local file from download\\2019-4-5-140602_SOAF%202014_dataset.zip\n", + "05 Apr 2019 17:09:52 - root - INFO - Using local file from download\\2019-4-5-SO_AF_2015_dataset.zip\n" + ] + } + ], "source": [ "url_entsoe_soaf2015 = (\n", " 'https://www.entsoe.eu/Documents/Publications/SDC/data/SO_AF_2015_dataset.zip')\n", @@ -494,9 +683,115 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
201120122013201420152016
country
Adequacy Reference MarginALNaNNaNNaNNaNNaN0.117
AT1.32.31.92.62.70.844868
BA0.30.30.30.30.30.19
BE1.811.941.932.341.01675
BG1.21.21.311.311.381.413
\n", + "
" + ], + "text/plain": [ + " 2011 2012 2013 2014 2015 2016\n", + " country \n", + "Adequacy Reference Margin AL NaN NaN NaN NaN NaN 0.117\n", + " AT 1.3 2.3 1.9 2.6 2.7 0.844868\n", + " BA 0.3 0.3 0.3 0.3 0.3 0.19\n", + " BE 1.8 1 1.94 1.93 2.34 1.01675\n", + " BG 1.2 1.2 1.31 1.31 1.38 1.413" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_soaf = pd.concat([data_soaf_2011,data_soaf_2012,data_soaf_2013,data_soaf_2014,data_soaf_2015], axis=1)\n", "data_soaf.head()" @@ -532,9 +827,127 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
technologysourcesource_typeyeartypecountrycapacity_definitioncapacitycomment
0Fossil fuelsAgencija za energijoMinistry2013Installed capacity in MWSINet capacity1240.00NaN
1Fossil fuelsAgencija za energijoMinistry2014Installed capacity in MWSINet capacity1766.00NaN
2Fossil fuelsAgencija za energijoMinistry2015Installed capacity in MWSINet capacity1442.97NaN
3Fossil fuelsAnreRegulatory Authority2013Installed capacity in MWROUnknown12079.00NaN
4Fossil fuelsAnreRegulatory Authority2014Installed capacity in MWROUnknown12102.00NaN
\n", + "
" + ], + "text/plain": [ + " technology source source_type year \\\n", + "0 Fossil fuels Agencija za energijo Ministry 2013 \n", + "1 Fossil fuels Agencija za energijo Ministry 2014 \n", + "2 Fossil fuels Agencija za energijo Ministry 2015 \n", + "3 Fossil fuels Anre Regulatory Authority 2013 \n", + "4 Fossil fuels Anre Regulatory Authority 2014 \n", + "\n", + " type country capacity_definition capacity comment \n", + "0 Installed capacity in MW SI Net capacity 1240.00 NaN \n", + "1 Installed capacity in MW SI Net capacity 1766.00 NaN \n", + "2 Installed capacity in MW SI Net capacity 1442.97 NaN \n", + "3 Installed capacity in MW RO Unknown 12079.00 NaN \n", + "4 Installed capacity in MW RO Unknown 12102.00 NaN " + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Reshape dataframe to list\n", "data_opsd = pd.DataFrame(data_raw.stack(level=['source', 'source_type', 'year',\n", @@ -588,9 +1001,127 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
unitproductindic_nrggeo\\timesourcesource_typetypeyearvalue
0MW900712_1176011ALEUROSTATStatistical OfficeInstalled capacity in MW201698
1MW900712_1176011ATEUROSTATStatistical OfficeInstalled capacity in MW20165561
2MW900712_1176011BAEUROSTATStatistical OfficeInstalled capacity in MW20162065
3MW900712_1176011BEEUROSTATStatistical OfficeInstalled capacity in MW20167182
4MW900712_1176011BGEUROSTATStatistical OfficeInstalled capacity in MW20163635
\n", + "
" + ], + "text/plain": [ + " unit product indic_nrg geo\\time source source_type \\\n", + "0 MW 9007 12_1176011 AL EUROSTAT Statistical Office \n", + "1 MW 9007 12_1176011 AT EUROSTAT Statistical Office \n", + "2 MW 9007 12_1176011 BA EUROSTAT Statistical Office \n", + "3 MW 9007 12_1176011 BE EUROSTAT Statistical Office \n", + "4 MW 9007 12_1176011 BG EUROSTAT Statistical Office \n", + "\n", + " type year value \n", + "0 Installed capacity in MW 2016 98 \n", + "1 Installed capacity in MW 2016 5561 \n", + "2 Installed capacity in MW 2016 2065 \n", + "3 Installed capacity in MW 2016 7182 \n", + "4 Installed capacity in MW 2016 3635 " + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat = pd.melt(data_eurostat, id_vars=['unit', 'product',\n", " 'indic_nrg', 'geo\\\\time',\n", @@ -660,7 +1191,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -678,9 +1209,158 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
unitproductindic_nrggeo\\timesourcesource_typetypeyearvalueindicdescriptionenergy sourcecomment
0MW900712_1176011ALEUROSTATStatistical OfficeInstalled capacity in MW201698.012_1176011Electrical capacity, main activity producers -...Fossil fuels
1MW900712_1176011ATEUROSTATStatistical OfficeInstalled capacity in MW20165561.012_1176011Electrical capacity, main activity producers -...Fossil fuels
2MW900712_1176011BAEUROSTATStatistical OfficeInstalled capacity in MW20162065.012_1176011Electrical capacity, main activity producers -...Fossil fuels
3MW900712_1176011BEEUROSTATStatistical OfficeInstalled capacity in MW20167182.012_1176011Electrical capacity, main activity producers -...Fossil fuels
4MW900712_1176011BGEUROSTATStatistical OfficeInstalled capacity in MW20163635.012_1176011Electrical capacity, main activity producers -...Fossil fuels
\n", + "
" + ], + "text/plain": [ + " unit product indic_nrg geo\\time source source_type \\\n", + "0 MW 9007 12_1176011 AL EUROSTAT Statistical Office \n", + "1 MW 9007 12_1176011 AT EUROSTAT Statistical Office \n", + "2 MW 9007 12_1176011 BA EUROSTAT Statistical Office \n", + "3 MW 9007 12_1176011 BE EUROSTAT Statistical Office \n", + "4 MW 9007 12_1176011 BG EUROSTAT Statistical Office \n", + "\n", + " type year value indic \\\n", + "0 Installed capacity in MW 2016 98.0 12_1176011 \n", + "1 Installed capacity in MW 2016 5561.0 12_1176011 \n", + "2 Installed capacity in MW 2016 2065.0 12_1176011 \n", + "3 Installed capacity in MW 2016 7182.0 12_1176011 \n", + "4 Installed capacity in MW 2016 3635.0 12_1176011 \n", + "\n", + " description energy source comment \n", + "0 Electrical capacity, main activity producers -... Fossil fuels \n", + "1 Electrical capacity, main activity producers -... Fossil fuels \n", + "2 Electrical capacity, main activity producers -... Fossil fuels \n", + "3 Electrical capacity, main activity producers -... Fossil fuels \n", + "4 Electrical capacity, main activity producers -... Fossil fuels " + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat = data_eurostat[data_eurostat['energy source'].isnull() == False]\n", "\n", @@ -716,9 +1396,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countrysourcesource_typetypeyearcapacitytechnologycomment
0ALEUROSTATStatistical OfficeInstalled capacity in MW201698.0Fossil fuels
1ATEUROSTATStatistical OfficeInstalled capacity in MW20165561.0Fossil fuels
2BAEUROSTATStatistical OfficeInstalled capacity in MW20162065.0Fossil fuels
3BEEUROSTATStatistical OfficeInstalled capacity in MW20167182.0Fossil fuels
4BGEUROSTATStatistical OfficeInstalled capacity in MW20163635.0Fossil fuels
\n", + "
" + ], + "text/plain": [ + " country source source_type type year \\\n", + "0 AL EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "1 AT EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "2 BA EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "3 BE EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "4 BG EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "\n", + " capacity technology comment \n", + "0 98.0 Fossil fuels \n", + "1 5561.0 Fossil fuels \n", + "2 2065.0 Fossil fuels \n", + "3 7182.0 Fossil fuels \n", + "4 3635.0 Fossil fuels " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat = data_eurostat.drop(['unit', 'product', 'indic_nrg',\n", " 'indic', 'description'], axis=1)\n", @@ -732,9 +1524,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countrysourcesource_typetypeyearcapacitytechnologycomment
0ALEUROSTATStatistical OfficeInstalled capacity in MW201698.0Fossil fuels
1ATEUROSTATStatistical OfficeInstalled capacity in MW20165561.0Fossil fuels
2BAEUROSTATStatistical OfficeInstalled capacity in MW20162065.0Fossil fuels
3BEEUROSTATStatistical OfficeInstalled capacity in MW20167182.0Fossil fuels
4BGEUROSTATStatistical OfficeInstalled capacity in MW20163635.0Fossil fuels
\n", + "
" + ], + "text/plain": [ + " country source source_type type year \\\n", + "0 AL EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "1 AT EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "2 BA EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "3 BE EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "4 BG EUROSTAT Statistical Office Installed capacity in MW 2016 \n", + "\n", + " capacity technology comment \n", + "0 98.0 Fossil fuels \n", + "1 5561.0 Fossil fuels \n", + "2 2065.0 Fossil fuels \n", + "3 7182.0 Fossil fuels \n", + "4 3635.0 Fossil fuels " + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat['country'] = data_eurostat['country'].replace('UK', 'GB')\n", "data_eurostat['country'] = data_eurostat['country'].replace('EL', 'GR')\n", @@ -752,9 +1656,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
technologysourcesource_typeyeartypecountrycapacitycomment
0Biomass and biogasEUROSTATStatistical Office1990Installed capacity in MWAL0.0
1Biomass and biogasEUROSTATStatistical Office1990Installed capacity in MWAT0.0
2Biomass and biogasEUROSTATStatistical Office1990Installed capacity in MWBA0.0
3Biomass and biogasEUROSTATStatistical Office1990Installed capacity in MWBE1.0
4Biomass and biogasEUROSTATStatistical Office1990Installed capacity in MWBG0.0
\n", + "
" + ], + "text/plain": [ + " technology source source_type year \\\n", + "0 Biomass and biogas EUROSTAT Statistical Office 1990 \n", + "1 Biomass and biogas EUROSTAT Statistical Office 1990 \n", + "2 Biomass and biogas EUROSTAT Statistical Office 1990 \n", + "3 Biomass and biogas EUROSTAT Statistical Office 1990 \n", + "4 Biomass and biogas EUROSTAT Statistical Office 1990 \n", + "\n", + " type country capacity comment \n", + "0 Installed capacity in MW AL 0.0 \n", + "1 Installed capacity in MW AT 0.0 \n", + "2 Installed capacity in MW BA 0.0 \n", + "3 Installed capacity in MW BE 1.0 \n", + "4 Installed capacity in MW BG 0.0 " + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat = pd.DataFrame(data_eurostat.groupby(['technology', 'source',\n", " 'source_type', 'year',\n", @@ -792,7 +1808,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -904,7 +1920,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -952,7 +1968,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -993,9 +2009,127 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
capacitycommentcountrysourcesource_typetechnologytypeyearcapacity_definition
00.0ALEUROSTATStatistical OfficeBiomass and biogasInstalled capacity in MW1990Unknown
10.0ATEUROSTATStatistical OfficeBiomass and biogasInstalled capacity in MW1990Unknown
20.0BAEUROSTATStatistical OfficeBiomass and biogasInstalled capacity in MW1990Unknown
31.0BEEUROSTATStatistical OfficeBiomass and biogasInstalled capacity in MW1990Unknown
40.0BGEUROSTATStatistical OfficeBiomass and biogasInstalled capacity in MW1990Unknown
\n", + "
" + ], + "text/plain": [ + " capacity comment country source source_type technology \\\n", + "0 0.0 AL EUROSTAT Statistical Office Biomass and biogas \n", + "1 0.0 AT EUROSTAT Statistical Office Biomass and biogas \n", + "2 0.0 BA EUROSTAT Statistical Office Biomass and biogas \n", + "3 1.0 BE EUROSTAT Statistical Office Biomass and biogas \n", + "4 0.0 BG EUROSTAT Statistical Office Biomass and biogas \n", + "\n", + " type year capacity_definition \n", + "0 Installed capacity in MW 1990 Unknown \n", + "1 Installed capacity in MW 1990 Unknown \n", + "2 Installed capacity in MW 1990 Unknown \n", + "3 Installed capacity in MW 1990 Unknown \n", + "4 Installed capacity in MW 1990 Unknown " + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_eurostat['source'] = 'EUROSTAT'\n", "data_eurostat['source_type'] = 'Statistical Office'\n", @@ -1021,11 +2155,123 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countryyeartechnologycapacitysourcesource_typecapacity_definitiontype
0AT2010fossil_fuels7389.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
1AT2010hydro12665.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
2AT2010nuclear0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
3AT2010of which biomass0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
4AT2010of which pumped storage0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
\n", + "
" + ], + "text/plain": [ + " country year technology capacity source \\\n", + "0 AT 2010 fossil_fuels 7389.0 entsoe Statistics \n", + "1 AT 2010 hydro 12665.0 entsoe Statistics \n", + "2 AT 2010 nuclear 0.0 entsoe Statistics \n", + "3 AT 2010 of which biomass 0.0 entsoe Statistics \n", + "4 AT 2010 of which pumped storage 0.0 entsoe Statistics \n", + "\n", + " source_type capacity_definition type \n", + "0 Other association Net capacity Installed capacity in MW \n", + "1 Other association Net capacity Installed capacity in MW \n", + "2 Other association Net capacity Installed capacity in MW \n", + "3 Other association Net capacity Installed capacity in MW \n", + "4 Other association Net capacity Installed capacity in MW " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_entsoe = pd.melt(data_entsoe_raw,\n", " id_vars=['country', 'year', 'representativity'],\n", @@ -1066,9 +2312,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countryyeartechnologycapacitysourcesource_typecapacity_definitiontype
0AT2010Fossil fuels7389.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
1AT2010Hydro12665.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
2AT2010Nuclear0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
3AT2010Biomass and biogas0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
4AT2010Pumped storage0.0entsoe StatisticsOther associationNet capacityInstalled capacity in MW
\n", + "
" + ], + "text/plain": [ + " country year technology capacity source \\\n", + "0 AT 2010 Fossil fuels 7389.0 entsoe Statistics \n", + "1 AT 2010 Hydro 12665.0 entsoe Statistics \n", + "2 AT 2010 Nuclear 0.0 entsoe Statistics \n", + "3 AT 2010 Biomass and biogas 0.0 entsoe Statistics \n", + "4 AT 2010 Pumped storage 0.0 entsoe Statistics \n", + "\n", + " source_type capacity_definition type \n", + "0 Other association Net capacity Installed capacity in MW \n", + "1 Other association Net capacity Installed capacity in MW \n", + "2 Other association Net capacity Installed capacity in MW \n", + "3 Other association Net capacity Installed capacity in MW \n", + "4 Other association Net capacity Installed capacity in MW " + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "dict_energy_source = {'hydro': 'Hydro',\n", " 'of which storage': 'Reservoir',\n", @@ -1106,9 +2464,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Skipping combination: CH 2015\n" + ] + } + ], "source": [ "country_list = data_entsoe.country.unique()\n", "year_list = data_entsoe.year.unique()\n", @@ -1221,9 +2587,128 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Skipping combination: CH 2015\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
capacitycapacity_definitioncountrysourcesource_typetechnologytypeyear
07389.0Net capacityATentsoe StatisticsOther associationFossil fuelsInstalled capacity in MW2010
112665.0Net capacityATentsoe StatisticsOther associationHydroInstalled capacity in MW2010
20.0Net capacityATentsoe StatisticsOther associationNuclearInstalled capacity in MW2010
30.0Net capacityATentsoe StatisticsOther associationBiomass and biogasInstalled capacity in MW2010
40.0Net capacityATentsoe StatisticsOther associationPumped storageInstalled capacity in MW2010
\n", + "
" + ], + "text/plain": [ + " capacity capacity_definition country source source_type \\\n", + "0 7389.0 Net capacity AT entsoe Statistics Other association \n", + "1 12665.0 Net capacity AT entsoe Statistics Other association \n", + "2 0.0 Net capacity AT entsoe Statistics Other association \n", + "3 0.0 Net capacity AT entsoe Statistics Other association \n", + "4 0.0 Net capacity AT entsoe Statistics Other association \n", + "\n", + " technology type year \n", + "0 Fossil fuels Installed capacity in MW 2010 \n", + "1 Hydro Installed capacity in MW 2010 \n", + "2 Nuclear Installed capacity in MW 2010 \n", + "3 Biomass and biogas Installed capacity in MW 2010 \n", + "4 Pumped storage Installed capacity in MW 2010 " + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "table_to_append = pd.DataFrame(columns=col_list)\n", "table_to_append['year'] = table_to_append['year'].astype(int)\n", @@ -1269,9 +2754,128 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Skipping combination: CH 2015\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
capacitycapacity_definitioncountrysourcesource_typetechnologytypeyear
07389.0Net capacityATentsoe StatisticsOther associationFossil fuelsInstalled capacity in MW2010
112665.0Net capacityATentsoe StatisticsOther associationHydroInstalled capacity in MW2010
20.0Net capacityATentsoe StatisticsOther associationNuclearInstalled capacity in MW2010
30.0Net capacityATentsoe StatisticsOther associationBiomass and biogasInstalled capacity in MW2010
40.0Net capacityATentsoe StatisticsOther associationPumped storageInstalled capacity in MW2010
\n", + "
" + ], + "text/plain": [ + " capacity capacity_definition country source source_type \\\n", + "0 7389.0 Net capacity AT entsoe Statistics Other association \n", + "1 12665.0 Net capacity AT entsoe Statistics Other association \n", + "2 0.0 Net capacity AT entsoe Statistics Other association \n", + "3 0.0 Net capacity AT entsoe Statistics Other association \n", + "4 0.0 Net capacity AT entsoe Statistics Other association \n", + "\n", + " technology type year \n", + "0 Fossil fuels Installed capacity in MW 2010 \n", + "1 Hydro Installed capacity in MW 2010 \n", + "2 Nuclear Installed capacity in MW 2010 \n", + "3 Biomass and biogas Installed capacity in MW 2010 \n", + "4 Pumped storage Installed capacity in MW 2010 " + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "table_to_append = pd.DataFrame(columns=['country', 'year', 'technology', 'capacity'])\n", "table_to_append['year'] = table_to_append['year'].astype(int)\n", @@ -1318,9 +2922,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
capacitycapacity_definitioncountrysourcesource_typetechnologytypeyear
07389.0Net capacityATentsoe StatisticsOther associationFossil fuelsInstalled capacity in MW2010
112665.0Net capacityATentsoe StatisticsOther associationHydroInstalled capacity in MW2010
20.0Net capacityATentsoe StatisticsOther associationNuclearInstalled capacity in MW2010
30.0Net capacityATentsoe StatisticsOther associationBiomass and biogasInstalled capacity in MW2010
40.0Net capacityATentsoe StatisticsOther associationPumped storageInstalled capacity in MW2010
\n", + "
" + ], + "text/plain": [ + " capacity capacity_definition country source source_type \\\n", + "0 7389.0 Net capacity AT entsoe Statistics Other association \n", + "1 12665.0 Net capacity AT entsoe Statistics Other association \n", + "2 0.0 Net capacity AT entsoe Statistics Other association \n", + "3 0.0 Net capacity AT entsoe Statistics Other association \n", + "4 0.0 Net capacity AT entsoe Statistics Other association \n", + "\n", + " technology type year \n", + "0 Fossil fuels Installed capacity in MW 2010 \n", + "1 Hydro Installed capacity in MW 2010 \n", + "2 Nuclear Installed capacity in MW 2010 \n", + "3 Biomass and biogas Installed capacity in MW 2010 \n", + "4 Pumped storage Installed capacity in MW 2010 " + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_entsoe['source'] = 'entsoe Statistics'\n", "data_entsoe['source_type'] = 'Other association'\n", @@ -1346,9 +3062,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countryyeartechnologycapacitysourcesource_typecapacity_definitiontype
0AL2011Adequacy Reference Margin0entsoe SOAFOther associationNet capacityInstalled capacity in MW
1AL2011Biomass0entsoe SOAFOther associationNet capacityInstalled capacity in MW
2AL2011Export Capacity0entsoe SOAFOther associationNet capacityInstalled capacity in MW
3AL2011Fossil Fuels0entsoe SOAFOther associationNet capacityInstalled capacity in MW
4AL2011Gas0entsoe SOAFOther associationNet capacityInstalled capacity in MW
\n", + "
" + ], + "text/plain": [ + " country year technology capacity source \\\n", + "0 AL 2011 Adequacy Reference Margin 0 entsoe SOAF \n", + "1 AL 2011 Biomass 0 entsoe SOAF \n", + "2 AL 2011 Export Capacity 0 entsoe SOAF \n", + "3 AL 2011 Fossil Fuels 0 entsoe SOAF \n", + "4 AL 2011 Gas 0 entsoe SOAF \n", + "\n", + " source_type capacity_definition type \n", + "0 Other association Net capacity Installed capacity in MW \n", + "1 Other association Net capacity Installed capacity in MW \n", + "2 Other association Net capacity Installed capacity in MW \n", + "3 Other association Net capacity Installed capacity in MW \n", + "4 Other association Net capacity Installed capacity in MW " + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_soaf = data_soaf.reset_index()\n", "data_soaf = data_soaf.rename(columns={'level_0': 'technology',\n", @@ -1385,9 +3213,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
countryyeartechnologycapacitysourcesource_typecapacity_definitiontype
1AL2011Biomass and biogas0entsoe SOAFOther associationNet capacityInstalled capacity in MW
3AL2011Fossil fuels0entsoe SOAFOther associationNet capacityInstalled capacity in MW
4AL2011Natural gas0entsoe SOAFOther associationNet capacityInstalled capacity in MW
5AL2011Hard coal0entsoe SOAFOther associationNet capacityInstalled capacity in MW
6AL2011Hydro0entsoe SOAFOther associationNet capacityInstalled capacity in MW
\n", + "
" + ], + "text/plain": [ + " country year technology capacity source source_type \\\n", + "1 AL 2011 Biomass and biogas 0 entsoe SOAF Other association \n", + "3 AL 2011 Fossil fuels 0 entsoe SOAF Other association \n", + "4 AL 2011 Natural gas 0 entsoe SOAF Other association \n", + "5 AL 2011 Hard coal 0 entsoe SOAF Other association \n", + "6 AL 2011 Hydro 0 entsoe SOAF Other association \n", + "\n", + " capacity_definition type \n", + "1 Net capacity Installed capacity in MW \n", + "3 Net capacity Installed capacity in MW \n", + "4 Net capacity Installed capacity in MW \n", + "5 Net capacity Installed capacity in MW \n", + "6 Net capacity Installed capacity in MW " + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "dict_technologies = {'Nuclear Power': 'Nuclear',\n", " 'Fossil Fuels': 'Fossil fuels',\n", @@ -1450,7 +3390,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -1574,9 +3514,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\frame.py:6201: FutureWarning: Sorting because non-concatenation axis is not aligned. A future version\n", + "of pandas will change to not sort by default.\n", + "\n", + "To accept the future behavior, pass 'sort=True'.\n", + "\n", + "To retain the current behavior and silence the warning, pass sort=False\n", + "\n", + " sort=sort)\n" + ] + } + ], "source": [ "table_to_append = pd.DataFrame(columns=['country', 'year', 'technology', 'capacity'])\n", "table_to_append['year'] = table_to_append['year'].astype(int)\n", @@ -1624,7 +3579,7 @@ " table_to_append = table_to_append.append(row_to_append, sort=True)\n", "\n", "\n", - "data_soaf = data_soaf.append(table_to_append)" + "data_soaf = data_soaf.append(table_to_append, sort=True)" ] }, { @@ -1636,9 +3591,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
capacitycapacity_definitioncountrysourcesource_typetechnologytypeyear
10Net capacityALentsoe SO&AFOther associationBiomass and biogasInstalled capacity in MW2011
30Net capacityALentsoe SO&AFOther associationFossil fuelsInstalled capacity in MW2011
40Net capacityALentsoe SO&AFOther associationNatural gasInstalled capacity in MW2011
50Net capacityALentsoe SO&AFOther associationHard coalInstalled capacity in MW2011
60Net capacityALentsoe SO&AFOther associationHydroInstalled capacity in MW2011
\n", + "
" + ], + "text/plain": [ + " capacity capacity_definition country source source_type \\\n", + "1 0 Net capacity AL entsoe SO&AF Other association \n", + "3 0 Net capacity AL entsoe SO&AF Other association \n", + "4 0 Net capacity AL entsoe SO&AF Other association \n", + "5 0 Net capacity AL entsoe SO&AF Other association \n", + "6 0 Net capacity AL entsoe SO&AF Other association \n", + "\n", + " technology type year \n", + "1 Biomass and biogas Installed capacity in MW 2011 \n", + "3 Fossil fuels Installed capacity in MW 2011 \n", + "4 Natural gas Installed capacity in MW 2011 \n", + "5 Hard coal Installed capacity in MW 2011 \n", + "6 Hydro Installed capacity in MW 2011 " + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_soaf['source'] = 'entsoe SO&AF'\n", "data_soaf['source_type'] = 'Other association'\n", @@ -1657,9 +3724,127 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 33, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
technologysourcesource_typeyeartypecountrycapacity_definitioncapacitycomment
0Fossil fuelsAgencija za energijoMinistry2013Installed capacity in MWSINet capacity1240.00
1Fossil fuelsAgencija za energijoMinistry2014Installed capacity in MWSINet capacity1766.00
2Fossil fuelsAgencija za energijoMinistry2015Installed capacity in MWSINet capacity1442.97
3Fossil fuelsAnreRegulatory Authority2013Installed capacity in MWROUnknown12079.00
4Fossil fuelsAnreRegulatory Authority2014Installed capacity in MWROUnknown12102.00
\n", + "
" + ], + "text/plain": [ + " technology source source_type year \\\n", + "0 Fossil fuels Agencija za energijo Ministry 2013 \n", + "1 Fossil fuels Agencija za energijo Ministry 2014 \n", + "2 Fossil fuels Agencija za energijo Ministry 2015 \n", + "3 Fossil fuels Anre Regulatory Authority 2013 \n", + "4 Fossil fuels Anre Regulatory Authority 2014 \n", + "\n", + " type country capacity_definition capacity comment \n", + "0 Installed capacity in MW SI Net capacity 1240.00 \n", + "1 Installed capacity in MW SI Net capacity 1766.00 \n", + "2 Installed capacity in MW SI Net capacity 1442.97 \n", + "3 Installed capacity in MW RO Unknown 12079.00 \n", + "4 Installed capacity in MW RO Unknown 12102.00 " + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data = pd.concat([data_opsd, data_eurostat, data_soaf, data_entsoe], sort=False)\n", "data = data.reset_index(drop=True)\n", @@ -1700,19 +3885,176 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 34, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
technologysourcesource_typeyeartypecountrycapacity_definitioncapacitycommentenergy_source_level_0energy_source_level_1energy_source_level_2energy_source_level_3technology_level
0Fossil fuelsAgencija za energijoMinistry2013Installed capacity in MWSINet capacity1240.00FalseTrueFalseFalseFalse
1Fossil fuelsAgencija za energijoMinistry2014Installed capacity in MWSINet capacity1766.00FalseTrueFalseFalseFalse
2Fossil fuelsAgencija za energijoMinistry2015Installed capacity in MWSINet capacity1442.97FalseTrueFalseFalseFalse
3Fossil fuelsAnreRegulatory Authority2013Installed capacity in MWROUnknown12079.00FalseTrueFalseFalseFalse
4Fossil fuelsAnreRegulatory Authority2014Installed capacity in MWROUnknown12102.00FalseTrueFalseFalseFalse
\n", + "
" + ], + "text/plain": [ + " technology source source_type year \\\n", + "0 Fossil fuels Agencija za energijo Ministry 2013 \n", + "1 Fossil fuels Agencija za energijo Ministry 2014 \n", + "2 Fossil fuels Agencija za energijo Ministry 2015 \n", + "3 Fossil fuels Anre Regulatory Authority 2013 \n", + "4 Fossil fuels Anre Regulatory Authority 2014 \n", + "\n", + " type country capacity_definition capacity comment \\\n", + "0 Installed capacity in MW SI Net capacity 1240.00 \n", + "1 Installed capacity in MW SI Net capacity 1766.00 \n", + "2 Installed capacity in MW SI Net capacity 1442.97 \n", + "3 Installed capacity in MW RO Unknown 12079.00 \n", + "4 Installed capacity in MW RO Unknown 12102.00 \n", + "\n", + " energy_source_level_0 energy_source_level_1 energy_source_level_2 \\\n", + "0 False True False \n", + "1 False True False \n", + "2 False True False \n", + "3 False True False \n", + "4 False True False \n", + "\n", + " energy_source_level_3 technology_level \n", + "0 False False \n", + "1 False False \n", + "2 False False \n", + "3 False False \n", + "4 False False " + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Drop first rows\n", "energylevels = energylevels_raw[5:]\n", "\n", - "# Define multiindex for DataFrame\n", - "energylevels.columns = pd.MultiIndex.from_arrays(energylevels[:1].values,\n", - " names=['level'])\n", - "\n", - "# Delete double rows due to multiindex defintion\n", - "energylevels = energylevels[pd.notnull(energylevels.index)]\n", + "energylevels.columns = energylevels[:1].values[0]\n", "\n", "# Reset index for Dataframe\n", "energylevels = energylevels.reset_index()\n", @@ -1750,7 +4092,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 35, "metadata": {}, "outputs": [], "source": [ @@ -1780,7 +4122,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ @@ -1818,7 +4160,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ @@ -1857,7 +4199,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ @@ -2012,7 +4354,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 39, "metadata": {}, "outputs": [], "source": [ @@ -2021,7 +4363,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 40, "metadata": {}, "outputs": [], "source": [ @@ -2056,7 +4398,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 41, "metadata": {}, "outputs": [], "source": [