All the exercises in this workshop are based on this real-world weather data from forecast.io.
{
"currently": {
"apparentTemperature": 69.12,
"cloudCover": 0.55,
"dewPoint": 60.38,
"humidity": 0.74,
"icon": "partly-cloudy-day",
"nearestStormBearing": 232,
"nearestStormDistance": 16,
"ozone": 314.64,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1012.18,
"summary": "Partly Cloudy",
"temperature": 69.12,
"time": 1467991683,
"visibility": 9.18,
"windBearing": 26,
"windSpeed": 8.11
},
"daily": {
"data": [
{
"apparentTemperatureMax": 82.9,
"apparentTemperatureMaxTime": 1468011600,
"apparentTemperatureMin": 61.11,
"apparentTemperatureMinTime": 1467968400,
"cloudCover": 0.72,
"dewPoint": 60.81,
"humidity": 0.75,
"icon": "rain",
"moonPhase": 0.15,
"ozone": 310.47,
"precipIntensity": 0.0001,
"precipIntensityMax": 0.0016,
"precipIntensityMaxTime": 1468033200,
"precipProbability": 0.03,
"precipType": "rain",
"pressure": 1010.99,
"summary": "Light rain overnight.",
"sunriseTime": 1467969321,
"sunsetTime": 1468025108,
"temperatureMax": 81.44,
"temperatureMaxTime": 1468011600,
"temperatureMin": 61.11,
"temperatureMinTime": 1467968400,
"time": 1467950400,
"visibility": 9.27,
"windBearing": 24,
"windSpeed": 7.41
},
{
"apparentTemperatureMax": 71.29,
"apparentTemperatureMaxTime": 1468036800,
"apparentTemperatureMin": 61.19,
"apparentTemperatureMinTime": 1468119600,
"cloudCover": 0.97,
"dewPoint": 61.98,
"humidity": 0.88,
"icon": "rain",
"moonPhase": 0.18,
"ozone": 330.54,
"precipIntensity": 0.058,
"precipIntensityMax": 0.1009,
"precipIntensityMaxTime": 1468098000,
"precipProbability": 0.66,
"precipType": "rain",
"pressure": 1009.86,
"summary": "Rain throughout the day.",
"sunriseTime": 1468055768,
"sunsetTime": 1468111477,
"temperatureMax": 71.29,
"temperatureMaxTime": 1468036800,
"temperatureMin": 61.19,
"temperatureMinTime": 1468119600,
"time": 1468036800,
"visibility": 9.22,
"windBearing": 96,
"windSpeed": 7.97
},
{
"apparentTemperatureMax": 72.5,
"apparentTemperatureMaxTime": 1468177200,
"apparentTemperatureMin": 59.87,
"apparentTemperatureMinTime": 1468206000,
"cloudCover": 0.82,
"dewPoint": 60.59,
"humidity": 0.88,
"icon": "rain",
"moonPhase": 0.21,
"ozone": 348.96,
"precipIntensity": 0.0104,
"precipIntensityMax": 0.0249,
"precipIntensityMaxTime": 1468141200,
"precipProbability": 0.53,
"precipType": "rain",
"pressure": 1012.67,
"summary": "Light rain in the morning and afternoon.",
"sunriseTime": 1468142217,
"sunsetTime": 1468197845,
"temperatureMax": 72.5,
"temperatureMaxTime": 1468177200,
"temperatureMin": 59.87,
"temperatureMinTime": 1468206000,
"time": 1468123200,
"visibility": 10,
"windBearing": 30,
"windSpeed": 7.82
},
{
"apparentTemperatureMax": 84.22,
"apparentTemperatureMaxTime": 1468270800,
"apparentTemperatureMin": 52.96,
"apparentTemperatureMinTime": 1468227600,
"cloudCover": 0.35,
"dewPoint": 58.78,
"humidity": 0.76,
"icon": "partly-cloudy-day",
"moonPhase": 0.24,
"ozone": 344.36,
"precipIntensity": 0,
"precipIntensityMax": 0,
"precipProbability": 0,
"pressure": 1018.07,
"summary": "Partly cloudy starting in the afternoon.",
"sunriseTime": 1468228667,
"sunsetTime": 1468284210,
"temperatureMax": 82.83,
"temperatureMaxTime": 1468270800,
"temperatureMin": 52.96,
"temperatureMinTime": 1468227600,
"time": 1468209600,
"visibility": 10,
"windBearing": 255,
"windSpeed": 2.88
},
{
"apparentTemperatureMax": 89.92,
"apparentTemperatureMaxTime": 1468353600,
"apparentTemperatureMin": 60.24,
"apparentTemperatureMinTime": 1468310400,
"cloudCover": 0.36,
"dewPoint": 63.17,
"humidity": 0.76,
"icon": "partly-cloudy-day",
"moonPhase": 0.27,
"ozone": 316.34,
"precipIntensity": 0.0004,
"precipIntensityMax": 0.0016,
"precipIntensityMaxTime": 1468378800,
"precipProbability": 0.03,
"precipType": "rain",
"pressure": 1018.32,
"summary": "Partly cloudy until afternoon.",
"sunriseTime": 1468315119,
"sunsetTime": 1468370573,
"temperatureMax": 85.6,
"temperatureMaxTime": 1468353600,
"temperatureMin": 60.24,
"temperatureMinTime": 1468310400,
"time": 1468296000,
"windBearing": 218,
"windSpeed": 3.44
},
{
"apparentTemperatureMax": 99.38,
"apparentTemperatureMaxTime": 1468432800,
"apparentTemperatureMin": 65.09,
"apparentTemperatureMinTime": 1468396800,
"cloudCover": 0.36,
"dewPoint": 69.57,
"humidity": 0.81,
"icon": "rain",
"moonPhase": 0.3,
"ozone": 299.17,
"precipIntensity": 0.0033,
"precipIntensityMax": 0.0191,
"precipIntensityMaxTime": 1468465200,
"precipProbability": 0.5,
"precipType": "rain",
"pressure": 1013.08,
"summary": "Light rain starting in the evening.",
"sunriseTime": 1468401572,
"sunsetTime": 1468456934,
"temperatureMax": 87.65,
"temperatureMaxTime": 1468432800,
"temperatureMin": 65.09,
"temperatureMinTime": 1468396800,
"time": 1468382400,
"windBearing": 175,
"windSpeed": 7.26
},
{
"apparentTemperatureMax": 111.44,
"apparentTemperatureMaxTime": 1468519200,
"apparentTemperatureMin": 74.38,
"apparentTemperatureMinTime": 1468486800,
"cloudCover": 0.58,
"dewPoint": 75.59,
"humidity": 0.84,
"icon": "rain",
"moonPhase": 0.33,
"ozone": 301.54,
"precipIntensity": 0.0073,
"precipIntensityMax": 0.0194,
"precipIntensityMaxTime": 1468468800,
"precipProbability": 0.5,
"precipType": "rain",
"pressure": 1009.44,
"summary": "Light rain starting in the afternoon.",
"sunriseTime": 1468488027,
"sunsetTime": 1468543292,
"temperatureMax": 91.7,
"temperatureMaxTime": 1468519200,
"temperatureMin": 74.38,
"temperatureMinTime": 1468486800,
"time": 1468468800,
"windBearing": 238,
"windSpeed": 11.35
},
{
"apparentTemperatureMax": 89.46,
"apparentTemperatureMaxTime": 1468612800,
"apparentTemperatureMin": 69.61,
"apparentTemperatureMinTime": 1468569600,
"cloudCover": 0.47,
"dewPoint": 69.86,
"humidity": 0.81,
"icon": "partly-cloudy-day",
"moonPhase": 0.36,
"ozone": 311.62,
"precipIntensity": 0.0017,
"precipIntensityMax": 0.0024,
"precipIntensityMaxTime": 1468562400,
"precipProbability": 0.07,
"precipType": "rain",
"pressure": 1010.01,
"summary": "Partly cloudy throughout the day.",
"sunriseTime": 1468574482,
"sunsetTime": 1468629649,
"temperatureMax": 83.7,
"temperatureMaxTime": 1468612800,
"temperatureMin": 69.61,
"temperatureMinTime": 1468569600,
"time": 1468555200,
"windBearing": 252,
"windSpeed": 8.79
}
],
"icon": "rain",
"summary": "Light rain tomorrow through Thursday, with temperatures rising to 92\u00b0F on Thursday."
},
"flags": {
"darksky-stations": [
"KCXX"
],
"isd-stations": [
"711830-99999",
"713710-99999",
"713713-99999",
"716120-99999",
"716275-99999"
],
"madis-stations": [
"AS947",
"BAREU13",
"C7533",
"C8027",
"C8480",
"CFN3031",
"CWHM",
"CWIZ",
"CWTA",
"CYHU",
"CYUL",
"D2821",
"D3464",
"D8252",
"E5418",
"E9246"
],
"sources": [
"darksky",
"gfs",
"cmc",
"nam",
"rap",
"rtma",
"sref",
"fnmoc",
"isd",
"nwspa",
"madis",
"nearest-precip"
],
"units": "us"
},
"hourly": {
"data": [
{
"apparentTemperature": 67.69,
"cloudCover": 0.49,
"dewPoint": 60.21,
"humidity": 0.77,
"icon": "partly-cloudy-day",
"ozone": 314.7,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1012.29,
"summary": "Partly Cloudy",
"temperature": 67.69,
"time": 1467990000,
"visibility": 8.82,
"windBearing": 25,
"windSpeed": 8.23
},
{
"apparentTemperature": 70.76,
"cloudCover": 0.62,
"dewPoint": 60.51,
"humidity": 0.7,
"icon": "partly-cloudy-day",
"ozone": 314.58,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1012.05,
"summary": "Mostly Cloudy",
"temperature": 70.76,
"time": 1467993600,
"visibility": 9.6,
"windBearing": 28,
"windSpeed": 8
},
{
"apparentTemperature": 73.72,
"cloudCover": 0.71,
"dewPoint": 61.01,
"humidity": 0.65,
"icon": "partly-cloudy-day",
"ozone": 313.62,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1011.77,
"summary": "Mostly Cloudy",
"temperature": 73.72,
"time": 1467997200,
"visibility": 9.87,
"windBearing": 27,
"windSpeed": 7.38
},
{
"apparentTemperature": 76.44,
"cloudCover": 0.75,
"dewPoint": 61.63,
"humidity": 0.6,
"icon": "partly-cloudy-day",
"ozone": 312.5,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1011.42,
"summary": "Mostly Cloudy",
"temperature": 76.44,
"time": 1468000800,
"visibility": 9.93,
"windBearing": 24,
"windSpeed": 7.26
},
{
"apparentTemperature": 78.85,
"cloudCover": 0.69,
"dewPoint": 62.44,
"humidity": 0.57,
"icon": "partly-cloudy-day",
"ozone": 311.29,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1011,
"summary": "Mostly Cloudy",
"temperature": 78.85,
"time": 1468004400,
"visibility": 9.96,
"windBearing": 25,
"windSpeed": 7.19
},
{
"apparentTemperature": 81.83,
"cloudCover": 0.58,
"dewPoint": 63.21,
"humidity": 0.56,
"icon": "partly-cloudy-day",
"ozone": 309.93,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1010.56,
"summary": "Partly Cloudy",
"temperature": 80.42,
"time": 1468008000,
"visibility": 9.98,
"windBearing": 25,
"windSpeed": 7.76
},
{
"apparentTemperature": 82.9,
"cloudCover": 0.51,
"dewPoint": 63.78,
"humidity": 0.55,
"icon": "partly-cloudy-day",
"ozone": 308.9,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1010.15,
"summary": "Partly Cloudy",
"temperature": 81.44,
"time": 1468011600,
"visibility": 10,
"windBearing": 30,
"windSpeed": 7.9
},
{
"apparentTemperature": 82.15,
"cloudCover": 0.52,
"dewPoint": 63.59,
"humidity": 0.56,
"icon": "partly-cloudy-day",
"ozone": 308.41,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1009.95,
"summary": "Partly Cloudy",
"temperature": 80.67,
"time": 1468015200,
"visibility": 10,
"windBearing": 30,
"windSpeed": 7.98
},
{
"apparentTemperature": 78.5,
"cloudCover": 0.57,
"dewPoint": 62.58,
"humidity": 0.58,
"icon": "partly-cloudy-day",
"ozone": 308.26,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1009.81,
"summary": "Partly Cloudy",
"temperature": 78.5,
"time": 1468018800,
"visibility": 10,
"windBearing": 25,
"windSpeed": 7.97
},
{
"apparentTemperature": 76.33,
"cloudCover": 0.64,
"dewPoint": 61.89,
"humidity": 0.61,
"icon": "partly-cloudy-day",
"ozone": 308.3,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1009.75,
"summary": "Mostly Cloudy",
"temperature": 76.33,
"time": 1468022400,
"visibility": 10,
"windBearing": 22,
"windSpeed": 7.7
},
{
"apparentTemperature": 74.04,
"cloudCover": 0.75,
"dewPoint": 61.6,
"humidity": 0.65,
"icon": "partly-cloudy-night",
"ozone": 308.26,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1009.84,
"summary": "Mostly Cloudy",
"temperature": 74.04,
"time": 1468026000,
"visibility": 10,
"windBearing": 19,
"windSpeed": 7.44
},
{
"apparentTemperature": 73.12,
"cloudCover": 0.89,
"dewPoint": 62.43,
"humidity": 0.69,
"icon": "partly-cloudy-night",
"ozone": 308.41,
"precipIntensity": 0,
"precipProbability": 0,
"pressure": 1010.01,
"summary": "Mostly Cloudy",
"temperature": 73.12,
"time": 1468029600,
"visibility": 10,
"windBearing": 20,
"windSpeed": 7.17
},
{
"apparentTemperature": 72.6,
"cloudCover": 1,
"dewPoint": 63.11,
"humidity": 0.72,
"icon": "cloudy",
"ozone": 309.4,
"precipIntensity": 0.0016,
"precipProbability": 0.03,
"precipType": "rain",
"pressure": 1010.05,
"summary": "Overcast",
"temperature": 72.6,
"time": 1468033200,
"visibility": 10,
"windBearing": 25,
"windSpeed": 7.24
},
{
"apparentTemperature": 71.29,
"cloudCover": 1,
"dewPoint": 63.13,
"humidity": 0.75,
"icon": "rain",
"ozone": 311.93,
"precipIntensity": 0.0166,
"precipProbability": 0.49,
"precipType": "rain",
"pressure": 1009.81,
"summary": "Light Rain",
"temperature": 71.29,
"time": 1468036800,
"visibility": 10,
"windBearing": 33,
"windSpeed": 5.96
},
{
"apparentTemperature": 70.08,
"cloudCover": 0.98,
"dewPoint": 62.9,
"humidity": 0.78,
"icon": "rain",
"ozone": 315.29,
"precipIntensity": 0.0073,
"precipProbability": 0.32,
"precipType": "rain",
"pressure": 1009.46,
"summary": "Drizzle",
"temperature": 70.08,
"time": 1468040400,
"visibility": 9.88,
"windBearing": 55,
"windSpeed": 5.06
},
{
"apparentTemperature": 68.58,
"cloudCover": 0.95,
"dewPoint": 62.53,
"humidity": 0.81,
"icon": "rain",
"ozone": 318,
"precipIntensity": 0.0179,
"precipProbability": 0.49,
"precipType": "rain",
"pressure": 1009.23,
"summary": "Light Rain",
"temperature": 68.58,
"time": 1468044000,
"visibility": 9.17,
"windBearing": 77,
"windSpeed": 4.94
},
{
"apparentTemperature": 67.82,
"cloudCover": 0.95,
"dewPoint": 62.58,
"humidity": 0.83,
"icon": "rain",
"ozone": 319.22,
"precipIntensity": 0.0159,
"precipProbability": 0.48,
"precipType": "rain",
"pressure": 1009.24,
"summary": "Light Rain",
"temperature": 67.82,
"time": 1468047600,
"visibility": 8.64,
"windBearing": 91,
"windSpeed": 5.44
},
{
"apparentTemperature": 67.03,
"cloudCover": 0.95,
"dewPoint": 62.18,
"humidity": 0.84,
"icon": "rain",
"ozone": 319.79,
"precipIntensity": 0.0188,
"precipProbability": 0.5,
"precipType": "rain",
"pressure": 1009.37,
"summary": "Light Rain",
"temperature": 67.03,
"time": 1468051200,
"visibility": 8.68,
"windBearing": 99,
"windSpeed": 5.89
},
{
"apparentTemperature": 65.75,
"cloudCover": 0.96,
"dewPoint": 61.91,
"humidity": 0.87,
"icon": "rain",
"ozone": 320.8,
"precipIntensity": 0.0344,
"precipProbability": 0.56,
"precipType": "rain",
"pressure": 1009.5,
"summary": "Light Rain",
"temperature": 65.75,
"time": 1468054800,
"visibility": 8.99,
"windBearing": 105,
"windSpeed": 6.56
},
{
"apparentTemperature": 64.92,
"cloudCover": 0.97,
"dewPoint": 61.57,
"humidity": 0.89,
"icon": "rain",
"ozone": 322.81,
"precipIntensity": 0.047,
"precipProbability": 0.59,
"precipType": "rain",
"pressure": 1009.57,
"summary": "Light Rain",
"temperature": 64.92,
"time": 1468058400,
"visibility": 9.39,
"windBearing": 107,
"windSpeed": 7.64
},
{
"apparentTemperature": 64.52,
"cloudCover": 0.98,
"dewPoint": 61.17,
"humidity": 0.89,
"icon": "rain",
"ozone": 325.25,
"precipIntensity": 0.0549,
"precipProbability": 0.6,
"precipType": "rain",
"pressure": 1009.63,
"summary": "Rain",
"temperature": 64.52,
"time": 1468062000,
"visibility": 9.75,
"windBearing": 107,
"windSpeed": 8.82
},
{
"apparentTemperature": 64.35,
"cloudCover": 0.99,
"dewPoint": 60.9,
"humidity": 0.89,
"icon": "rain",
"ozone": 327.5,
"precipIntensity": 0.0617,
"precipProbability": 0.61,
"precipType": "rain",
"pressure": 1009.71,
"summary": "Rain",
"temperature": 64.35,
"time": 1468065600,
"visibility": 9.66,
"windBearing": 106,
"windSpeed": 9.66
},
{
"apparentTemperature": 64.14,
"cloudCover": 0.99,
"dewPoint": 60.8,
"humidity": 0.89,
"icon": "rain",
"ozone": 329.46,
"precipIntensity": 0.0746,
"precipProbability": 0.63,
"precipType": "rain",
"pressure": 1009.83,
"summary": "Rain",
"temperature": 64.14,
"time": 1468069200,
"visibility": 8.53,
"windBearing": 109,
"windSpeed": 10.78
},
{
"apparentTemperature": 64.39,
"cloudCover": 1,
"dewPoint": 60.97,
"humidity": 0.89,
"icon": "rain",
"ozone": 331.22,
"precipIntensity": 0.0841,
"precipProbability": 0.64,
"precipType": "rain",
"pressure": 1009.95,
"summary": "Rain",
"temperature": 64.39,
"time": 1468072800,
"visibility": 6.75,
"windBearing": 104,
"windSpeed": 10.53
},
{
"apparentTemperature": 64.7,
"cloudCover": 1,
"dewPoint": 61.23,
"humidity": 0.89,
"icon": "rain",
"ozone": 332.5,
"precipIntensity": 0.0896,
"precipProbability": 0.65,
"precipType": "rain",
"pressure": 1010.04,
"summary": "Rain",
"temperature": 64.7,
"time": 1468076400,
"visibility": 5.87,
"windBearing": 100,
"windSpeed": 10.39
},
{
"apparentTemperature": 64.97,
"cloudCover": 1,
"dewPoint": 61.49,
"humidity": 0.89,
"icon": "rain",
"ozone": 333.06,
"precipIntensity": 0.087,
"precipProbability": 0.64,
"precipType": "rain",
"pressure": 1010.09,
"summary": "Rain",
"temperature": 64.97,
"time": 1468080000,
"visibility": 6.8,
"windBearing": 100,
"windSpeed": 10.69
},
{
"apparentTemperature": 65.24,
"cloudCover": 1,
"dewPoint": 61.78,
"humidity": 0.89,
"icon": "rain",
"ozone": 333.14,
"precipIntensity": 0.0805,
"precipProbability": 0.64,
"precipType": "rain",
"pressure": 1010.13,
"summary": "Rain",
"temperature": 65.24,
"time": 1468083600,
"visibility": 8.63,
"windBearing": 101,
"windSpeed": 11.07
},
{
"apparentTemperature": 65.55,
"cloudCover": 1,
"dewPoint": 62.14,
"humidity": 0.89,
"icon": "rain",
"ozone": 333.1,
"precipIntensity": 0.0779,
"precipProbability": 0.63,
"precipType": "rain",
"pressure": 1010.16,
"summary": "Rain",
"temperature": 65.55,
"time": 1468087200,
"visibility": 10,
"windBearing": 101,
"windSpeed": 11.12
},
{
"apparentTemperature": 66.08,
"cloudCover": 0.99,
"dewPoint": 62.71,
"humidity": 0.89,
"icon": "rain",
"ozone": 332.68,
"precipIntensity": 0.0851,
"precipProbability": 0.64,
"precipType": "rain",
"pressure": 1010.13,
"summary": "Rain",
"temperature": 66.08,
"time": 1468090800,
"visibility": 10,
"windBearing": 102,
"windSpeed": 10.75
},
{
"apparentTemperature": 66.76,
"cloudCover": 0.99,
"dewPoint": 63.44,
"humidity": 0.89,
"icon": "rain",
"ozone": 332.15,
"precipIntensity": 0.0962,
"precipProbability": 0.65,
"precipType": "rain",
"pressure": 1010.06,
"summary": "Rain",
"temperature": 66.76,
"time": 1468094400,
"visibility": 10,
"windBearing": 102,
"windSpeed": 10.07
},
{
"apparentTemperature": 67.09,
"cloudCover": 0.99,
"dewPoint": 63.91,
"humidity": 0.9,
"icon": "rain",
"ozone": 332.7,
"precipIntensity": 0.1009,
"precipProbability": 0.66,
"precipType": "rain",
"pressure": 1010.01,
"summary": "Rain",
"temperature": 67.09,
"time": 1468098000,
"visibility": 10,
"windBearing": 102,
"windSpeed": 9.38
},
{
"apparentTemperature": 66.64,
"cloudCover": 1,
"dewPoint": 63.7,
"humidity": 0.9,
"icon": "rain",
"ozone": 335.07,
"precipIntensity": 0.0951,
"precipProbability": 0.65,
"precipType": "rain",
"pressure": 1010,
"summary": "Rain",
"temperature": 66.64,
"time": 1468101600,
"visibility": 10,
"windBearing": 99,
"windSpeed": 8.58
},
{
"apparentTemperature": 65.69,
"cloudCover": 1,
"dewPoint": 63.05,
"humidity": 0.91,
"icon": "rain",
"ozone": 338.53,
"precipIntensity": 0.0824,
"precipProbability": 0.64,
"precipType": "rain",
"pressure": 1010.03,
"summary": "Rain",
"temperature": 65.69,
"time": 1468105200,
"visibility": 10,
"windBearing": 94,
"windSpeed": 7.71
},
{
"apparentTemperature": 64.62,
"cloudCover": 0.99,
"dewPoint": 62.26,
"humidity": 0.92,
"icon": "rain",
"ozone": 342,
"precipIntensity": 0.0673,
"precipProbability": 0.62,
"precipType": "rain",
"pressure": 1010.07,
"summary": "Rain",
"temperature": 64.62,
"time": 1468108800,
"visibility": 10,
"windBearing": 88,
"windSpeed": 7.06
},
{
"apparentTemperature": 63.46,
"cloudCover": 0.92,
"dewPoint": 61.36,
"humidity": 0.93,
"icon": "rain",
"ozone": 345.75,
"precipIntensity": 0.0499,
"precipProbability": 0.59,
"precipType": "rain",
"pressure": 1010.15,
"summary": "Light Rain",
"temperature": 63.46,
"time": 1468112400,
"visibility": 10,
"windBearing": 84,
"windSpeed": 6.76
},
{
"apparentTemperature": 62.23,
"cloudCover": 0.82,
"dewPoint": 60.38,
"humidity": 0.94,
"icon": "rain",
"ozone": 349.53,
"precipIntensity": 0.0302,
"precipProbability": 0.54,
"precipType": "rain",
"pressure": 1010.25,
"summary": "Light Rain",
"temperature": 62.23,
"time": 1468116000,
"visibility": 10,
"windBearing": 81,
"windSpeed": 6.66
},
{
"apparentTemperature": 61.19,
"cloudCover": 0.76,
"dewPoint": 59.53,
"humidity": 0.94,
"icon": "rain",
"ozone": 351.5,
"precipIntensity": 0.0159,
"precipProbability": 0.48,
"precipType": "rain",
"pressure": 1010.31,
"summary": "Light Rain",
"temperature": 61.19,
"time": 1468119600,
"visibility": 10,
"windBearing": 78,
"windSpeed": 6.58
},
{
"apparentTemperature": 60.89,
"cloudCover": 0.76,
"dewPoint": 59.34,
"humidity": 0.95,
"icon": "rain",
"ozone": 350.06,
"precipIntensity": 0.0116,
"precipProbability": 0.45,
"precipType": "rain",
"pressure": 1010.27,
"summary": "Light Rain",
"temperature": 60.89,
"time": 1468123200,
"visibility": 10,
"windBearing": 75,
"windSpeed": 6.4
},
{
"apparentTemperature": 60.72,
"cloudCover": 0.83,
"dewPoint": 59.23,
"humidity": 0.95,
"icon": "rain",
"ozone": 346.83,
"precipIntensity": 0.0131,
"precipProbability": 0.46,
"precipType": "rain",
"pressure": 1010.2,
"summary": "Light Rain",
"temperature": 60.72,
"time": 1468126800,
"visibility": 10,
"windBearing": 68,
"windSpeed": 6.28
},
{
"apparentTemperature": 60.53,
"cloudCover": 0.88,
"dewPoint": 59.1,
"humidity": 0.95,
"icon": "rain",
"ozone": 344.8,
"precipIntensity": 0.0156,
"precipProbability": 0.48,
"precipType": "rain",
"pressure": 1010.19,
"summary": "Light Rain",
"temperature": 60.53,
"time": 1468130400,
"visibility": 10,
"windBearing": 62,
"windSpeed": 6.27
},
{
"apparentTemperature": 60.28,
"cloudCover": 0.88,
"dewPoint": 58.98,
"humidity": 0.95,
"icon": "rain",
"ozone": 345.47,
"precipIntensity": 0.0188,
"precipProbability": 0.5,
"precipType": "rain",
"pressure": 1010.31,
"summary": "Light Rain",
"temperature": 60.28,
"time": 1468134000,
"visibility": 10,
"windBearing": 53,
"windSpeed": 6.58
},
{
"apparentTemperature": 60.04,
"cloudCover": 0.88,
"dewPoint": 58.87,
"humidity": 0.96,
"icon": "rain",
"ozone": 347.36,
"precipIntensity": 0.0231,
"precipProbability": 0.52,
"precipType": "rain",
"pressure": 1010.51,
"summary": "Light Rain",
"temperature": 60.04,
"time": 1468137600,
"visibility": 10,
"windBearing": 45,
"windSpeed": 7.16
},
{
"apparentTemperature": 59.91,
"cloudCover": 0.89,
"dewPoint": 58.77,
"humidity": 0.96,
"icon": "rain",
"ozone": 349,
"precipIntensity": 0.0249,
"precipProbability": 0.53,
"precipType": "rain",
"pressure": 1010.77,
"summary": "Light Rain",
"temperature": 59.91,
"time": 1468141200,
"visibility": 10,
"windBearing": 40,
"windSpeed": 7.74
},
{
"apparentTemperature": 59.9,
"cloudCover": 0.91,
"dewPoint": 58.67,
"humidity": 0.96,
"icon": "rain",
"ozone": 349.91,
"precipIntensity": 0.022,
"precipProbability": 0.51,
"precipType": "rain",
"pressure": 1011.11,
"summary": "Light Rain",
"temperature": 59.9,
"time": 1468144800,
"visibility": 10,
"windBearing": 40,
"windSpeed": 8.21
},
{
"apparentTemperature": 60.06,
"cloudCover": 0.94,
"dewPoint": 58.64,
"humidity": 0.95,
"icon": "rain",
"ozone": 350.57,
"precipIntensity": 0.0167,
"precipProbability": 0.49,
"precipType": "rain",
"pressure": 1011.51,
"summary": "Light Rain",
"temperature": 60.06,
"time": 1468148400,
"visibility": 10,
"windBearing": 43,
"windSpeed": 8.62
},
{
"apparentTemperature": 60.58,
"cloudCover": 0.97,
"dewPoint": 58.8,
"humidity": 0.94,
"icon": "rain",
"ozone": 351,
"precipIntensity": 0.0119,
"precipProbability": 0.45,
"precipType": "rain",
"pressure": 1011.87,
"summary": "Light Rain",
"temperature": 60.58,
"time": 1468152000,
"visibility": 10,
"windBearing": 43,
"windSpeed": 8.88
},
{
"apparentTemperature": 61.83,
"cloudCover": 0.98,
"dewPoint": 59.41,
"humidity": 0.92,
"icon": "rain",
"ozone": 351.1,
"precipIntensity": 0.0083,
"precipProbability": 0.38,
"precipType": "rain",
"pressure": 1012.14,
"summary": "Drizzle",
"temperature": 61.83,
"time": 1468155600,
"visibility": 10,
"windBearing": 39,
"windSpeed": 8.87
},
{
"apparentTemperature": 63.93,
"cloudCover": 0.99,
"dewPoint": 60.69,
"humidity": 0.89,
"icon": "rain",
"ozone": 350.97,
"precipIntensity": 0.0052,
"precipProbability": 0.2,
"precipType": "rain",
"pressure": 1012.38,
"summary": "Drizzle",
"temperature": 63.93,
"time": 1468159200,
"visibility": 10,
"windBearing": 34,
"windSpeed": 8.9
},
{
"apparentTemperature": 66.38,
"cloudCover": 1,
"dewPoint": 62.37,
"humidity": 0.87,
"icon": "cloudy",
"ozone": 350.9,
"precipIntensity": 0.004,
"precipProbability": 0.14,
"precipType": "rain",
"pressure": 1012.59,
"summary": "Overcast",
"temperature": 66.38,
"time": 1468162800,
"visibility": 10,
"windBearing": 31,
"windSpeed": 9.33
}
],
"icon": "rain",
"summary": "Rain starting tonight."
},
"latitude": 45.5,
"longitude": -73.5,
"minutely": {
"data": [
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991680
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991740
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991800
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991860
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991920
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467991980
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992040
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992100
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992160
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992220
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992280
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992340
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992400
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992460
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992520
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992580
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992640
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992700
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992760
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992820
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992880
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467992940
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993000
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993060
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993120
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993180
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993240
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993300
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993360
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993420
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993480
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993540
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993600
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993660
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993720
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993780
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993840
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993900
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467993960
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994020
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994080
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994140
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994200
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994260
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994320
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994380
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994440
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994500
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994560
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994620
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994680
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994740
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994800
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994860
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994920
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467994980
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467995040
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467995100
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467995160
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467995220
},
{
"precipIntensity": 0,
"precipProbability": 0,
"time": 1467995280
}
],
"icon": "partly-cloudy-day",
"summary": "Partly cloudy for the hour."
},
"offset": -4,
"timezone": "America/Montreal"
}
Use the appropriate array method to figure out, using the hourly data, whether there is going to be any rain in the next 24 hours. The method you use should return true
or false
.
Using a chain of two array methods, figure out if it's going to rain in the next 8 hours. To do this, you'll have to start with the hourly data and:
- Eliminate any item where the time is further than 8 hours from now.
- Do the same thing as part 1.
Using the appropriate array method, start with the hourly data and return an array of only the temperatures. Your returned array should have the same number of elements as the original array.
Example output: [72.9, 70.5, ...]
Using a chain of two array methods, start with the hourly data and return an array of Date
objects saying when it will rain. To do this, you'll have to:
- Eliminate any item where it is not raining.
- Extract the time from the remaining items and create a
Date
object
Using the appropriate array method, start with the daily data and figure out whether it will be sunny every day of the week. Use the summary
and check if it contains the word "sun"
using your preferred method.
Using the appropriate array method, start with the hourly data and figure out what will be the hottest temperature today. As a hint, notice that you will need to visit each item in turn, but also keep track of a separate value.
Using the appropriate array method, start with the daily data and find out how many times each icon -- representing the weather condition for that day -- appears.
An example output could be:
{
"rain": 3,
"partly-cloudy": 2,
"sunny": 2
}
Here is the data for this exercise:
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874",
"geo": {
"lat": "-37.3159",
"lng": "81.1496"
}
},
"phone": "1-770-736-8031 x56442",
"website": "hildegard.org",
"company": {
"name": "Romaguera-Crona",
"catchPhrase": "Multi-layered client-server neural-net",
"bs": "harness real-time e-markets"
}
},
{
"id": 2,
"name": "Ervin Howell",
"username": "Antonette",
"email": "Shanna@melissa.biz",
"address": {
"street": "Victor Plains",
"suite": "Suite 879",
"city": "Gwenborough",
"zipcode": "90566-7771",
"geo": {
"lat": "-43.9509",
"lng": "-34.4618"
}
},
"phone": "010-692-6593 x09125",
"website": "anastasia.net",
"company": {
"name": "Deckow-Crist",
"catchPhrase": "Proactive didactic contingency",
"bs": "synergize scalable supply-chains"
}
},
{
"id": 3,
"name": "Clementine Bauch",
"username": "Samantha",
"email": "Nathan@yesenia.net",
"address": {
"street": "Douglas Extension",
"suite": "Suite 847",
"city": "McKenziehaven",
"zipcode": "59590-4157",
"geo": {
"lat": "-68.6102",
"lng": "-47.0653"
}
},
"phone": "1-463-123-4447",
"website": "ramiro.info",
"company": {
"name": "Romaguera-Jacobson",
"catchPhrase": "Face to face bifurcated interface",
"bs": "e-enable strategic applications"
}
},
{
"id": 4,
"name": "Patricia Lebsack",
"username": "Karianne",
"email": "Julianne.OConner@kory.org",
"address": {
"street": "Hoeger Mall",
"suite": "Apt. 692",
"city": "South Elvis",
"zipcode": "53919-4257",
"geo": {
"lat": "29.4572",
"lng": "-164.2990"
}
},
"phone": "493-170-9623 x156",
"website": "kale.biz",
"company": {
"name": "KittyTown",
"catchPhrase": "Multi-tiered zero tolerance productivity",
"bs": "transition cutting-edge web services"
}
},
{
"id": 5,
"name": "Chelsey Dietrich",
"username": "Kamren",
"email": "Lucio_Hettinger@annie.biz",
"address": {
"street": "Skiles Walks",
"suite": "Suite 351",
"city": "KittyTown",
"zipcode": "33263",
"geo": {
"lat": "-31.8129",
"lng": "62.5342"
}
},
"phone": "(254)954-1289",
"website": "demarco.info",
"company": {
"name": "Keebler LLC",
"catchPhrase": "User-centric fault-tolerant solution",
"bs": "revolutionize end-to-end systems"
}
},
{
"id": 6,
"name": "Mrs. Dennis Schulist",
"username": "Leopoldo_Corkery",
"email": "Karley_Dach@jasper.info",
"address": {
"street": "Norberto Crossing",
"suite": "Apt. 950",
"city": "South Christy",
"zipcode": "23505-1337",
"geo": {
"lat": "-71.4197",
"lng": "71.7478"
}
},
"phone": "1-477-935-8478 x6430",
"website": "ola.org",
"company": {
"name": "Considine-Lockman",
"catchPhrase": "Synchronised bottom-line interface",
"bs": "e-enable innovative applications"
}
},
{
"id": 7,
"name": "Kurtis Weissnat",
"username": "Elwyn.Skiles",
"email": "Telly.Hoeger@billy.biz",
"address": {
"street": "Rex Trail",
"suite": "Suite 280",
"city": "Howemouth",
"zipcode": "58804-1099",
"geo": {
"lat": "24.8918",
"lng": "21.8984"
}
},
"phone": "210.067.6132",
"website": "elvis.io",
"company": {
"name": "Johns Group",
"catchPhrase": "Configurable multimedia task-force",
"bs": "generate enterprise e-tailers"
}
},
{
"id": 8,
"name": "Nicholas Runolfsdottir V",
"username": "Maxime_Nienow",
"email": "Sherwood@rosamond.biz",
"address": {
"street": "Ellsworth Summit",
"suite": "Suite 729",
"city": "MeowTown",
"zipcode": "45169",
"geo": {
"lat": "-14.3990",
"lng": "-120.7677"
}
},
"phone": "586.493.6943 x140",
"website": "jacynthe.com",
"company": {
"name": "Abernathy Group",
"catchPhrase": "Implemented secondary concept",
"bs": "e-enable extensible e-tailers"
}
},
{
"id": 9,
"name": "Glenna Reichert",
"username": "Delphine",
"email": "Chaim_McDermott@dana.io",
"address": {
"street": "Dayna Park",
"suite": "Suite 449",
"city": "Bartholomebury",
"zipcode": "76495-3109",
"geo": {
"lat": "24.6463",
"lng": "-168.8889"
}
},
"phone": "(775)976-6794 x41206",
"website": "conrad.com",
"company": {
"name": "Yost and Sons",
"catchPhrase": "Switchable contextually-based project",
"bs": "aggregate real-time technologies"
}
},
{
"id": 10,
"name": "Clementina DuBuque",
"username": "Moriah.Stanton",
"email": "Rey.Padberg@karina.biz",
"address": {
"street": "Kattie Turnpike",
"suite": "Suite 198",
"city": "Lebsackbury",
"zipcode": "31428-2261",
"geo": {
"lat": "-38.2386",
"lng": "57.2232"
}
},
"phone": "024-648-3804",
"website": "ambrose.net",
"company": {
"name": "Hoeger LLC",
"catchPhrase": "Centralized empowering task-force",
"bs": "target end-to-end models"
}
}
]
Using a chain of four array methods, do the following:
- Find out all the people who have .biz emails
- Extract the city where they live
- Keep only the unique cities in the list (hint: this is NOT
filter
) - Print the remaining data on the screen
As an additional hint, the first method is filter
and the last one is forEach
. Up to you to figure out the two middle ones.
Here is how your code will look. Fill in the blanks...
data
.filter(function() {
})
.INSERT_ARRAY_METHOD_HERE(function() {
})
.INSERT_ARRAY_METHOD_HERE(function() {
})
.forEach(function() {
});