Skip to content

Add Fetcher for Norway#70

Merged
kratzert merged 10 commits intomainfrom
add-norway
Nov 3, 2025
Merged

Add Fetcher for Norway#70
kratzert merged 10 commits intomainfrom
add-norway

Conversation

@kratzert
Copy link
Owner

Fixes #27

@kratzert
Copy link
Owner Author

@simonmoulds We came to the point where the decision to name "hourly" discharge also *_instantaneous bites our a**. Norway provides daily means, hourly means and instantaneous data and we now have to either add global for "hourly" (then we also need to check the other fetchers that support hourly if that is hourly mean or instantaneous, or we only support hourly here, under the name "instantaneous", which however is misleading.. What are your thoughts?

@simonmoulds
Copy link
Collaborator

That didn't take long ;)

In #3 we agreed to follow the convention <variable>_<res>_<stat> / <variable>_<res> for aggregated / instantaneous values, regardless of the time resolution - so in this case we can apply "discharge_daily_mean" and "discharge_hourly_mean" for 1440 and 60 respectively. Ah OK - the problem relates specifically to how we name the instantaneous data? Does this data have a regular time interval?

Perhaps I've misunderstood the problem...

@kratzert
Copy link
Owner Author

Yes, the problem is rather the consistency of the meaning of instantaneous variables across different fetchers. I mean here they make it very clear that hourly values are averaged and 0 is really instantaneous but for other countries we simply took e.g. 15 minute data as instantaneous even though we don't know if this is an 15min average or instant value. I haven't checked the interval of the 0 timeseries yet.

@simonmoulds
Copy link
Collaborator

simonmoulds commented Oct 24, 2025

OK, got it. I tried to look at some 0 data but it was too much for my train wifi... Anyway, regular or irregular we can apply a consistent logic to the Norwegian data, i.e. "discharge_daily_mean", "discharge_hourly_mean", "discharge_instantaneous" (#46).

As far as the other fetchers are concerned, my first thought is that we can only try our best to work out whether it's an aggregation or instantaneous, and document any cases where we're unsure. We might need to go back and revise some cases where we've assumed hourly is instantaneous. It's not ideal but I can't think of anything better...

@kratzert
Copy link
Owner Author

kratzert commented Nov 3, 2025

Okay, cool. Updated the code and it now supports all temporal resolutions. The instantaneous data is also at hourly resolution but IIUC, it is the measurement at this exact time, while the hourly data is the average over the measurements during the time bucket. Not sure how many measurements are considered for the hourly mean.

Also include Terms of Use for the API in the docs (or the link to the terms of use sections in their API)

@kratzert kratzert closed this Nov 3, 2025
@kratzert kratzert reopened this Nov 3, 2025
@kratzert kratzert merged commit fb8d851 into main Nov 3, 2025
12 checks passed
thiagovmdon pushed a commit that referenced this pull request Nov 9, 2025
* Add fetcher for Norway

* Declare more columns as numeric

* Formatting

* Add unit tests

* Add Norwary fetcher to docs

* Change class init to accept api_token. Helps fixing test.

* Fix data loading in test

* Added support for more variables

* Add hourly/instant resolution

* Formatting
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

Successfully merging this pull request may close these issues.

Norway (NVE) (add more countries)

2 participants