This looks more complicated than I thought. I am trying to sift through a bunch of JSON or XML data and then pull out the nuggets, sending the pertinent values to the spark core for processing. Eventually, I’d like to make decisions in the cloud before sending commands to the core but for now the logic is fully on the core. The response looks like this (huge).
All I want is the qpf in U.S. units and the pop for each of the next three hours. Will this help me do that? I’ll buy cookies for anyone who can step me through this
OMG - the response is so big that it won’t let me post all of the response here so I had to shorten it - quite simply, it goes way too many hours into the future to be really useful at this point.
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"hourly": 1
}
}
,
"hourly_forecast": [
{
"FCTTIME": {
"hour": "23","hour_padded": "23","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "22","mday_padded": "22","yday": "294","isdst": "1","epoch": "1382497200","pretty": "11:00 PM EDT on October 22, 2013","civil": "11:00 PM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Tuesday","weekday_name_night": "Tuesday Night","weekday_name_abbrev": "Tue","weekday_name_unlang": "Tuesday","weekday_name_night_unlang": "Tuesday Night","ampm": "PM","tz": "","age": ""
},
"temp": {"english": "48", "metric": "9"},
"dewpoint": {"english": "34", "metric": "1"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_chancerain.gif",
"fctcode": "12",
"sky": "86",
"wspd": {"english": "2", "metric": "3"},
"wdir": {"dir": "NE", "degrees": "45"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "56",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "48", "metric": "9"},
"qpf": {"english": "0.01", "metric": "0.25"},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.86", "metric": "1011"}
}
,
{
"FCTTIME": {
"hour": "0","hour_padded": "00","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382500800","pretty": "12:00 AM EDT on October 23, 2013","civil": "12:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "46", "metric": "8"},
"dewpoint": {"english": "35", "metric": "1"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_chancerain.gif",
"fctcode": "12",
"sky": "86",
"wspd": {"english": "2", "metric": "4"},
"wdir": {"dir": "NE", "degrees": "45"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "64",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "46", "metric": "8"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.86", "metric": "1011"}
}
,
{
"FCTTIME": {
"hour": "1","hour_padded": "01","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382504400","pretty": "1:00 AM EDT on October 23, 2013","civil": "1:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "45", "metric": "7"},
"dewpoint": {"english": "35", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_chancerain.gif",
"fctcode": "12",
"sky": "86",
"wspd": {"english": "3", "metric": "4"},
"wdir": {"dir": "NE", "degrees": "45"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "71",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "45", "metric": "7"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.86", "metric": "1011"}
}
,
{
"FCTTIME": {
"hour": "2","hour_padded": "02","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382508000","pretty": "2:00 AM EDT on October 23, 2013","civil": "2:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "43", "metric": "6"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "97",
"wspd": {"english": "3", "metric": "5"},
"wdir": {"dir": "East", "degrees": "99"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "79",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "43", "metric": "6"},
"qpf": {"english": "0.01", "metric": "0.25"},
"snow": {"english": "0.00", "metric": "0.00"},
"pop": "100",
"mslp": {"english": "29.82", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "3","hour_padded": "03","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382511600","pretty": "3:00 AM EDT on October 23, 2013","civil": "3:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "41", "metric": "5"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "97",
"wspd": {"english": "4", "metric": "6"},
"wdir": {"dir": "East", "degrees": "99"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "83",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "41", "metric": "5"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.82", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "4","hour_padded": "04","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382515200","pretty": "4:00 AM EDT on October 23, 2013","civil": "4:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "39", "metric": "4"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "97",
"wspd": {"english": "4", "metric": "7"},
"wdir": {"dir": "East", "degrees": "99"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "88",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "39", "metric": "4"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.82", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "5","hour_padded": "05","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382518800","pretty": "5:00 AM EDT on October 23, 2013","civil": "5:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "37", "metric": "3"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "98",
"wspd": {"english": "5", "metric": "8"},
"wdir": {"dir": "NE", "degrees": "50"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "92",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "37", "metric": "3"},
"qpf": {"english": "0.07", "metric": "1.78"},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.80", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "6","hour_padded": "06","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382522400","pretty": "6:00 AM EDT on October 23, 2013","civil": "6:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "38", "metric": "3"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "98",
"wspd": {"english": "6", "metric": "9"},
"wdir": {"dir": "NE", "degrees": "50"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "90",
"windchill": {"english": "-6654", "metric": "-6665"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "38", "metric": "3"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.80", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "7","hour_padded": "07","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382526000","pretty": "7:00 AM EDT on October 23, 2013","civil": "7:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "38", "metric": "4"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Rain",
"icon": "rain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/nt_rain.gif",
"fctcode": "13",
"sky": "98",
"wspd": {"english": "6", "metric": "10"},
"wdir": {"dir": "NE", "degrees": "50"},
"wx": "Definite Light Rain",
"uvi": "0",
"humidity": "89",
"windchill": {"english": "-3309", "metric": "-3331"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "38", "metric": "4"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.80", "metric": "1009"}
}
,
{
"FCTTIME": {
"hour": "8","hour_padded": "08","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382529600","pretty": "8:00 AM EDT on October 23, 2013","civil": "8:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "39", "metric": "4"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "99",
"wspd": {"english": "7", "metric": "11"},
"wdir": {"dir": "NNW", "degrees": "339"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "87",
"windchill": {"english": "34", "metric": "1"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "34", "metric": "1"},
"qpf": {"english": "0.07", "metric": "1.78"},
"snow": {"english": "0.00", "metric": "0.00"},
"pop": "100",
"mslp": {"english": "29.85", "metric": "1010"}
}
,
{
"FCTTIME": {
"hour": "9","hour_padded": "09","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382533200","pretty": "9:00 AM EDT on October 23, 2013","civil": "9:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "40", "metric": "5"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "99",
"wspd": {"english": "8", "metric": "13"},
"wdir": {"dir": "NNW", "degrees": "339"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "82",
"windchill": {"english": "-3309", "metric": "-3331"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "40", "metric": "5"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.85", "metric": "1010"}
}
,
{
"FCTTIME": {
"hour": "10","hour_padded": "10","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382536800","pretty": "10:00 AM EDT on October 23, 2013","civil": "10:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "42", "metric": "5"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "99",
"wspd": {"english": "9", "metric": "14"},
"wdir": {"dir": "NNW", "degrees": "339"},
"wx": "Chance of Light Rain",
"uvi": "0",
"humidity": "77",
"windchill": {"english": "-6654", "metric": "-6665"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "42", "metric": "5"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "100",
"mslp": {"english": "29.85", "metric": "1010"}
}
,
{
"FCTTIME": {
"hour": "11","hour_padded": "11","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382540400","pretty": "11:00 AM EDT on October 23, 2013","civil": "11:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "43", "metric": "6"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "81",
"wspd": {"english": "10", "metric": "16"},
"wdir": {"dir": "NW", "degrees": "319"},
"wx": "Slight Chance Light Rain",
"uvi": "1",
"humidity": "72",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "43", "metric": "6"},
"qpf": {"english": "0.03", "metric": "0.76"},
"snow": {"english": "", "metric": ""},
"pop": "60",
"mslp": {"english": "29.93", "metric": "1013"}
}
,
{
"FCTTIME": {
"hour": "12","hour_padded": "12","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "23","mday_padded": "23","yday": "295","isdst": "1","epoch": "1382544000","pretty": "12:00 PM EDT on October 23, 2013","civil": "12:00 PM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Wednesday","weekday_name_night": "Wednesday Night","weekday_name_abbrev": "Wed","weekday_name_unlang": "Wednesday","weekday_name_night_unlang": "Wednesday Night","ampm": "PM","tz": "","age": ""
},
"temp": {"english": "45", "metric": "7"},
"dewpoint": {"english": "36", "metric": "2"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "81",
"wspd": {"english": "11", "metric": "18"},
"wdir": {"dir": "NW", "degrees": "319"},
"wx": "Slight Chance Light Rain",
"uvi": "1",
"humidity": "67",
"windchill": {"english": "-9998", "metric": "-9998"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "45", "metric": "7"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "60",
"mslp": {"english": "29.93", "metric": "1013"}
}
,
{
"FCTTIME": {
"hour": "10","hour_padded": "10","min": "00","sec": "0","year": "2013","mon": "10","mon_padded": "10","mon_abbrev": "Oct","mday": "24","mday_padded": "24","yday": "296","isdst": "1","epoch": "1382623200","pretty": "10:00 AM EDT on October 24, 2013","civil": "10:00 AM","month_name": "October","month_name_abbrev": "Oct","weekday_name": "Thursday","weekday_name_night": "Thursday Night","weekday_name_abbrev": "Thu","weekday_name_unlang": "Thursday","weekday_name_night_unlang": "Thursday Night","ampm": "AM","tz": "","age": ""
},
"temp": {"english": "41", "metric": "5"},
"dewpoint": {"english": "30", "metric": "0"},
"condition": "Chance of Rain",
"icon": "chancerain",
"icon_url":"http://icons-ak.wxug.com/i/c/k/chancerain.gif",
"fctcode": "12",
"sky": "59",
"wspd": {"english": "9", "metric": "14"},
"wdir": {"dir": "West", "degrees": "259"},
"wx": "Slight Chance Light Snow Showers , Areas of Frost",
"uvi": "0",
"humidity": "65",
"windchill": {"english": "-6654", "metric": "-6665"},
"heatindex": {"english": "-9998", "metric": "-9998"},
"feelslike": {"english": "41", "metric": "5"},
"qpf": {"english": "", "metric": ""},
"snow": {"english": "", "metric": ""},
"pop": "20",
"mslp": {"english": "30.12", "metric": "1020"}
}
]
}