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

query_installed_generation_capacity_per_unit only returns data for the latest queried period. #294

Open
tjader opened this issue Jan 22, 2024 · 2 comments
Labels
more info needed when more info is needed from the person opening the issue

Comments

@tjader
Copy link

tjader commented Jan 22, 2024

>>>client.query_installed_generation_capacity_per_unit.fn('SE', pd.Timestamp('2018-01-01', tz='+01:00'),
                                                            pd.Timestamp('2023-01-01', tz='+01:00'),

The above should have a nuclear production unit (Ringhals 2) removed after 2019-12, but the output doesn't have any timestamps, so the merging logic will ensure the line in question is present in the output.

Would it make sense to include the timestamp in the resulting output?
That way it is possible to determine that the production unit in question is removed at later stages.
It would also support any changes in data (e.g. increased capacity) over time.

The downside would be that unchanged production units would occur for each date, but the number of API queries would remain the same.

@tjader tjader changed the title query_installed_generation_capacity_per_unit only returns data for the latest queried perid. query_installed_generation_capacity_per_unit only returns data for the latest queried peroid. Jan 22, 2024
@tjader tjader changed the title query_installed_generation_capacity_per_unit only returns data for the latest queried peroid. query_installed_generation_capacity_per_unit only returns data for the latest queried period. Jan 22, 2024
@fboerman
Copy link
Collaborator

hi @tjader ! do you mean that in the xml response there is timestamp?

@fboerman fboerman added the more info needed when more info is needed from the person opening the issue label Jan 26, 2024
@tjader
Copy link
Author

tjader commented Jan 26, 2024

@fboerman, yes, there is a element period.timeinterval.start and period.timeinterval.end when extracting the soup inside _parse_installed_capacity_per_plant.

FYI, the issue I'm trying to resolve is to determine (roughly) when generation units have closed down.
In SE, the nuclear reactor Ringhals 1 closed down 2020-12-31.
Querying the endpoint over a longer period returns this

rres=entsoe_client.query_installed_generation_capacity_per_unit(country_code='SE', start=pd.Timestamp('2020-01-01', tz='Europe/Stockholm'), end=pd.Timestamp('2024-01-01', tz='Europe/Stockholm'))
res.query('Name == "Ringhals 1"').T
                               46WPU00000000105
Bidding Zone                   10YSE-1--------K
Installed Capacity [MW]                     881
Name                                 Ringhals 1
Production Type                         Nuclear
Voltage Connection Level [kV]               400

But a shorter timeframe returns an empty result

res=entsoe_client.query_installed_generation_capacity_per_unit(country_code='SE', start=pd.Timestamp('2022-01-01', tz='Europe/Stockholm'), end=pd.Timestamp('2024-01-01', tz='Europe/Stockholm'))
res.query('Name == "Ringhals 1"').T
Empty DataFrame
Columns: []
Index: [Bidding Zone, Installed Capacity [MW], Name, Production Type, Voltage Connection Level [kV]]

In practice I can work around the issue by doing a binary search over multiple API calls, but the data is available in the first API call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed when more info is needed from the person opening the issue
Projects
None yet
Development

No branches or pull requests

2 participants