Configuring Analyses
StreetLight InSight® API
A request to create and run an analysis includes the analysis type, zone sets, data period, and add-ons that you would like to analyze. Analyses are processed asynchronously; you can use the Check analysis status endpoint to check when your analysis is complete.
For documentation of endpoint parameters, see Create and run an analysis.
For more information in the StreetLight Help Center, see Analysis Types Overview .
Some parameters are optional or only required for specific analysis types.
Analysis limits
Most accounts can have up to 250 analyses per API key that are running or in the analysis queue waiting to run. StreetLight may change this limit based on resources and capacity to support customers running analyses. Once you reach this limit, you must wait for analyses to complete before running additional analyses. If this limit may interfere with your projects, Contact Support to request changes to this limit.
To check analyses that are in the queue, use the in_queue
parameter with the Search analyses endpoint.
Specifying day type and day parts
Day types are groups of days of the week. Metrics are segmented based on the specified day types. The default day types are average day (Mon-Sun), average weekday (Mon-Thurs), and average weekend (Sat-Sun).
You can specify a list of day types using the day_types property. Each day type consists of a name, a vertical bar “|”, a number for the start day of the week, and a number for the end day. Monday is “1” and Sunday is “7”. For example, All Days|17
would be Monday through Sunday. The following is the default day_types
property, but you can also define your own:
"day_types": "Weekday|14,Weekend Day|67,All Days|17"
Day parts are the time periods of each day, in intervals or hours, for which trips are analyzed in an analysis. Metrics are segmented based on the specified day types.
You can specify a list of day parts using the day_parts property. Each day part consists of a name, a vertical bar “|”, 2 digits for the start hour, and 2 digits for the end hour. For example, All Day|0023
ranges from midnight to 11:59 PM. You must at least specify All Day|0023
, otherwise it will be added automatically. The following is the default day_parts
property, but you can also define your own:
"day_parts": "All Day|0023,Early AM|0005,Peak AM|0609,Mid-Day|1014,Peak PM|1518,Late PM|1923"
Setting up Origin and Destination zones
The following analysis types require you to define the parameters oz_sets
and dz_sets
, instead of just oz_sets
:
- Origin-Destination Analysis
- Origin-Destination through Middle Filters Analysis
- Top Routes between Origins and Destinations Analysis
- Network Origin-Destination Analysis
oz_sets
specifies the origin zone sets in the analysis. dz_sets
specifies the destination zone sets.
Setting up Network Origin-Destination analyses
To run a Network Origin-Destination analysis, you must:
- Use zone sets with zones specified using
osm_ids
in the Create a zone set endpoint - Specify origin and destination zone sets with
oz_sets
anddz_sets
, respectively, in the Create and run an analysis endpoint - Select the
All_Vehicles_AGPS
travel mode in the Create and run an analysis endpoint
Network Origin-Destination analyses have a rolling ~24 month range of available data that regularly adds the most recent data months and archives the oldest data months. To see available data months for Network Origin-Destination, see Check available data periods.
Setting up Network Performance analyses
To run a Network Performance analysis, you must:
- Use a zone set with zones specified using
osm_ids
in the Create a zone set endpoint - Select the
All_Vehicles_AGPS
travel mode in the Create and run an analysis endpoint - Specify
spot
orsegment
metrics as themetric_type
in the Create and run an analysis endpoint
For more information in the StreetLight Help Center, see Create a Network Performance analysis .
Trip and traveler attributes
Traveler attributes
Traveler attributes are only available for Origin-Destination, Origin-Destination through Middle Filters, Trips to or from Pre-set Geography, and Zone Activity analysis types.
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. The following metrics are available, with default ranges for each travel mode listed below the metric.
- trip duration distribution (minutes)
- All Vehicles and Trucks:
"0-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100,100-110,110-120,120-130,130-140,140-150,150+"
- Bicycle, Pedestrian, Bus, and Rail:
"0-5,5-10,10-15,15-20,20-25,25-30,30-35,35-40,40-45,45-50,50-55,55-60,60+"
- All Vehicles and Trucks:
- trip length distribution (miles or kilometers)
- All Vehicles and Truck:
"0-1,1-2,2-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100,100+"
- Bicycle:
"0-1,1-2,2-3,3-4,4-5,5-6,6-7,7-8,8-9,9-10,10+"
- Pedestrian:
"0-1,1-2,2-3,3-4,4-5,5+"
- Bus:
"0-1,1-2,2-3,3-4,4-5,5-6,6-7,7-8,8-9,9-10,10+"
- Rail:
"0-1,1-2,2-3,3-4,4-5,5-10,10-15,15-20,20-25,25-30,30+"
- All Vehicles and Truck:
- trip speed distribution (mph or kph)
- All Vehicles and Truck:
"0-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90+"
- Bicycle:
"0-2,2-4,4-6,6-8,8-10,10-12,12-14,14+"
- Pedestrian:
"0-1,1-2,2-3,3-4,4-5,5+"
- Bus:
"0-2,2-4,4-6,6-8,8-10,10-12,12-14,14-16,16-18,18-20,20+"
- Rail:
"5-10,10-15,15-20,20-25,25-30,30-35,35-40,40-45,45-50,50+"
- All Vehicles and Truck:
- trip circuity distribution
- All travel modes:
"1-2,2-3,3-4,4-5,5-6,6+"
- All travel modes:
If you specify this property, you can customize the bins into which trips are sorted by specifying ranges for parameters below. After the highest range, specifying a minimum value is recommended, i.e. "...,100+"
, to ensure all trips are captured.
trip_duration_bins
trip_length_bins
trip_speed_bins
trip_circuity_bins
For Segment Analyses, you cannot enable trip attributes or traveler attributes. However, you can specify the following properties:
trip_duration_bins
trip_speed_bins
For more information in the StreetLight Help Center, see Trip Attributes .
Speed percentile bins
When enable_speed_percentile
is true, you can specify percentile values with speed_percentile_bins
, which takes a String containing a list of comma separated integers. Percentile values must be greater than 0 and less than 100.
For example:
{
"enable_speed_percentile": true,
"speed_percentile_bins": "10,20,30,40"
}
If the setting is enabled without any specific bins defined, then the following default percentile values are used: "speed_percentile_bins": "5,15,85,95"
Home and work locations
enable_home_work_locations
controls whether the Analysis results will include Home and Work Locations metrics.
If you specify this, you need at least one of the following properties be set to True:
- hwl_enable_visitor
- hwl_enable_resident
- hwl_enable_worker
This property is not supported for Truck or All Vehicles CVD+ travel_mode_type
. Home-Work locations are only supported for other modes of travel in Zone Activity Analyses.
The zone_intersection_type
parameter applies only to Zone Activity Analysis with Home and Work Locations metrics enabled, and must be a string with one of the following two values:
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 | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
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
For more information in the StreetLight Help Center, see What are travel modes
Updated 4 days ago