Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed Capacity per Production Type returns only the first year that i have queried. #386

Open
EndesaMan opened this issue Feb 5, 2025 · 1 comment

Comments

@EndesaMan
Copy link

Hello! I seem to have a problem with the "query_installed_generation_capacity" command. If i query for a timeperiod that spans through several years i usually get a dataframe with the installed capacities for the years queried. However, right now i only get the first year i queried, even though the years have different values between them. For example:

Input:

from entsoe import EntsoePandasClient
import pandas as pd
import os
client = EntsoePandasClient(api_key = os.getenv("ENTSOE"))
start = pd.TimeStamp(year=2015, month=1, day=1)
end = pd.TimeStamp(year=2025, month=1, day=1)
country_code = "BE"
df_capacity = client.query_installed_generation_capacity(country_code, start = start, end = end)

Output:
df_capacity_2015_2025.csv

,Biomass,Fossil Gas,Fossil Oil,Hydro Pumped Storage,Hydro Run-of-river and poundage,Nuclear,Other,Solar,Waste,Wind Offshore,Wind Onshore
2015-01-01 00:00:00+01:00,573.0,6753.0,229.0,1308.0,162.0,5943.0,,2818.0,358.0,712.0,1249.0

If i query starting from another year i get the the data from that starting year.

Input:

from entsoe import EntsoePandasClient
import pandas as pd
import os
client = EntsoePandasClient(api_key = os.getenv("ENTSOE"))
start = pd.TimeStamp(year=2020, month=1, day=1)
end = pd.TimeStamp(year=2025, month=1, day=1)
country_code = "BE"
df_capacity = client.query_installed_generation_capacity(country_code, start = start, end = end)

Output:
df_capacity_2020_2025.csv

,Biomass,Fossil Gas,Fossil Oil,Hydro Pumped Storage,Hydro Run-of-river and poundage,Nuclear,Other,Solar,Waste,Wind Offshore,Wind Onshore
2020-01-01 00:00:00+01:00,647.0,6799.0,246.0,1308.0,175.0,5943.0,19.0,3887.0,362.0,2254.0,2416.0

Does this happen to any one of you too?

@fleimgruber
Copy link
Contributor

fleimgruber commented Feb 24, 2025

I would refrain from queries that span more than one year, and even then I would frequently go to half-a-year queries if needed. The queries you tried with 5-10 years are most likely too much for the API in most cases.

Edit: See also

def year_limited(func):
which is there for queries that are known to be limited to one year only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants