re-add humidex and/or "feels like" temperature

Bug #743553 reported by Felix Lawrence on 2011-03-27
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Medium
Unassigned

Bug Description

Since the switch to google/yahoo weather info, Humidex has not been available. It should be reimplemented, and/or replaced by the Australian Apparent Temperature which incorporates both humidity and wind chill.

Vadim Rutkovsky (roignac) wrote :

Yahoo and Google weather sources don't provide a dew point value, which is required for humidex.
Humidex can be calculated after NOAA source will be implemented

Changed in weather-indicator:
importance: Undecided → Medium
milestone: none → cloudy-3
status: New → Triaged
Felix Lawrence (felix-lawrence) wrote :

I'm working through the math to calculate the humidex another way - nearly done!

Felix Lawrence (felix-lawrence) wrote :

Here's a pretty major patch. I took the liberty of completely replacing Humidex by "Feels Like". If this is not appropriate, then feel free to strip out those parts of the patch. The get_humidex_label method now works (it now calculates the vapour pressure from relative humidity not dew point), but it isn't called by anything since the Humidex parts of the UI now show a "Feels Like" temperature.

I figured that since the interface is going to be revamped soon anyway, the most important thing was to calculate the relevant values.

I couldn't test this against Google Weather since .__report['current_conditions'] and .__localized_report['current_conditions'] were both blank for me causing lots of errors - if someone else can confirm this then that's a separate bug.

Panagiotis Skintzos (ph7) wrote :

I looked up the terms in Wikipedia and noticed that different "Feels like" indices are used around the world.

-"Humidex" used in Canada
http://en.wikipedia.org/wiki/Humidex

- "Wind Chill" index in North America
http://en.wikipedia.org/wiki/Wind_chill

- "Apparent temperature" used in Australia (and in your patch)
http://en.wikipedia.org/wiki/Apparent_temperature
http://www.bom.gov.au/info/thermal_stress/

- "Heat index"
http://en.wikipedia.org/wiki/Heat_index

Felix I tried your patch. Not surprisingly, it shows different feels like than Yahoo.
Generally it shows lower values and I think it is because it should use the dry-bulb temperature instead of the air temperature.

I think it would be more logical to use the "Heat index" as the "Feels like" and have the others optional.
Here is a calculator from NOAA which we can use:
http://www.hpc.ncep.noaa.gov/html/heatindex.shtml

We also have dew point:
http://en.wikipedia.org/wiki/Dew_point
I managed to calculate it based on the first formula and it agrees with Yahoo.

Felix Lawrence (felix-lawrence) wrote :

The Apparent Temperature (AT) should generally be lower than the Humidex and Heat index, because it takes into account wind chill whereas the others do not. Likewise, the AT should be higher than the wind chill (which is only defined for temperatures <10˚C) since it takes into account humidity.

I understand that people will probably want the index most common to their region, i.e. the one they are most familiar with.

Tomorrow I can start a new branch for this and write methods that calculate heat index and wind chill. I guess this (and most new development) should be based on the vala port branch, since you've split the code into several files - a good move IMO. Would you then be able to write the code dealing with preferences, at your leisure?

Panagiotis Skintzos (ph7) wrote :

Yes absolutely!
In the vala port branch, I've also refactored the Weather class into an abstract class and added subclasses for Google and Yahoo. I believe it'll be easier to maintain and keep things simple if we want to add another provider. I'll commit the changes there soon.
I've also added your patch as _get_apparent_temperature_C and used the NOAA formula for the heat index calculation. But it would be great if you can check and enhance them.

Vadim Rutkovsky (roignac) wrote :

Changing milestone to foggy

Changed in weather-indicator:
milestone: cloudy-3 → foggy
Panagiotis Skintzos (ph7) wrote :

Heat Index is now presented as "Feels like".
Apparent Temperature is presented as "Feels like (AT)". Perhaps we need a better title?
Humidex and Dewpoint are also calculated.

Yahoo provides the "Wind Chill", but do we really need it?

Changed in weather-indicator:
assignee: nobody → Panagiotis Skintzos (ph7)
status: Triaged → Fix Committed
Felix Lawrence (felix-lawrence) wrote :

Perhaps the list in Preferences should have the labels "Feels like (US Heat Index)" and "Feels like (Apparent Temperature)". Would that fit? In the menu itself, both would just display as "Feels like", as the user would presumably only want one of these in the menu at a time.

Panagiotis Skintzos (ph7) wrote :

