ibm bluemix - IBM weather company data, max temp and min temp for day and night part of the forecast -


in case of ibm weather company data forecast, key gives maximum , minimum temp day , night part of forecast? using:

nighthigh = result.forecasts[0].night.hi;
nightlow = result.forecasts[0].night.wc;

here json received api call.

{ "metadata": {     "language": "en-us",     "transaction_id": "1500467819366:918701294",     "version": "1",     "latitude": 36.11,     "longitude": -115.17,     "units": "e",     "expire_time_gmt": 1500469259,     "status_code": 200 }, "forecasts": [     {         "class": "fod_long_range_daily",         "expire_time_gmt": 1500469259,         "fcst_valid": 1500472800,         "fcst_valid_local": "2017-07-19t07:00:00-0700",         "num": 1,         "max_temp": 98,         "min_temp": 81,         "torcon": null,         "stormcon": null,         "blurb": null,         "blurb_author": null,         "lunar_phase_day": 25,         "dow": "wednesday",         "lunar_phase": "waning crescent",         "lunar_phase_code": "wnc",         "sunrise": "2017-07-19t05:38:06-0700",         "sunset": "2017-07-19t19:55:22-0700",         "moonrise": "2017-07-19t02:05:45-0700",         "moonset": "2017-07-19t16:14:29-0700",         "qualifier_code": null,         "qualifier": null,         "narrative": "more clouds sun. highs in upper 90s , lows in low 80s.",         "qpf": 0,         "snow_qpf": 0,         "snow_range": "",         "snow_phrase": "",         "snow_code": "",         "night": {             "fcst_valid": 1500516000,             "fcst_valid_local": "2017-07-19t19:00:00-0700",             "day_ind": "n",             "thunder_enum": 0,             "daypart_name": "tonight",             "long_daypart_name": "wednesday night",             "alt_daypart_name": "tonight",             "thunder_enum_phrase": "no thunder",             "num": 2,             "temp": 81,             "hi": 95,             "wc": 82,             "pop": 0,             "icon_extd": 2900,             "icon_code": 29,             "wxman": "wx1600",             "phrase_12char": "p cloudy",             "phrase_22char": "partly cloudy",             "phrase_32char": "partly cloudy",             "subphrase_pt1": "partly",             "subphrase_pt2": "cloudy",             "subphrase_pt3": "",             "precip_type": "rain",             "rh": 44,             "wspd": 9,             "wdir": 135,             "wdir_cardinal": "se",             "clds": 61,             "pop_phrase": "",             "temp_phrase": "low 81f.",             "accumulation_phrase": "",             "wind_phrase": "winds se @ 5 10 mph.",             "shortcast": "partly cloudy",             "narrative": "partly cloudy skies. low 81f. winds se @ 5 10 mph.",             "qpf": 0,             "snow_qpf": 0,             "snow_range": "",             "snow_phrase": "",             "snow_code": "",             "vocal_key": "d2:da02:x3000300021:s300021:tl81:w06r02",             "qualifier_code": null,             "qualifier": null,             "uv_index_raw": 0,             "uv_index": 0,             "uv_warning": 0,             "uv_desc": "low",             "golf_index": null,             "golf_category": ""         },         "day": {             "fcst_valid": 1500472800,             "fcst_valid_local": "2017-07-19t07:00:00-0700",             "day_ind": "d",             "thunder_enum": 0,             "daypart_name": "today",             "long_daypart_name": "wednesday",             "alt_daypart_name": "today",             "thunder_enum_phrase": "no thunder",             "num": 1,             "temp": 98,             "hi": 99,             "wc": 90,             "pop": 10,             "icon_extd": 2800,             "icon_code": 28,             "wxman": "wx1230",             "phrase_12char": "m cloudy",             "phrase_22char": "mostly cloudy",             "phrase_32char": "mostly cloudy",             "subphrase_pt1": "mostly",             "subphrase_pt2": "cloudy",             "subphrase_pt3": "",             "precip_type": "rain",             "rh": 36,             "wspd": 11,             "wdir": 137,             "wdir_cardinal": "se",             "clds": 75,             "pop_phrase": "",             "temp_phrase": "high 98f.",             "accumulation_phrase": "",             "wind_phrase": "winds se @ 10 15 mph.",             "shortcast": "more clouds sun",             "narrative": "mostly cloudy. high 98f. winds se @ 10 15 mph.",             "qpf": 0,             "snow_qpf": 0,             "snow_range": "",             "snow_phrase": "",             "snow_code": "",             "vocal_key": "d1:da01:x2600280011:s280013:th98:w06r03",             "qualifier_code": null,             "qualifier": null,             "uv_index_raw": 8.22,             "uv_index": 8,             "uv_warning": 0,             "uv_desc": "very high",             "golf_index": 7,             "golf_category": "good"         }     } ], "address": "las vegas", "temperatureunits": "fahrenheit", "phrase": "you don't need umbrella. today's rain fall probability 10% in las vegas." 

}

wc indicator wind chill, not minimum temperature.

the closest thing have result.forecasts[:].max_temp , result.forecasts[:].min_temp, keys maximum , minimum temperatures (respectively) whole day period.

you seem using 'intraday forecast' api. if choose 'hourly forecast' api receive hourly temperature data, allow parse min/max values day , night periods


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -