Configuring Analyses
StreetLight InSight® API
Use the Create and run an analysis endpoint to define analysis type, zone sets, time period, and optional metrics or attributes. Analyses are processed asynchronously.
Analyses are processed asynchronously; you can use the Check analysis status endpoint to check when your analysis is complete.
For more information in the StreetLight Help Center, see Analysis Types Overview .
Analysis Limits
Most accounts can have up to 250 active or queued analyses per API key. Once this limit is reached, wait for analyses to complete before submitting more.
To check analyses that are in the queue, use the in_queue
parameter with the Search analyses endpoint.
If you need more capacity, Contact Support .
Defining Day Types and Day Parts
Day Types
Day types are groups of days of the week. Metrics are segmented based on the specified day types. The default day types are:
- All Days (Mon-Sun)
- Weekdays (Mon-Thurs)
- Weekend Days (Sat-Sun)
You can customize day types using the day_types
parameter. Each entry follows the format name|startdayendday
, where
name
is a descriptive label for the group (e.g., Weekday)startday
andendday
are digits from 1 (Monday) to 7 (Sunday)
Example (default day types):
"day_types": "Weekday|14,Weekend Day|67,All Days|17"
Day Parts
Day parts define time intervals within a day for which metrics are calculated. Each part is a specific time range in 24-hour format.
Define custom day parts using the day_parts parameter. Each entry uses the format name|starthourendhour
, where
name
is a descriptive label for the group (e.g. Peak AM)starthour
andendhour
are two-digit hour values in 24-hour time (e.g.,06
for 6 AM,18
for 6 PM)
You must include at least one entry: All Day|0023
. If omitted, it will be added automatically.
Example (default day parts):
"day_parts": "All Day|0023,Early AM|0005,Peak AM|0609,Mid-Day|1014,Peak PM|1518,Late PM|1923"
Origin and Destination Zone Sets
For these analysis types, define both oz_sets
(origin zones) and dz_sets
(destination zones):
- Origin-Destination Analysis
- Origin-Destination through Middle Filters Analysis
- Top Routes between Origins and Destinations Analysis
- Network Origin-Destination Analysis
Network Origin-Destination and Network Performance
Network Origin-Destination requirements:
- Define zones using
osm_ids
- Set both
oz_sets
anddz_sets
- Use
All_Vehicles_AGPS
travel mode
Network Performance requirements:
- Define zones using
osm_ids
- Use
All_Vehicles_AGPS
orTruck
travel mode - Set
metric_type
tospot
orsegment
For more information, see Create a Network Performance analysis .
Trip and traveler attributes
Traveler Attributes
Traveler attributes are available only for the following analysis types:
- Origin-Destination
- Origin-Destination through Middle Filters
- Trips to or from Pre-set Geography
- Zone Activity
Trip Attributes
The trip_attributes
parameter controls whether the analysis results will include the add-on trip attribute metrics with default bins, or ranges. When enabled, analysis metrics include the percentage of trips in each bin. Includes bins for:
- Duration (minutes)
- Length (miles or km)
- Speed (mph or kph)
- Circuity (distance ratio)
Define custom bins with the following format:
"trip_duration_bins": "0-10,10-20,20+",
"trip_speed_bins": "0-10,10-20,20+"
Speed Percentile Bins
When enable_speed_percentile
is true, you can specify percentile values with speed_percentile_bins
.
{
"enable_speed_percentile": true,
"speed_percentile_bins": "10,20,30,40"
}
If omitted, defaults to "5,15,85,95"
.
Home and Work Locations
Enable with enable_home_work_locations
. Requires at least one of the following:
hwl_enable_visitor
hwl_enable_resident
hwl_enable_worker
Only supported for Zone Activity with travel modes other than Truck
or All_Vehicles_CVD+
.
zone_intersection_type
options:
all_trips_for_zone
trips_by_pass_through_setting
For more information in the StreetLight Help Center, see Home and Work Location Methodology .
Supported Analysis Type and Travel Mode Combinations
Note that only certain combinations of analysis_type
and travel_mode_type
are supported. Here is the current set of supported combinations:
analysis_type | All Vehicles AGPS | All Vehicles CVD+ | All Vehicles LBS+ | AV By Weight | Truck | Bike | Ped | Bus | Rail |
---|---|---|---|---|---|---|---|---|---|
Zone_Activity_Analysis | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
Segment_Analysis | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
Network_Performance | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
Network_OD | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
OD_Analysis | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
Network_OD | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
OD_MF_Analysis | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ |
OD_Preset_Geography | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
Top_Routes_OD | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
Top_Routes_ZA | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
AADT | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
For analyses with travel_mode_type
of Bicycle or Pedestrian, only date ranges containing full months are supported.
The following analysis types are not supported by the StreetLight InSight® API:
- Turning Movement Counts
- Corridor Study
- Active Transportation
- Congestion Management
- Roadway Volumes
Updated 2 days ago