chubin / wttr.in

:partly_sunny: The right way to check the weather
https://wttr.in
Apache License 2.0
24.1k stars 1.08k forks source link

City name and US ZIP code both ambiguous #773

Open pneumic opened 1 year ago

pneumic commented 1 year ago

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.

chubin commented 1 year ago

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]
eminence commented 1 year ago

Is there a way to tell wttr "this is a US ZIP code", so that wttr doesn't have to guess?

pneumic commented 1 year ago

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]

This works. I swear I tried this but I must have missed it. Thanks very much.

paulrudy commented 1 month ago

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.