-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Provide daily aggregates (min/max temperature, total sunshine, ...) #117
Comments
Heyho @MarcelCoding, thank you for the feedback! I have trouble imagining your use case - could you elaborate what response you would expect when supplying a resolution other than {
"timestamp": "2020-04-21T10:00:00+00:00",
"source_id": 7003,
"precipitation": 0,
"pressure_msl": 1021.5,
"sunshine": 60,
"temperature": 14.6,
"wind_direction": 80,
"wind_speed": 21.6,
"cloud_cover": 0,
"dew_point": -0.7,
"relative_humidity": 35,
"visibility": 40000,
"wind_gust_direction": 80,
"wind_gust_speed": 49.3,
"condition": "dry",
"icon": "clear-day"
} Most of these weather parameters are momentary measurements: at exactly 10:00 UTC, the air temperature was 14.6 °C, the mean sea level pressure was 1021.5 mbar, etc. (The exceptions being the precipitation, wind, and sunshine parameters, which are either averages, totals, or extrema of the preceding hour.) If the user specifies a |
I see. It would be difficult to do an efficient average, min and max? My initial idea wars that the api is providing the average of (if you select daily) the selected day. The background is, if you query data from a lager time span. You get a huge data set and the api is always slow. If I select a big time span I also don't want hourly data, because the diagram or whatever isn't able to display the data. |
It wouldn't be difficult per se, and it may even come with the latency improvement you're hoping for if we do the aggregation in SQL, but it seems tough to accommodate the different use cases into the existing response format. Maybe a second endpoint with a different response structure (containing Alternatively we could go the Dark Sky route and return a That being said, a summary feature doesn't strike me as particularly much-wanted, and users should be able to implement basic aggregations like maximum and average without too much trouble, so I'd like to gauge some user interest before investing development time into it. (I.e. my own development time, I am of course very open to pull requests! :)) |
That's sound great. With the problem of the efficiently I meant that you calculate the min a and max every time e.g. in a sql query. Unfortunately I am not aber to provide you a pull request because I am not cabable to write python code. |
Hello, I have a similar request. I want my weather station to display the best icon for the day. The API does not yet provide an icon for a day, but it does for the hours and I don't like use a selected time like 12:00. Currently I am trying to group the weather icons for all 24 hours of the day. The highest value could then be displayed. But this brings problems, if e.g. two icons have the same number of hours. e.g. a) Good example b) Example with problem Do you have an idea? Or is something already in preparation? Greetings For example my next days:
|
Hi @tawissus, I fear the question for a daily icon has much more to do with personal preference than with any "proper" way to determine it. My personal first step would be to get rid of the
Next I would prioritize bad-weather icons. A day that has four hours of rain and is cloudy-but-dry otherwise definitely deserves a That being said, adding a daily summary (which if added would definitely include the |
Add the ability to define the resolution for the
/weather
endpoint.e.g. values
HOURLY
,DAILY
,MONTHLY
,YEARLY
The text was updated successfully, but these errors were encountered: