Skip to content

Commit

Permalink
Add version of OPSD entsoe data
Browse files Browse the repository at this point in the history
  • Loading branch information
uvchik committed Nov 13, 2020
1 parent 3c66793 commit abfc892
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions reegis/energy_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def get_eb_index_translation_dict():
def get_de_balance(year):
"""Download and return energy balance of germany for a given year."""
url = cfg.get("energy_balance", "url_energy_balance_germany")

req = requests.get(url.format(year=str(year)[-2:], suffix="xls"))

if int(req.headers["Content-length"]) > 0:
Expand Down
2 changes: 1 addition & 1 deletion reegis/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def get_entsoe_renewable_data(file=None, version=None):

if not os.path.isfile(fn):
if file is None:
renewables = split_timeseries_file().renewables
renewables = split_timeseries_file(version=version).renewables
renewables.to_csv(fn)

re = pd.read_csv(
Expand Down

0 comments on commit abfc892

Please sign in to comment.