From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wunderground PWS data plotting on labview

HelloNiworld,

 

 Would like help making a .vi that plots a temperature vs time graph, like the one shown, from a PWS that Wunderground.com provides. 

I want that upon running it asks me for the PWS string, example string: 

KTOAALTA2 - https://www.wunderground.com/personal-weather-station/dashboard?ID=KTOAALTA2#history

 

 

Capture.PNG

 

0 Kudos
Message 1 of 11
(4,052 Views)

I believe Wunderground has some kind of API.  I don't know if it is for weather station data or what, but that's homework assignment #1 for you: Learn about the Wunderground API and see if it applies to what you are doing.

 

If it does, then you have to figure out how to access the data you need.  If not, you'll probably have to scrape that web page.  In short, you need to know what you need to do before you even try to figure out how to do it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 11
(4,036 Views)

Yes i have the key for the api and have data.

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "conditions": 1
  }
    }
  , "current_observation": {
        "image": {
        "url":"http://icons.wxug.com/graphics/wu2/logo_130x80.png",
        "title":"Weather Underground",
        "link":"http://www.wunderground.com"
        },
        "display_location": {
        "full":"London, United Kingdom",
        "city":"London",
        "state":"",
        "state_name":"United Kingdom",
        "country":"UK",
        "country_iso3166":"GB",
        "zip":"00000",
        "magic":"1",
        "wmo":"03772",
        "latitude":"51.47999954",
        "longitude":"-0.44999999",
        "elevation":"24.00000000"
        },
        "observation_location": {
        "full":"London, ",
        "city":"London",
        "state":"",
        "country":"UK",
        "country_iso3166":"GB",
        "latitude":"51.47750092",
        "longitude":"-0.46138901",
        "elevation":"79 ft"
        },
        "estimated": {
        },
        "station_id":"EGLL",
        "observation_time":"Last Updated on October 23, 5:50 AM BST",
        "observation_time_rfc822":"Fri, 23 Oct 2015 05:50:00 +0100",
        "observation_epoch":"1445575800",
        "local_time_rfc822":"Fri, 23 Oct 2015 06:13:53 +0100",
        "local_epoch":"1445577233",
        "local_tz_short":"BST",
        "local_tz_long":"Europe/London",
        "local_tz_offset":"+0100",
        "weather":"Overcast",
        "temperature_string":"50 F (10 C)",
        "temp_f":50,
        "temp_c":10,
        "relative_humidity":"87%",
        "wind_string":"From the Variable at 4 MPH",
        "wind_dir":"Variable",
        "wind_degrees":0,
        "wind_mph":4,
        "wind_gust_mph":0,
        "wind_kph":6,
        "wind_gust_kph":0,
        "pressure_mb":"1022",
        "pressure_in":"30.18",
        "pressure_trend":"0",
        "dewpoint_string":"46 F (8 C)",
        "dewpoint_f":46,
        "dewpoint_c":8,
        "heat_index_string":"NA",
        "heat_index_f":"NA",
        "heat_index_c":"NA",
        "windchill_string":"NA",
        "windchill_f":"NA",
        "windchill_c":"NA",
        "feelslike_string":"50 F (10 C)",
        "feelslike_f":"50",
        "feelslike_c":"10",
        "visibility_mi":"6.2",
        "visibility_km":"10.0",
        "solarradiation":"--",
        "UV":"0","precip_1hr_string":"-9999.00 in (-9999.00 mm)",
        "precip_1hr_in":"-9999.00",
        "precip_1hr_metric":"--",
        "precip_today_string":"0.00 in (0.0 mm)",
        "precip_today_in":"0.00",
        "precip_today_metric":"0.0",
        "icon":"cloudy",
        "icon_url":"http://icons.wxug.com/i/c/k/nt_cloudy.gif",
        "forecast_url":"http://www.wunderground.com/global/stations/03772.html",
        "history_url":"http://www.wunderground.com/history/airport/EGLL/2015/10/23/DailyHistory.html",
        "ob_url":"http://www.wunderground.com/cgi-bin/findweather/getForecast?query=51.47750092,-0.46138901",
        "nowcast":""
    }
}

 

 

.Look at all of that glorious weather data. 

0 Kudos
Message 3 of 11
(4,024 Views)

@lghr95 wrote:

 

I want that upon running it asks me for the PWS string, example string: 


What is "it" that asks you for the string?

 

If it is the LabVIEW program you are showing, we probably would need to see some code. All you need to do is a properly formatted web request to return the data you show, parse out the interesting fields, and send them to a chart. Repeat at reasonable regular intervals.

0 Kudos
Message 4 of 11
(4,018 Views)

thanks for your reply, take a look at this post, https://forums.ni.com/t5/Community-Documents/Local-Weather-Browser/ta-p/3513146

 

And download and run this from that page https://forums.ni.com/ni/attachments/ni/3044/3504/2/Weather.zip

 

I want to do something similar to what he has done but a little bit more simple and instead of asking me for the pws code have it already "get data" when running. 

 

 

0 Kudos
Message 5 of 11
(4,000 Views)

Well, just gut that program, remove the unwanted parts, and replace them with diagram constants containing the right values.

0 Kudos
Message 6 of 11
(3,992 Views)

overview of how? i mean how do i check the actual programming on labview? all i see is the visual blocks of the programs how would i go about assigning the constants instead of asking for input

0 Kudos
Message 7 of 11
(3,982 Views)

I found this but I'm having this trouble Screen Shot 2017-05-06 at 10.42.29 PM.pngScreen Shot 2017-05-06 at 10.42.34 PM.png

 

Weather Program 2012.zip ‏57 KB

0 Kudos
Message 8 of 11
(3,971 Views)

@lghr95 wrote:

I found this but I'm having this trouble Screen Shot 2017-05-06 at 10.42.29 PM.pngScreen Shot 2017-05-06 at 10.42.34 PM.png

 

Weather Program 2012.zip ‏57 KB


Check here for more info.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 11
(3,910 Views)

@lghr95 wrote:

overview of how? i mean how do i check the actual programming on labview? all i see is the visual blocks of the programs how would i go about assigning the constants instead of asking for input


The "visual blocks" are the program! Obviously you have absolutely no idea what LabVIEW actually is.

 

At this point you should start with some tutorials and online courses. Alternatively you could hire somebody to write the program for you.

 

(...and about that other program. The "internet toolkit" is pretty much obsolete. You don't need it for the required functionality.)

0 Kudos
Message 10 of 11
(3,898 Views)