It is currently June 16th, 2024, 5:21 am

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by mak_kawa »

Hi Yincognito

Thank you for clarification. I didn't know about METAR.

The cloud ceiling is constantly returned from Weather.com JSON for my country (East Asia, not US), for example now 6705 m (calculated) besides 1676 m in AccuWeather API. What a difference! O.O I feel "6705 m" is unnaturally too high, looking the sky over my house. :-). Maybe the observation tool (or method?) for my location is not accurate even irresponsible?!
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Yincognito wrote: June 9th, 2020, 12:02 pm Here, maybe?
Yeah, that looks like the one.

The .zip that Mimi33333 sent looks like she might have hacked it up some trying to get the weather to work, and good on her for that. So now my question to her is, do you want the appearance and functionality from the original skin on deviantART, and just want us to help get the weather portion of it working again, or are there appearance and / or functionality changes you actually intend?
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

mak_kawa wrote: June 9th, 2020, 12:08 pm Hi Yincognito

Thank you for clarification. I didn't know about METAR.

The cloud ceiling is constantly returned from Weather.com JSON for my country (East Asia, not US), for example now 6705 m (calculated) besides 1676 m in AccuWeather API. What a difference! O.O I feel "6705 m" is unnaturally too high, looking the sky over my house. :-). Maybe the observation tool (or method?) for my location is not accurate even irresponsible?!
https://www.flymac.co.uk/how-to-estimate-cloud-bases-and-heights/

Currently my skies are clear, so cloudCeiling is returning null, but based on that formula (temp-dewpoint) / 2.5 * 1000 my ceiling is estimated at 6,000 feet. That doesn't sound out of line to me.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by mak_kawa »

Hi jsmorley

It's formula, not observation...surprised.
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

mak_kawa wrote: June 9th, 2020, 12:17 pm Hi jsmorley

It's formula, not observation...surprised.
I expect it is, as the only other method is to triangulate with two fixed points on the ground set at a defined distance from each other. I doubt that they have that set up in the 900,000 locations weather.com "observes".
User avatar
Yincognito
Rainmeter Sage
Posts: 7430
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Yincognito »

jsmorley wrote: June 9th, 2020, 12:14 pm https://www.flymac.co.uk/how-to-estimate-cloud-bases-and-heights/

Currently my skies are clear, so cloudCeiling is returning null, but based on that formula (temp-dewpoint) / 2.5 * 1000 my ceiling is estimated at 6,000 feet. That doesn't sound out of line to me.
Wow, that's really interesting - didn't know it was that easy to calculate it. :jawdrop
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Yincognito wrote: June 9th, 2020, 12:25 pm Wow, that's really interesting - didn't know it was that easy to calculate it. :jawdrop
Yeah, there are two formulas there. One to estimate the "ceiling" or in other words the base of the clouds from the ground, and another to estimate the "height" of the clouds, or in other words from the bottom of the cloud base to the top. Both are surprisingly simple, both are very important to pilots.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by mak_kawa »

Hi jsmorley and Yincognito

I too calculated cloud ceiling using that formula. Current temp=16.7 (celsius), dew point=12.8, and elevation of the location=55 m. So, cloud ceiling is calculated as 1610 m. This value is more relevant than 7620 m from JSON item. O.O
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

mak_kawa wrote: June 9th, 2020, 12:38 pm Hi jsmorley and Yincognito

I too calculated cloud ceiling using that formula. Current temp=16.7 (celsius), dew point=12.8, and elevation of the location=55 m. So, cloud ceiling is calculated as 1610 m. This value is more relevant than 7620 m from JSON item. O.O
Dunno... I decided against parsing out that bit of information, as I don't know for sure what method they are using for figuring it out, and in any case it isn't of much value unless there are actually big, thick cumulus clouds and such. A good bit of the time the value is "null" in the JSON, even when there are some wispy clouds around or things are just overcast. In any case, the dew point can be the same as the temperature if the air is fully saturated, and while that might well mean it's really misty, foggy or even just raining, it doesn't mean your house is in a cloud. I just don't see it of a lot of value really.
User avatar
Yincognito
Rainmeter Sage
Posts: 7430
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Yincognito »

Yep, indeed - I didn't parse the item either, as I only focused on the items that were common to V2 and V3 (so that my approach parsing either within the same skin / regex could work). In the end, even weather.com doesn't always have that data in the JSON, depending on location / language, so trying to get it is not going to offer consistent results anyway... :confused:

P.S. This is why I didn't try again to parse the moon days (I used to parse them when getting the source from wxdata), despite them being present in V3 (but not V2, for example).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth