Iso3166 values are not valid to the current specification

  • 2
  • Problem
  • Updated 7 years ago
The country_iso3166 parameter returned by the API is not always valid to the current specification.

http://www.iso.org/iso/iso-3166-1_dec...

For example, the Weather Api returned the iso3166 for Lhasa, Tibet as "TB". Notice that "TB" isn't actually allocated to anything.
Photo of TFWEATHER

TFWEATHER

  • 4 Posts
  • 1 Reply Like

Posted 7 years ago

  • 2
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
We've added our ISO matching to our docs. We fill in a country code for all locations. The example of Tibet doesn't even have an ISO code, so we use our own. You can find the matching of our country codes to ISO's here: http://www.wunderground.com/weather/a...
Photo of TFWEATHER

TFWEATHER

  • 4 Posts
  • 1 Reply Like
Thanks for making that more clear, but this is still weird. Your table shows "TB = TB". But as you just said, Tibet doesn't have an ISO code, so your table is misleading. Also, are we talking about the value of "country" or "country_iso3166"? It sounds like you're talking about the value of "country". You guys really should be following the ISO3166 standard more closely and update it as there are changes, or should no longer call it ISO3166. If you guys want to have a Wunderground country code for Tibet that's fine, don't have a value for the country_iso3166 for it. It makes it more difficult to implement caching and normalization if what is to be expected isn't actually returned.