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.
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.
05-06-2017 05:31 PM
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:
05-06-2017 06:02 PM
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.
05-06-2017 06:13 PM
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.
05-06-2017 06:22 PM - edited 05-06-2017 06:23 PM
@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.
05-06-2017 06:30 PM
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.
05-06-2017 07:01 PM
Well, just gut that program, remove the unwanted parts, and replace them with diagram constants containing the right values.
05-06-2017 08:09 PM
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
05-06-2017 09:43 PM - edited 05-06-2017 09:45 PM
05-07-2017 09:38 AM
@lghr95 wrote:
I found this but I'm having this trouble
Weather Program 2012.zip 57 KB
Check here for more info.
05-07-2017 12:28 PM - edited 05-07-2017 12:30 PM
@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.)