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

Optimize FMI data querying #240

Open
spaasis opened this issue Jun 20, 2024 · 0 comments
Open

Optimize FMI data querying #240

spaasis opened this issue Jun 20, 2024 · 0 comments

Comments

@spaasis
Copy link
Member

spaasis commented Jun 20, 2024

We're currently fetching data with the highest available resolution. We should allow the user to choose the time resolution so they can get e.g. daily averages for the past year, instead of hourly data.

There are "daily statistics" endpoints, e.g. https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=describeStoredQueries&StoredQuery_Id=fmi::observations::mareograph::daily::simple but that does seem to return data for every minute? https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::observations::mareograph::daily::simple&parameters=WATLEV&starttime=2024-06-18&endtime=2024-06-19&fmisid=100540

The easiest way to control the queries would be the timeStep parameters e.g. https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::observations::mareograph::simple&parameters=WATLEV&starttime=2024-06-18&endtime=2024-06-19&fmisid=100540&timestep=1440 BUT we should figure out what the actual result here is - is it the daily average or just a single result per day?

Resources:

The relevant queries are formed in /apis/fmi, but changing the query logic might affect /apis/fmiApi.ts as well

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

1 participant