Skip to content

Instantly share code, notes, and snippets.

@hartliddell
Last active August 29, 2015 14:15
Show Gist options
  • Save hartliddell/983629e2d1ae71d3f6f2 to your computer and use it in GitHub Desktop.
Save hartliddell/983629e2d1ae71d3f6f2 to your computer and use it in GitHub Desktop.
/*
* Data from WeatherUnderground for
* forecast_for("NY","New York")
*/
{
"response" => {
"version" => "0.1",
"termsofService" => "http://www.wunderground.com/weather/api/d/terms.html",
"features" => {
"forecast" => 1
}
},
"forecast" => {
"txt_forecast" => {
"date" => "9:03 AM EST",
"forecastday" => [
[0] {
"period" => 0,
"icon" => "cloudy",
"icon_url" => "http://icons.wxug.com/i/c/k/cloudy.gif",
"title" => "Tuesday",
"fcttext" => "Cloudy. High 37F. Winds N at 10 to 20 mph.",
"fcttext_metric" => "Cloudy. High 3C. Winds N at 15 to 30 km/h.",
"pop" => "0"
},
[1] {
"period" => 1,
"icon" => "nt_clear",
"icon_url" => "http://icons.wxug.com/i/c/k/nt_clear.gif",
"title" => "Tuesday Night",
"fcttext" => "Mostly clear. Low near 20F. Winds N at 10 to 15 mph.",
"fcttext_metric" => "Partly cloudy skies. Low -6C. Winds N at 15 to 25 km/h.",
"pop" => "0"
},
[2] {
"period" => 2,
"icon" => "clear",
"icon_url" => "http://icons.wxug.com/i/c/k/clear.gif",
"title" => "Wednesday",
"fcttext" => "Except for a few afternoon clouds, mainly sunny. High 31F. Winds NNE at 10 to 15 mph.",
"fcttext_metric" => "Sunny, along with a few afternoon clouds. High around -0C. Winds NNE at 15 to 25 km/h.",
"pop" => "0"
},
[3] {
"period" => 3,
"icon" => "nt_clear",
"icon_url" => "http://icons.wxug.com/i/c/k/nt_clear.gif",
"title" => "Wednesday Night",
"fcttext" => "Mostly clear skies. Flurries or snow showers possible late. Low 21F. Winds light and variable.",
"fcttext_metric" => "Partly cloudy. Flurries or snow showers possible late. Low -6C. Winds light and variable.",
"pop" => "20"
},
[4] {
"period" => 4,
"icon" => "snow",
"icon_url" => "http://icons.wxug.com/i/c/k/snow.gif",
"title" => "Thursday",
"fcttext" => "Snow likely. High 33F. Winds light and variable. Chance of snow 90%. Snow accumulating 1 to 3 inches.",
"fcttext_metric" => "Periods of light snow. High 2C. Winds light and variable. Chance of snow 90%. Snowfall of 2-3cm.",
"pop" => "90"
},
[5] {
"period" => 5,
"icon" => "nt_chancesnow",
"icon_url" => "http://icons.wxug.com/i/c/k/nt_chancesnow.gif",
"title" => "Thursday Night",
"fcttext" => "Intermittent snow showers and windy early. Breaks in the overcast later. Low 17F. Winds NW at 20 to 30 mph. Chance of snow 70%.",
"fcttext_metric" => "Windy. Cloudy skies will become partly cloudy overnight. Low -9C. Winds NW at 30 to 50 km/h.",
"pop" => "70"
},
[6] {
"period" => 6,
"icon" => "clear",
"icon_url" => "http://icons.wxug.com/i/c/k/clear.gif",
"title" => "Friday",
"fcttext" => "Plentiful sunshine. High around 20F. Winds NW at 15 to 25 mph.",
"fcttext_metric" => "Mostly sunny skies. High -6C. Winds NW at 25 to 40 km/h.",
"pop" => "0"
},
[7] {
"period" => 7,
"icon" => "nt_partlycloudy",
"icon_url" => "http://icons.wxug.com/i/c/k/nt_partlycloudy.gif",
"title" => "Friday Night",
"fcttext" => "A few clouds. Low 9F. Winds WNW at 10 to 15 mph.",
"fcttext_metric" => "Partly cloudy. Low -12C. Winds W at 15 to 25 km/h.",
"pop" => "20"
}
]
},
"simpleforecast" => {
"forecastday" => [
[0] {
"date" => {
"epoch" => "1423612800",
"pretty" => "7:00 PM EST on February 10, 2015",
"day" => 10,
"month" => 2,
"year" => 2015,
"yday" => 40,
"hour" => 19,
"min" => "00",
"sec" => 0,
"isdst" => "0",
"monthname" => "February",
"monthname_short" => "Feb",
"weekday_short" => "Tue",
"weekday" => "Tuesday",
"ampm" => "PM",
"tz_short" => "EST",
"tz_long" => "America/New_York"
},
"period" => 1,
"high" => {
"fahrenheit" => "37",
"celsius" => "3"
},
"low" => {
"fahrenheit" => "20",
"celsius" => "-7"
},
"conditions" => "Overcast",
"icon" => "cloudy",
"icon_url" => "http://icons.wxug.com/i/c/k/cloudy.gif",
"skyicon" => "",
"pop" => 0,
"qpf_allday" => {
"in" => 0.0,
"mm" => 0
},
"qpf_day" => {
"in" => 0.0,
"mm" => 0
},
"qpf_night" => {
"in" => 0.0,
"mm" => 0
},
"snow_allday" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_day" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_night" => {
"in" => 0.0,
"cm" => 0.0
},
"maxwind" => {
"mph" => 20,
"kph" => 32,
"dir" => "N",
"degrees" => 9
},
"avewind" => {
"mph" => 14,
"kph" => 23,
"dir" => "N",
"degrees" => 9
},
"avehumidity" => 61,
"maxhumidity" => 0,
"minhumidity" => 0
},
[1] {
"date" => {
"epoch" => "1423699200",
"pretty" => "7:00 PM EST on February 11, 2015",
"day" => 11,
"month" => 2,
"year" => 2015,
"yday" => 41,
"hour" => 19,
"min" => "00",
"sec" => 0,
"isdst" => "0",
"monthname" => "February",
"monthname_short" => "Feb",
"weekday_short" => "Wed",
"weekday" => "Wednesday",
"ampm" => "PM",
"tz_short" => "EST",
"tz_long" => "America/New_York"
},
"period" => 2,
"high" => {
"fahrenheit" => "31",
"celsius" => "-1"
},
"low" => {
"fahrenheit" => "21",
"celsius" => "-6"
},
"conditions" => "Clear",
"icon" => "clear",
"icon_url" => "http://icons.wxug.com/i/c/k/clear.gif",
"skyicon" => "",
"pop" => 0,
"qpf_allday" => {
"in" => 0.0,
"mm" => 0
},
"qpf_day" => {
"in" => 0.0,
"mm" => 0
},
"qpf_night" => {
"in" => 0.0,
"mm" => 0
},
"snow_allday" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_day" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_night" => {
"in" => 0.0,
"cm" => 0.0
},
"maxwind" => {
"mph" => 15,
"kph" => 24,
"dir" => "NNE",
"degrees" => 25
},
"avewind" => {
"mph" => 11,
"kph" => 18,
"dir" => "NNE",
"degrees" => 25
},
"avehumidity" => 55,
"maxhumidity" => 0,
"minhumidity" => 0
},
[2] {
"date" => {
"epoch" => "1423785600",
"pretty" => "7:00 PM EST on February 12, 2015",
"day" => 12,
"month" => 2,
"year" => 2015,
"yday" => 42,
"hour" => 19,
"min" => "00",
"sec" => 0,
"isdst" => "0",
"monthname" => "February",
"monthname_short" => "Feb",
"weekday_short" => "Thu",
"weekday" => "Thursday",
"ampm" => "PM",
"tz_short" => "EST",
"tz_long" => "America/New_York"
},
"period" => 3,
"high" => {
"fahrenheit" => "33",
"celsius" => "1"
},
"low" => {
"fahrenheit" => "17",
"celsius" => "-8"
},
"conditions" => "Snow",
"icon" => "snow",
"icon_url" => "http://icons.wxug.com/i/c/k/snow.gif",
"skyicon" => "",
"pop" => 90,
"qpf_allday" => {
"in" => 0.13,
"mm" => 3
},
"qpf_day" => {
"in" => 0.13,
"mm" => 3
},
"qpf_night" => {
"in" => 0.0,
"mm" => 0
},
"snow_allday" => {
"in" => 1.3,
"cm" => 3.3
},
"snow_day" => {
"in" => 1.3,
"cm" => 3.3
},
"snow_night" => {
"in" => 0.0,
"cm" => 0.0
},
"maxwind" => {
"mph" => 10,
"kph" => 16,
"dir" => "S",
"degrees" => 180
},
"avewind" => {
"mph" => 5,
"kph" => 8,
"dir" => "S",
"degrees" => 180
},
"avehumidity" => 75,
"maxhumidity" => 0,
"minhumidity" => 0
},
[3] {
"date" => {
"epoch" => "1423872000",
"pretty" => "7:00 PM EST on February 13, 2015",
"day" => 13,
"month" => 2,
"year" => 2015,
"yday" => 43,
"hour" => 19,
"min" => "00",
"sec" => 0,
"isdst" => "0",
"monthname" => "February",
"monthname_short" => "Feb",
"weekday_short" => "Fri",
"weekday" => "Friday",
"ampm" => "PM",
"tz_short" => "EST",
"tz_long" => "America/New_York"
},
"period" => 4,
"high" => {
"fahrenheit" => "20",
"celsius" => "-7"
},
"low" => {
"fahrenheit" => "9",
"celsius" => "-13"
},
"conditions" => "Clear",
"icon" => "clear",
"icon_url" => "http://icons.wxug.com/i/c/k/clear.gif",
"skyicon" => "",
"pop" => 0,
"qpf_allday" => {
"in" => 0.0,
"mm" => 0
},
"qpf_day" => {
"in" => 0.0,
"mm" => 0
},
"qpf_night" => {
"in" => 0.0,
"mm" => 0
},
"snow_allday" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_day" => {
"in" => 0.0,
"cm" => 0.0
},
"snow_night" => {
"in" => 0.0,
"cm" => 0.0
},
"maxwind" => {
"mph" => 25,
"kph" => 40,
"dir" => "NW",
"degrees" => 310
},
"avewind" => {
"mph" => 19,
"kph" => 31,
"dir" => "NW",
"degrees" => 310
},
"avehumidity" => 46,
"maxhumidity" => 0,
"minhumidity" => 0
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment