|
49 | 49 | "source": [ |
50 | 50 | "settings = {\n", |
51 | 51 | " '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", |
53 | 53 | "}" |
54 | 54 | ] |
55 | 55 | }, |
|
118 | 118 | "# Read data from script Part 1 download_and_process\n", |
119 | 119 | "\n", |
120 | 120 | "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", |
123 | 122 | " dfs[country] = pd.read_pickle('intermediate/'+country+'_renewables.pickle')" |
124 | 123 | ] |
125 | 124 | }, |
|
275 | 274 | "\t\"Long explanation\": \"This powerplant is located in regions belonging to France but not located in Europe (e.g. Guadeloupe).\"\n", |
276 | 275 | "}\n", |
277 | 276 | "\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", |
279 | 278 | "\n", |
280 | 279 | "del mark_rows_FR_not_in_Europe" |
281 | 280 | ] |
|
499 | 498 | "metadata": {}, |
500 | 499 | "outputs": [], |
501 | 500 | "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", |
503 | 505 | "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", |
504 | 507 | "\n", |
505 | 508 | "# Shorten timestamp to year for the yearly time series \n", |
506 | 509 | "timeseries_yearly.index = pd.to_datetime(timeseries_yearly.index, format=\"%Y\").year\n", |
|
1282 | 1285 | " web: http://open-power-system-data.org/\n", |
1283 | 1286 | "views: True\n", |
1284 | 1287 | "openpowersystemdata-enable-listing: True\n", |
1285 | | - "documentation: https://github.com/Open-Power-System-Data/renewable_power_plants/blob/2017-06-26/main.ipynb\n", |
1286 | 1288 | "\"\"\"\n", |
1287 | 1289 | "\n", |
1288 | 1290 | "metadata = yaml.load(metadata)\n", |
1289 | 1291 | "\n", |
1290 | 1292 | "metadata['last_changes'] = settings['changes']\n", |
1291 | 1293 | "metadata['version'] = settings['version']\n", |
1292 | 1294 | "\n", |
| 1295 | + "metadata['documentation'] = 'https://github.com/Open-Power-System-Data/renewable_power_plants/blob/'+settings['version']+'/main.ipynb'\n", |
| 1296 | + "\n", |
1293 | 1297 | "datapackage_json = json.dumps(metadata, indent=4, separators=(',', ': '))\n", |
1294 | 1298 | "\n", |
1295 | 1299 | "# Write the information of the metadata\n", |
|
1329 | 1333 | "for country in countries_including_dirty:\n", |
1330 | 1334 | " files.append(table_names[country]+'.csv')\n", |
1331 | 1335 | "\n", |
1332 | | - "with open(os.path.join(output_path, 'checksums.txt'), 'w') as f:\n", |
| 1336 | + "with open('checksums.txt', 'w') as f:\n", |
1333 | 1337 | " for file_name in sorted(files):\n", |
1334 | 1338 | " file_hash = get_sha_hash(os.path.join(package_path, file_name))\n", |
1335 | 1339 | " f.write('{},{}\\n'.format(file_name, file_hash))" |
|
0 commit comments