Driving Difficulty Index - Daypart - 15 Day

Overview

  • Domain Portfolio: Forecast
  • Domain: Lifestyle - Indices
  • Usage Classification: Standard
  • Geography: Global
  • Attribution Required: n/a
  • Attribution Requirements: n/a

The Forecast Indices API is sourced from the TWC Forecast system. The Driving Difficulty index provides indices of driving difficulty, or road weather conditions.

HTTP Headers and Data Lifetime - Caching and Expiration

For details on appropriate header values as well as caching and expiration definitions, please see The Weather Company Data | API Common Usage Guide.

URL Construction

Atomic API URL Examples:  
DrivingDifficulty - Current Conditions API  

Request by Geocode (Latitude & Longitude): Required Parameters: geocode, language, format

https://api.weather.com/v2/indices/drivingDifficulty/current?geocode=33.74,-84.39&language=en-US&format=<json>&apiKey=yourApiKey

https://api.weather.com/v2/indices/drivingDifficulty/current?geocode=33.74,-84.39&language=en-US&format=json&apiKey=yourApiKey  

Request by Postal Code: Required Parameters: postalCode, countryCode, language, format

https://api.weather.com/v2/indices/drivingDifficulty/current?postalCode=94608&countryCode=US&format=<json>&language=en-US&apiKey=yourApiKey

https://api.weather.com/v2/indices/drivingDifficulty/current?postalCode=94608&countryCode=US&format=json&language=en-US&apiKey=yourApiKey  
DrivingDifficulty - Daypart API  

Request by Geocode (Latitude & Longitude): Required Parameters: geocode, language, format

https://api.weather.com/v2/indices/drivingDifficulty/daypart/<duration>?geocode=33.74,-84.39&language=en-US&format=<json>&apiKey=yourApiKey

Aggregate Product Name

https://api.weather.com/v2/indices/drivingDifficulty/daypart/15day?geocode=33.74,-84.39&language=en-US&format=json&apiKey=yourApiKey

v2idxDriveDaypart15

Request by Postal Code: Required Parameters: postalCode, countryCode, language, format

https://api.weather.com/v2/indices/drivingDifficulty/daypart/<duration>?postalCode=94608&countryCode=US&format=<json>&language=en-US&apiKey=yourApiKey

Aggregate Product Name
https://api.weather.com/v2/indices/drivingDifficulty/daypart/15day?postalCode=94608&countryCode=US&format=json&language=en-US&apiKey=yourApiKey v2idxDriveDaypart15

Data Elements & Definitions

API Name Field Name Description Type Range Sample Nulls Allowed Usage
Repeating Elements: Unique to Current              
  obsTime Time observation is valid [epoch]   1369252800 N Display As Provided
  obsTimeLocal Time observation is valid ... . in local, but at top of next UTC hour [ISO]   2013-05-22T20:00:00-0400 N Display As Provided
Repeating Elements: Unique to Forecast           N  
  fcstValid Time forecast is valid ... start of the forecast period, always 7am local time. [epoch]   1369306800 N Display As Provided
  fcstValidLocal Time forecast is valid ... start of the forecast period, always 7am local time. [ISO]   2013-05-23T07:00:00-0400 N Display As Provided
Repeating Elements: Common Per Time Segment           N  
Unique to Hourly dow Forecast valid day of week [string]   Wednesday N  
  num

Daily Segment (24hour)- Forecast valid day number. Day 0 = 1st valid day

Daypart Segment (12hour) - Sequential daypart number, where 1 = daytime of Day 0

Short-Range - Sequential hour number, where 1 = first available 15-minute timestep of forecast, usually <= 15 minutes from “now”

Long - Range - Sequential hour number, where 1 = first available hour of forecast, usually <= 1hr from “now”

[integer]   21 N Display As Provided
  dayInd Day / Night Indicator [string] D, N D N Display As Provided
Unique to Daypart daypartName Name of 12hr daypart, not including day names in first 48hrs [string]   Tomorrow N Display As Provided
Atomic Indices              
Driving Difficulty Index drivingDifficultyCategory Descriptive text of Driving Difficulty Index [string]   Ponding N Display As Provided
  drivingDifficultyIndex

Index of driving difficulty, or road weather conditions.

0=none, 1=windy, 2=foggy, 3=wet, 4=ponding, 5=snowy, 6=icy

[integer] 0-6 4 N Display As Provided

JSON Sample

JSON Sample - Current Conditions

{

"metadata": {},

"drivingDifficultyIndexCurrent": {

"obsTime": 1458917100,

"obsTimeLocal": "2016-03-25T10:45:00-0400",

"dow": "Friday",

"dayInd": "D",

"drivingDifficultyIndex": 0,

"drivingDifficultyCategory": "None"

}

}

JSON Sample - 15 Minute

{

"metadata": {},

"drivingDifficultyIndex15minute": {

"fcstValid": [],

"fcstValidLocal": [],

"num": [],

"dow": [],

"dayInd": [],

"drivingDifficultyIndex": [],

"drivingDifficultyCategory": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

JSON Sample - Hourly

{

"metadata": {},

"drivingDifficultyIndex1hour": {

"fcstValid": [],

"fcstValidLocal": [],

"num": [],

"dow": [],

"dayInd": [],

"drivingDifficultyIndex": [],

"drivingDifficultyCategory": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

JSON Sample - Daypart

{

"metadata": {},

"drivingDifficultyIndex12hour": {

"fcstValid": [],

"fcstValidLocal": [],

"dayInd": [],

"num": [],

"daypartName": [],

"drivingDifficultyIndex": [],

"drivingDifficultyCategory": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},