It is currently April 24th, 2024, 9:15 am

Where to find location codes?

General topics related to Rainmeter.
bluenite
Posts: 8
Joined: May 17th, 2016, 1:32 pm
Location: Prague

Where to find location codes?

Post by bluenite »

There are other places than https://weather.codes/ ?
Not always see those that I have preset.
thanks for the help
Peter
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Where to find location codes?

Post by jsmorley »

Weather codes for what feed?

For https://wxdata.weather.com/wxdata/weather/local/, which is probably the best and most reliable RSS / XML format feed out there right now, I recommend:

http://wxdata.weather.com/wxdata/search/search?where=YourCityName

So for instance for me:

http://wxdata.weather.com/wxdata/search/search?where=Fort Hunt, Virginia

Which will end up as:

http://wxdata.weather.com/wxdata/search/search?where=Fort%20Hunt,%20Virginia

Would return:

Code: Select all

<search ver="3.0">
<loc id="USVA0944" type="1">Fort Hunt, VA</loc>
</search>
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Where to find location codes?

Post by jsmorley »

Code: Select all

[Variables]
; LocationCode can be obtained at http://wxdata.weather.com/wxdata/search/search?where=YourCityName
LocationCode=USVA0944
; UnitOfMeasure can be "f" (Fahrenheit / Imperial) or "m" (Celsius / Metric)
UnitOfMeasure=f
; Number of days to return in the feed.(1-6)
DaysFeed=6
; Locale (language) to use in the feed.
; https://msdn.microsoft.com/en-us/goglobal/bb896001.aspx
; Note that Weather.com uses "_" underline instead of "-" dash in the codes.
Locale=en_US

Code: Select all

[WeatherParent]
Measure=Plugin
Plugin=WebParser
URL=https://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=#DaysFeed#&locale=#Locale#
User avatar
SullyPanda
Posts: 3
Joined: September 25th, 2018, 12:29 pm

Re: Where to find location codes?

Post by SullyPanda »

Need new source:

This service is deprecated as of 01/15/2020
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Where to find location codes?

Post by jsmorley »

SullyPanda wrote: May 31st, 2020, 2:54 pm Need new source:

This service is deprecated as of 01/15/2020
https://forum.rainmeter.net/viewtopic.php?f=118&t=34714#p171987