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

Put the low before the high. #100

Closed
wants to merge 1 commit into from
Closed

Conversation

kbloom
Copy link

@kbloom kbloom commented May 9, 2024

It appears that when the OpenWeatherMap API returns its low temperature and high temperature for the day, that the low means that it's the lowest temperature expected in the 24 hour period that runs from midnight to midnight. That means that typically the low for Monday is the temperature on Monday at about 6 AM before the sun rises, and this low temperature comes before the high, which happens in the afternoon after the sun has been out all day. However, this display currently displays the low after the high, meaning that in the typical case, the low and high are not in chronological order.

By reversing the order, the high and low will more frequently be in chronological order, paralleling the way that most other weather forecasts report highs and lows.

Note: if tomorrow is forcasted to be much colder than today, and the weather pattern is going to dramatically cool off in the afternoon or overnight, then sometimes the low temperature returned by OpenWeatherMap will actually be at midnight at the end of the day. Hence, this new solution is only mostly chronological, but it should be chronological more often that the current way.

@kbloom kbloom changed the title Put the low before the high. #99 Put the low before the high. May 9, 2024
It appears that when the OpenWeatherMap API returns its low temperature
and high temperature for the day, that the low means that it's the
lowest temperature expected in the 24 hour period that runs from
midnight to midnight. That means that typically the low for Monday is
the temperature on Monday at about 6 AM before the sun rises, and this
low temperature comes before the high, which happens in the afternoon
after the sun has been out all day. However, this display currently
displays the low after the high, meaning that in the typical case,
the low and high are not in chronological order.

By reversing the order, the high and low will more frequently be in
chronological order, paralleling the way that most other weather
forecasts report highs and lows.

Note: if tomorrow is forcasted to be much colder than today, and the
weather pattern is going to dramatically cool off in the afternoon or
overnight, then sometimes the low temperature returned by OpenWeatherMap
will actually be at midnight at the end of the day. Hence, this new
solution is only mostly chronological, but it should be chronological
more often that the current way.

This helps address lmarzen#99
@lmarzen
Copy link
Owner

lmarzen commented May 9, 2024

While I understand the intention behind the proposed change, I do not think we should change displaying "hi/lo" to "lo/hi"

The convention of displaying temperatures as "hi/lo" is deeply ingrained in weather reporting and forecasting, and I challenge you to find a widely used weather service that reports in a "lo/hi" format.

I think the real issue is how the hi/lo is calculated. Historical data generally uses midnight to midnight max/min, while most modern weather services report day-time high/overnight low in their forecasts.

@lmarzen lmarzen closed this May 13, 2024
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.

None yet

2 participants