Yes, these labels are better and can be translated easier.
Maybe we should strip the "US" from the Heat Index, as it is used in many other countries.

But can we really rely that the user will only have one of these in the menu?
Maybe it makes sense to force having only one "Feels like" in the menu: by checking any of the two will uncheck the other.

I wasn't aware that this definition of Heat Index was used outside the US. If that's the case then the "US" is indeed unnecessary.

A user might temporarily want both types of "Feels like" in the menu, for comparison. But as long as they appear in the menu in the same order as they appear (with full labels) in the preferences, I think it's ok.

I guess the almost over-engineered solution would be to show "Feels like" in the menu if only one is displayed, but show "Feels like (HI)" and "Feels like (AT)" if both were there.

Cullen Maglothin (cullendm) wrote :

This now calls into question another popular US term. Wind Chill. How would this fit into the scheme of things?

According to Wikipedia, Wind chill is only defined beneath 10˚C, and Heat Index is only defined above 27˚C. Maybe we could switch between heat index and wind chill at 15˚C? The label in the preferences could read "Feels like (Heat Index or Wind Chill)".

Cullen Maglothin (cullendm) wrote :

Yes, that seems quite appropriate.

Panagiotis Skintzos (ph7) wrote :

Here in Spain where I live, the heat index is used extensively in tv weather reports. I've seen it In UK (BBC) as well.

Felix, the over-engineered solution you suggested seems ideal; I'll try it.

Yahoo api provides Wind Chill directly. It makes sense to use it as an optional field.

Panagiotis Skintzos (ph7) wrote :

I don't think we should mix Heat Index and Wind Chill. Many people will know/understand what "Feels like" is, but "Wind Chill" is not globally known. I doubt if it can be translated properly as well.

Cullen Maglothin (cullendm) wrote :

I do think that Wind Chill should be included as an option. It is used in both the US and in Canada. One should be able to choose both options in preferences, seeing as they do not overlap.

Panagiotis Skintzos (ph7) wrote :

Ok, I've updated the foggy branch.
Added the Wind chill (calculated per Wikipedia formula) and a combined "Heat index/Wind chill" field (at 10°C and below, wind chill is used). I've used that one as default "Feels-like" index.
That makes it total 5 "Feels like" indices. If only one is selected, the label in the menu reads "Feels like", otherwise the individual labels are used.
What do you think? Are the labels ok?

Looks good.

I'm not Canadian so don't know for sure, but Wikipedia says the Humidex should be displayed as a number without a "˚C" or "˚F", but is always displayed in ˚C-like units (i.e. not Farenheit). I can't find any actual examples of Humidexes in use (I think it's only used in the summer). I get the feeling that it's always referred to as the "Humidex" and not as a "Feels like", so we should do this too.

"Apparent Temperature" might be too vague - although the top hits in google do take you to the correct methodology. Would "Apparent Temp: wind and humidity" make more sense? "Australian Apparent Temperature" is another option, but IMO is less useful.

Cullen Maglothin (cullendm) wrote :

One of the labels read heat index or windchill. Should it read heat index AND windchill?

It's "or" because it shows either heat index or windchill, depending on temperature. "heat index and windchill" would sound like it includes the effects of both wind and humidity at the same time, and it doesn't.

Panagiotis Skintzos (ph7) wrote :

>
> I'm not Canadian so don't know for sure, but Wikipedia says the Humidex
> should be displayed as a number without a "˚C" or "˚F", but is always
> displayed in ˚C-like units (i.e. not Farenheit). I can't find any
> actual examples of Humidexes in use (I think it's only used in the
> summer). I get the feeling that it's always referred to as the
> "Humidex" and not as a "Feels like", so we should do this too.
>
I too thought likewise but I've been searching around for this and put the
units for consistency.

Canadian Weather office do translate Humidex & Wind chill into imperial
units, although they do not use units:
http://www.weatheroffice.gc.ca/mainmenu/faq_e.html#weather2c

They do not put units to emphasize that they are temperature indices, not
measurable temperatures.
I believe it is a matter of consistency. We should use the same policy for
all indices.

Other sites do put units (and translate them to F) after Humidex value:
http://www.cbc.ca/news/canada/manitoba/story/2007/07/26/storm-sewage.html
http://everything2.com/?node_id=87523

In Canadian weather channels like this below, the "Feels Like" temp, is a
combination of Humidex / Wind Chill:
http://www.theweathernetwork.com/index.php?product=glossary&pagecontent=glossaryindex&pagecontent=feelslike

