Localization Failure: Temperature is Hard

The Guardian is one of my favorite news sources. I’m a subscriber (support news organizations!) and I read it daily. But it is not immune to errors, as this headline shows:

Record heat: Malawi swelters with temperatures nearly 68F above average

68 °F above average is a lot. For a tropical country it is not credible for temperatures to be that much warmer than average because the average is too high to give enough headroom. So what gives?

Reading the article I found this:

parts of Malawi saw a maximum temperature of 43C (109F), compared with an average of nearly 25C (77F)

As I expected the actual temperature increase was 32 °F, not 68 °F. So what’s up with that headline? Here’s a hint: this is what the headline might say if you set your location to somewhere other than the United States:

Malawi swelters in record heat with temperatures nearly 20C above average

Now “nearly 20C” is an odd way of saying “18 °C”, but I guess they really like round numbers, and that’s not the problem. The problem is that somebody – the localization team? an algorithm? – decided that 20 °C was equivalent to 68 °F. And they’re not wrong. And yet they are.

When converting from a temperature in Celsius to one in Fahrenheit you have to multiply by 1.8 (because each degree Celsius covers a range 1.8 times as large as a degree Fahrenheit) and you have to add 32 °F (because the freezing point in Fahrenheit is 32, compared to 0 in Celsius). However if you are converting a temperature difference you just multiply by 1.8.

That is, if the temperature goes up by 1 °C then it has gone up by 1.8 °F. If it goes up by 10 °C then it has gone up by 18 °F. If it goes up by 20 °C then it has gone up by 36 °F. Adding 32 °F in this context is just wrong.

This is just another version of the fallacy involved when somebody says that it is “twice as hot” when the temperature goes from 5 °C to 10 °C – note that this is equivalent to going from 278 K to 283 K, or 41 °F to 50 °F, so clearly not “twice as hot” in any meaningful way.

In short, translating 20 °C requires examining the context and there are at least three possible translations:

  • “The temperature is 20 °C” translates to “The temperature is 68 °F”
  • “It’s 20 °C warmer than yesterday” translates to “It’s 36 °F warmer than yesterday”
  • “The temperature is minus 20 °C” translates to “The temperature is minus 4 °F”

So 20 °C is either 68 °F, 36 °F, or (minus) 4 °F.

Reported here:

https://twitter.com/BruceDawson0xB/status/1714406661904007624

Hacker news discussion here.

About brucedawson

I'm a programmer, working for Google, focusing on optimization and reliability. Nothing's more fun than making code run 10x as fast. Unless it's eliminating large numbers of bugs. I also unicycle. And play (ice) hockey. And sled hockey. And juggle. And worry about whether this blog should have been called randomutf-8. 2010s in review tells more: https://twitter.com/BruceDawson0xB/status/1212101533015298048
This entry was posted in Math, metric, Rants and tagged , , . Bookmark the permalink.

5 Responses to Localization Failure: Temperature is Hard

  1. anon says:

    Two mistakes at the end. 20°C is 68°F, not 78°F

  2. another anon says:

    And the unit for absolute temperature is kelvin, not degrees Kelvin. So from 278 K to 283 K.

  3. Severin Pappadeux says:

    Affine transformation is not linear transformation

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.