Skip to content

Commit 0638acc

Browse files
author
Ingmar Schlecht
committed
Minor fixes
1 parent 2dafa15 commit 0638acc

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

checksums.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
renewable_capacity_timeseries_DE.csv,eb074a32c3506fe64df2e6c8680f2b3187c98ff2dc48fd8b7721d4a3c09c246e
2-
renewable_power_plants.sqlite,71bd82c03b74975dba0de53ffb4421595af69f2a8163f92313f76d34745d6fc1
3-
renewable_power_plants.xlsx,66cbba7ce1bd1926a77c5604cd120c2c0d071c9608870946bd36636303e109b9
1+
renewable_capacity_timeseries_DE.csv,99b7473fcc53cba3e4945f9dfed07690e258f3fb88d07369dff1fdea19f415d2
2+
renewable_power_plants.sqlite,0292ef23b9b2f2f6aef5cb0bc295f5c264129cbe8450f46a3512bcec7711b360
3+
renewable_power_plants.xlsx,923df41ec765de1b90c7073fb40c7abd153689fe6673980523e9e9a4457e3912
44
renewable_power_plants_CH.csv,14b657da2644b43fabab8b78e43c0d963395e5cc3381280c236fb4c82a591d73
5-
renewable_power_plants_DE.csv,4e64ab261976d3f058e37e8e76c490b8052fa64688fb52c52f6ee69cb30c866d
5+
renewable_power_plants_DE.csv,c14b51f6a1139f7a5d03310c4d0fd1f413855fac8d9eb87f2b97bf8fce4201a1
66
renewable_power_plants_DK.csv,50e6ae0636158ed49614f6b5c214b69834a9a634f45c9faa27f00b86a95e1c93
77
renewable_power_plants_FR.csv,a9abeebe7c3e30ecc9caaaeb1bc529875ff78f62fe82542a3705f90fe7be743b
88
renewable_power_plants_PL.csv,42919ae255cea37572c5feb465857a5d61ef88b3bf5dab8ffa0c2eda618c0943
9-
res_plants_separated_DE_unvalidated_plants.csv,827426e68fadb6117e0859e6ddd23dac63235a0b9c153099dec8cf07fb385e27
10-
res_plants_separated_FR_overseas_territories.csv,113fdfad9e3b7c25503ddf07aaa6238f6b6047cc8b0a9ec6765598563901d8c7
9+
res_plants_separated_DE_unvalidated_plants.csv,4ade5021fb039b575c66b26f3b1b106ece3dc380ffef9b91cc1d07ce8168e707
10+
res_plants_separated_FR_overseas_territories.csv,581ff3aebd0d31558cf736e0e2eafc3fbe3f408fff413988b3fb1e3c2b6aa962
1111
validation_marker.csv,bf2ae93b44ec396d5f7df40ddc98b461e5b3a6c475401f8913abde1f5e29207a

validation_and_output.ipynb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"source": [
5050
"settings = {\n",
5151
" 'version': '2018-02-27',\n",
52-
" 'changes': 'Update of data to latest available versions.'\n",
52+
" 'changes': 'Update of German data to latest available versions.'\n",
5353
"}"
5454
]
5555
},
@@ -118,8 +118,7 @@
118118
"# Read data from script Part 1 download_and_process\n",
119119
"\n",
120120
"dfs = {}\n",
121-
"dfs['DE'] = pd.read_pickle('intermediate/DE_renewables_final_download_and_process.pickle')\n",
122-
"for country in countries_non_DE:\n",
121+
"for country in countries:\n",
123122
" dfs[country] = pd.read_pickle('intermediate/'+country+'_renewables.pickle')"
124123
]
125124
},
@@ -275,7 +274,7 @@
275274
"\t\"Long explanation\": \"This powerplant is located in regions belonging to France but not located in Europe (e.g. Guadeloupe).\"\n",
276275
"}\n",
277276
"\n",
278-
"dfs['FR'].loc[mark_rows_FR_not_in_Europe, 'comment'] += key+\";\"\n",
277+
"dfs['FR'].loc[mark_rows_FR_not_in_Europe, 'comment'] += key+\"#\"\n",
279278
"\n",
280279
"del mark_rows_FR_not_in_Europe"
281280
]
@@ -499,8 +498,12 @@
499498
"metadata": {},
500499
"outputs": [],
501500
"source": [
502-
"# Filling the empty cells in the gethermal column since this did not work in the loop\n",
501+
"# Filling a few timeseries with forward-fill, as some did not work in the loop\n",
502+
"timeseries_daily.Onshore = timeseries_daily.Onshore.fillna(method='ffill')\n",
503+
"timeseries_daily.Offshore = timeseries_daily.Offshore.fillna(method='ffill')\n",
504+
"timeseries_daily.Bioenergy = timeseries_daily.Bioenergy.fillna(method='ffill')\n",
503505
"timeseries_daily.Geothermal = timeseries_daily.Geothermal.fillna(method='ffill')\n",
506+
"timeseries_daily['Run-of-river'] = timeseries_daily['Run-of-river'].fillna(method='ffill')\n",
504507
"\n",
505508
"# Shorten timestamp to year for the yearly time series \n",
506509
"timeseries_yearly.index = pd.to_datetime(timeseries_yearly.index, format=\"%Y\").year\n",
@@ -1282,14 +1285,15 @@
12821285
" web: http://open-power-system-data.org/\n",
12831286
"views: True\n",
12841287
"openpowersystemdata-enable-listing: True\n",
1285-
"documentation: https://github.com/Open-Power-System-Data/renewable_power_plants/blob/2017-06-26/main.ipynb\n",
12861288
"\"\"\"\n",
12871289
"\n",
12881290
"metadata = yaml.load(metadata)\n",
12891291
"\n",
12901292
"metadata['last_changes'] = settings['changes']\n",
12911293
"metadata['version'] = settings['version']\n",
12921294
"\n",
1295+
"metadata['documentation'] = 'https://github.com/Open-Power-System-Data/renewable_power_plants/blob/'+settings['version']+'/main.ipynb'\n",
1296+
"\n",
12931297
"datapackage_json = json.dumps(metadata, indent=4, separators=(',', ': '))\n",
12941298
"\n",
12951299
"# Write the information of the metadata\n",
@@ -1329,7 +1333,7 @@
13291333
"for country in countries_including_dirty:\n",
13301334
" files.append(table_names[country]+'.csv')\n",
13311335
"\n",
1332-
"with open(os.path.join(output_path, 'checksums.txt'), 'w') as f:\n",
1336+
"with open('checksums.txt', 'w') as f:\n",
13331337
" for file_name in sorted(files):\n",
13341338
" file_hash = get_sha_hash(os.path.join(package_path, file_name))\n",
13351339
" f.write('{},{}\\n'.format(file_name, file_hash))"

0 commit comments

Comments
 (0)