This is similar to the "Heat Index / WInd Chill" combination we added.

> "Apparent Temperature" might be too vague - although the top hits in
> google do take you to the correct methodology. Would "Apparent Temp:
> wind and humidity" make more sense? "Australian Apparent Temperature"
> is another option, but IMO is less useful.
>
Yes "Apparent Temperature" is too vague and the translation will mislead.
I guess only Canadians and Australians will be interested in Humidex
and Apparent Temperature.
We could be more descriptive in the prefs.

Panagiotis Skintzos (ph7) wrote :

Ok, I believe this one looks better. Removed the term "Apparent Temperature" altogether.
Perhaps instead of "Feels like (AU)" we could use "Feels like (AT)", just put AU for consistency.

Indices with units or without?

> Ok, I believe this one looks better. Removed the term "Apparent Temperature" altogether.
> Perhaps instead of "Feels like (AU)" we could use "Feels like (AT)", just put AU for consistency.
This is a good approach - it explains what everything is. I think "(AU)" is more appropriate than "(AT)". If "Temperature, humidity and wind (Australia)" is too long then it could be shortened to "Temp., humidity and wind (Australia)". I think that "wind chill" should be in lower case.

One last extra bit of possible functionality - perhaps we could have a checkbox above the list of fields: "Only show fields when relevant". If this option is ticked (as it would be by default?), then Heat Index is only displayed in the menu when the temperature is above 27˚C and humidity above 40%, wind chill is only shown when the temperature is less than 10˚C, and the main "Feels like" is only shown when one of these applies. This would mean the user could tick heat index and wind chill, and whichever one is relevant would appear in the menu. Also, any fields missing from the report would not be shown in the menu rather than showing '--' or 'N/A' or whatever the current behaviour is. Do you think this would be useful?

> Indices with units or without?
Units for all indices I think - this seems to be the most common approach, and you've shown that we would not be the only weather source to write the Humidex with units.

Panagiotis Skintzos (ph7) wrote :

>
> If "Temperature, humidity and wind (Australia)" is too long then it could
> be shortened to "Temp., humidity and wind (Australia)".

The translated texts will also vary in text, but we can't do much about it.
In my native Greek, all columns will be much wider.

> I think that "wind chill" should be in lower case.
>
In which occurrence?

 One last extra bit of possible functionality - perhaps we could have a
> checkbox above the list of fields: "Only show fields when relevant". If
> this option is ticked (as it would be by default?), then Heat Index is
> only displayed in the menu when the temperature is above 27˚C and
> humidity above 40%, wind chill is only shown when the temperature is
> less than 10˚C, and the main "Feels like" is only shown when one of
> these applies. This would mean the user could tick heat index and wind
> chill, and whichever one is relevant would appear in the menu. Also,
> any fields missing from the report would not be shown in the menu rather
> than showing '--' or 'N/A' or whatever the current behaviour is. Do you
> think this would be useful?
>
I think it's a good idea.
Currently '--' is displayed in any case of missing values (caused by errors
or missing data).
Perhaps it's wise to differentiate the MISSING/INVALID and ERROR status.
Then the missing/invalid fields can be filtered out as you suggested (if the
user has selected the option, otherwise displayed as '--').
But the error-ed fields should be shown always (perhaps 'error' is better
than '--'), so that possible bugs can be reported/fixed.

To summarize the statuses:
- Error: Exception in the code while handling the field.
- Missing: Original value is missing (or not provided) from the source
report (like pressure is missing from Google report)
- Invalid: Calculation is invalid (like wind chill above 10˚C)

>> I think that "wind chill" should be in lower case.
> In which occurrence?
"Heat index or Wind chill" -> "Heat index or wind chill" both for "Feels like" and "Feels like (CA)".

Panagiotis Skintzos (ph7) wrote :

I've pushed new code that implements the new UI and functionality, as we discussed.
Heat Index/Wind chill/Humidex/Dewpoint/Feels like/Feels like (CA) are calculated when the basic data (temp/humidity/wind) are inside limits.
Feels like (AU) is always calculated; I could not find and limits.
The 'hide irrelevant fields' option is checked by default.
Missing/invalid fields are displayed as '--' and error fields are displayed as 'error' (translated)

Changed in weather-indicator:
assignee: Panagiotis Skintzos (ph7) → nobody
Joshua Tasker (jtasker) wrote :

All the above mentioned indices have been implemented in the latest release of the 2.0 series!

Changed in weather-indicator:
milestone: foggy → 13.05.17
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers