wttr.in
wttr.in copied to clipboard
City name and US ZIP code both ambiguous
Both my city name and US ZIP code are ambiguous, and default to locations other than my own.
For example, this result appears to represent Gloucester, UK instead of Gloucester, Massachusetts:
~ % curl wttr.in/Gloucester | grep Location
Location: Gloucester [51.86568,-2.2431]
And my US zip code of 01930 appears to represent a location in Turkey:
~ % curl wttr.in/01930 | grep Location
Location: Fatih Sultan Mehmet Mahallesi, Ceyhan, Adana, Akdeniz Bölgesi, 01930, Türkiye [37.03948962727272,35.82086093636364]
Is there any way for me to work around this? Using the nearest airports are not desirable as they are too far away to accurately represent the weather.
Yes. Try to add ,MA to the location name:
$ curl -ks https://wttr.in/Gloucester,MA | grep Location:
Location: Gloucester, Essex County, Massachusetts, United States [42.6159286,-70.6619888]
Is there a way to tell wttr "this is a US ZIP code", so that wttr doesn't have to guess?
Yes. Try to add
,MAto the location name:$ curl -ks https://wttr.in/Gloucester,MA | grep Location: Location: Gloucester, Essex County, Massachusetts, United States [42.6159286,-70.6619888]
This works. I swear I tried this but I must have missed it. Thanks very much.
Is there a way to tell wttr "this is a US ZIP code", so that wttr doesn't have to guess?
I'd also like to know if this might be possible, so that postal codes that may be shared in different regions can be disambiguated.