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 Analyses and Analysis Types .

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

oz_sets specifies the origin zone sets in the analysis. dz_sets specifies the destination zone sets.

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+"
  • 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+"
  • 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+"
  • trip circuity distribution
    • All travel modes: "1-2,2-3,3-4,4-5,5-6,6+"

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_typeAll Vehicles CVD+All Vehicles LBS+AV By WeightTruckBikePedBusRail

Also note that for analyses with travel_mode_type of Bicycle or Pedestrian, only date ranges containing full months are supported.


For more information in the StreetLight Help Center, see Mode of Travel