It is currently March 28th, 2024, 1:08 pm

NOAA Space Weather

General topics related to Rainmeter.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

NOAA Space Weather

Post by PtitChat107 »

Hi,
I wanted to know if someone had already tried to retrieve the latest observed information "Space Weather Conditions" (http://www.swpc.noaa.gov/communities/space-weather-enthusiasts); I tried to test with RainRegEx but it did not give anything; the data remains the same while on the sites they are updated every 10 seconds approximately.

Here's how I see the display:

Geomagnet. Storm: R (none)
------------------------------------------
Solar Radiation: S1 (minor)
------------------------------------------
Radio Blackouts: G3 (strong)
------------------------------------------
Solar Wind: %1 km/sec

The "separators" could have different color levels as for the idea I had about the uv index (https://forum.rainmeter.net/viewtopic.php?f=5&t=26593)

If the idea pleases someone, do not hesitate to take it for your project :)
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: NOAA Space Weather

Post by PtitChat107 »

I will respond to myself, sorry for the double post but I think I have already found a solution for the latest observable data: http://services.swpc.noaa.gov/products/noaa-scales.json. Data "G", "R" and "S" are present and updated every minute; it is enough to adapt the display of the skin so that it can look like the screen I published on my previous message :)

For the solar wind I'm still looking, I'm good to fall on it where it has the data sought but I find it complicated! 8-)
http://services.swpc.noaa.gov/products/geospace/propagated-solar-wind.json
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NOAA Space Weather

Post by balala »

PtitChat107 wrote:I tried to test with RainRegEx but it did not give anything; the data remains the same while on the sites they are updated every 10 seconds approximately.
Didn't give anything, or the returned data is never updated? Because the data parsed by RainRegExp is never changing, for this you have to reload the site.
However, I'd be tempted to say you can't use that site, because it uses some java scripts, which can't be handled by the WebParser plugin.
But could you please post the code you have so far? Just to check...
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: NOAA Space Weather

Post by PtitChat107 »

balala wrote:But could you please post the code you have so far? Just to check...
I meant that the software did not return any data, I should have been clearer. Here is the code I wanted to use more I will directly use the json file, it will probably be much simpler :)

Code: Select all

[measureNOAA]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=20
Url=http://www.swpc.noaa.gov/noaa-scales-explanation
RegExp=(?siU).*<div class="noaa_scale_value day_0 scale_R noaa_scale_fg_0">(.*)</div>.*,.*<div class="noaa_scale_description day_0 scale_R">(.*)</div>,.*<div class="noaa_scale_value day_0 scale_S noaa_scale_fg_1">(.*)</div>,.*<div class="noaa_scale_description day_0 scale_S">(.*)</div>,.*<div class="noaa_scale_value day_0 scale_G noaa_scale_fg_1">(.*)</div>,.*<div class="noaa_scale_description day_0 scale_G">(.*)</div>,

[MeasureNOAA1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureNOAA]
StringIndex=1
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NOAA Space Weather

Post by balala »

PtitChat107 wrote:more I will directly use the json file, it will probably be much simpler :)
Exactly. Just download the file with a WebParser plugin measure and use another one (or more) measure, to get the needed information. I suppose you know how to do this. Are you?
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: NOAA Space Weather

Post by PtitChat107 »

I will try to my side, this post was just to inform people that it might be possible to retrieve this kind of info; for the rest I will try to get by to get there.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NOAA Space Weather

Post by balala »

PtitChat107 wrote:I will try to my side,
Ok, let me (us) know if you have any question.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: NOAA Space Weather

Post by PtitChat107 »

I have already succeeded in capturing the line "0", the one that dates today; but after filtering the right elements I am still looking for a solution since the names all look alike ( (?siU).*"0"(.*),"1":.* ). I do not lose hope to find the solution lol
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NOAA Space Weather

Post by balala »

PtitChat107 wrote:I have already succeeded in capturing the line "0", the one that dates today; but after filtering the right elements I am still looking for a solution since the names all look alike ( (?siU).*"0"(.*),"1":.* ). I do not lose hope to find the solution lol
The just downloaded propagated-solar-wind.json file has a lot of information, being very hard to follow its content. I'd say that you should analyze the following structures: ["2017-09-08 12:26:00.000","750.9","3.88","19797","4.36","-0.63","-15.20","15.84","-750.9","5.9","4.9","2017-09-08 12:53:58.000"] (this is a piece of information, copied from the downloaded file). In this structure, after the date and time, probably the numbers follow each others in a specific order. I think you should find what each of those numbers, means. Probably the first one is the solar wind speed and so on. Probably won't be an easy task...
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: NOAA Space Weather

Post by PtitChat107 »

balala wrote:The just downloaded propagated-solar-wind.json file has a lot of information
From what I understand for this file, the most recent information is at the end of the file; for the wind it is the line "1" in each part but I think for the wind I will put this idea aside and concentrate on the other file json; the one I had in mind to retrieve the information I was telling you just before.
Post Reply