It is currently March 28th, 2024, 2:25 pm

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ weather.com - Parsing the JSON

Post by jsmorley »

SCR wrote: March 27th, 2020, 12:45 pm Wow, OK. If you don't mind checking what are you showing for my location USNY1233? I am showing Wind: 7 mph- Gust: 0 mph at 8:40 EDT.
for USNY1233 I am showing 10mph wind and 0mph gust at 9:03 EDT.
SCR
Posts: 60
Joined: April 15th, 2015, 11:13 pm

Re: ⭐ weather.com - Parsing the JSON

Post by SCR »

This discussion got my curiosity going about how a wind "gust" is determined. So I did some quick research.
It is generally reported in METAR when the peak wind speed reaches at least 16 knots and the variation in wind speed between the peaks and average wind is at least 9 to 10 knots.[1][3] In marine meteorology, the top speed of a burst is expressed in meters per second (m/s) or in knots, while the Beaufort scale is used for reporting the mean speed. When the maximum speed exceeds the average speed by 10 to 15 knots, the term gusts is used while strong gusts is used for departure of 15 to 25 knots, and violent gusts when it exceeds 25 knots.[3]
Source: https://en.wikipedia.org/wiki/Wind_gust
SCR
Posts: 60
Joined: April 15th, 2015, 11:13 pm

Re: ⭐ weather.com - Parsing the JSON

Post by SCR »

jsmorley wrote: March 27th, 2020, 1:04 pm for USNY1233 I am showing 10mph wind and 0mph gust at 9:03 EDT.
Thanks. That's exactly what I see.

I am curious to know what balala is seeing.
User avatar
Sabertooth
Posts: 31
Joined: April 5th, 2010, 5:09 am

Re: ⭐ weather.com - Parsing the JSON

Post by Sabertooth »

SCR wrote: March 27th, 2020, 12:45 pm Wow, OK. If you don't mind checking what are you showing for my location USNY1233? I am showing Wind: 7 mph- Gust: 0 mph at 8:40 EDT.
USNY1233 comes up null at 9:13a EDT:
2020-03-27 (5).png
Location code is in the Variables include. I doubt I'd get any values if that was wrong.
2020-03-27 (4).png
Returning nulls: USNY1233, USVA0944, USAL0332, 11762, 33418, 22308 between 9:13a and 9:20a. I have not modified any of the files besides the location code.

Another weather source shows Wind at 5 and Gusts to 6 mph for my area. Saying there are no gusts here just doesn't make any sense. That would be exceptionally rare. Using the old weather.com regex there was ALWAYS wind gusts. Doesn't seem like anything can be done so no need to beat a dead horse.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ⭐ weather.com - Parsing the JSON

Post by balala »

SCR wrote: March 27th, 2020, 12:45 pm If you don't mind checking what are you showing for my location USNY1233? I am showing Wind: 7 mph- Gust: 0 mph at 8:40 EDT.
Sorry, just realized I messed up something here. Fixed it in meantime.
Right now I have this: Speed: 10, Gust: 0 (empty).
Sorry for the confusion I created.
User avatar
Sabertooth
Posts: 31
Joined: April 5th, 2010, 5:09 am

Re: ⭐ weather.com - Parsing the JSON

Post by Sabertooth »

balala wrote: March 27th, 2020, 1:31 pm Sorry, just realized I messed up something here. Fixed it in meantime.
Right now I have this: Speed: 10, Gust: 0 (empty).
Sorry for the confusion I created.
Empty isn't a zero, it's a null. If it was zero, the string value would be zero like shows for current precipitation in the previous image.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ⭐ weather.com - Parsing the JSON

Post by balala »

Sabertooth wrote: March 27th, 2020, 1:35 pm Empty isn't a zero, it's a null. If it was zero, the string value would be zero like shows for current precipitation in the previous image.
Agree. That's why I said:
balala wrote: March 27th, 2020, 1:31 pm Gust: 0 (empty).
User avatar
Sabertooth
Posts: 31
Joined: April 5th, 2010, 5:09 am

Re: ⭐ weather.com - Parsing the JSON

Post by Sabertooth »

balala wrote: March 27th, 2020, 1:39 pm Agree. That's why I said:
Removing the null substitution from the Variables include
2020-03-27 (6).png
My updated Weather Slider (it can be collapsed to a tag on the edge of the screen):
2020-03-27 (9).png
Last edited by Sabertooth on March 27th, 2020, 3:09 pm, edited 1 time in total.
SCR
Posts: 60
Joined: April 15th, 2015, 11:13 pm

Re: ⭐ weather.com - Parsing the JSON

Post by SCR »

balala wrote: March 27th, 2020, 1:31 pm Sorry, just realized I messed up something here. Fixed it in meantime.
Right now I have this: Speed: 10, Gust: 0 (empty).
Sorry for the confusion I created.
No Need to apologize balala. My Rainmeter skills are "null" in comparison to yours.

I still believe that if the OP waits long enough they will eventually see a wind "Gust" reading.

It is true that I use the substitution for the Wind "gust" measure. I use it because I don't like blank spaces on my Weather skin. My bad for stating that the results I found were "0" rather then "null" :oops:
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ⭐ weather.com - Parsing the JSON

Post by balala »

SCR wrote: March 27th, 2020, 2:47 pm I still believe that if the OP waits long enough they will eventually see a wind "Gust" reading.
For sure.
Post Reply