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

[Bug Report] Historical Data not Available #135

Closed
kevinmatthes opened this issue May 6, 2023 · 5 comments · Fixed by #188
Closed

[Bug Report] Historical Data not Available #135

kevinmatthes opened this issue May 6, 2023 · 5 comments · Fixed by #188
Assignees

Comments

@kevinmatthes
Copy link
Collaborator

I was testing options for a solution to #132 and noticed that the application breaks if historical weather data is queried. Here are some examples:

  • wthrr London -F `date --date=tomorrow +%F`
  • wthrr London -F `date +%F`
  • wthrr London -F `date --date=yesterday +%F`
  • wthrr London -F 2023-05-07 (tomorrow)
  • wthrr London -F 2023-05-06 (today)
  • wthrr London -F 2023-05-05 (yesterday)

I understand that for future dates, there is no data to be fetched, yet. But the application offers historical weather data, so I assume that historical data should be available, at least for some places like capital cities and for dates in the past. As a core functionality of the application does not work, I consider this bug critical.

@kevinmatthes
Copy link
Collaborator Author

This bug also appears in v1.0.0; cargo install wthrr --version 1.0.0.

@kevinmatthes
Copy link
Collaborator Author

The weather of "last year" is no problem but "yesterday" is.

@ttytm
Copy link
Owner

ttytm commented May 6, 2023

Thanks for the report @kevinmatthes,

Yes this should definitively be fixed. I'm looking into it this sunday.

@ttytm
Copy link
Owner

ttytm commented Jun 26, 2023

Unfortunately this is due to an api limitation. It takes some days until historical data is available in the archive. I'm observing 3-5 days delay for the places I've checked.

E.g., checking on on 2023-06-23 for Berlin: the 2023-06-20 temperature data has null values, while it's available for 06-19.
https://archive-api.open-meteo.com/v1/archive?latitude=52.52&longitude=13.41&start_date=2023-06-20&end_date=2023-06-20&hourly=temperature_2m&daily=temperature_2m_mean&timezone=Europe%2FBerlin

I'll add a proper error information for requests that encounter historical null data that the weather data isn't available.

@ttytm
Copy link
Owner

ttytm commented Sep 11, 2023

In the meantime, a real solution for the issue became available. open-meteo provides now a &past_days endpoint in their forecast API, to include recent days. This we can use to access recently past days. It's what should be and is gonna be used for the updated fix.

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 a pull request may close this issue.

2 participants