Requesting Metrics

StreetLight InSight® API

After an analysis completes, you request the specific metrics to be returned in a CSV format with the following endpoints:

📘

You request metrics with strings that correspond to the types of metrics available with an analysis. You can check the strings for metrics available with an analysis with the Check analysis status endpoint.

The strings used to request metrics depend on the analysis type, travel mode, and metrics. For example, for a Zone Activity analysis with the All Vehicles LBS+ with traveler attributes, you would request za_all to get trip metrics for the analysis. "za" represents Zone Activity, and "all" represents All Vehicles LBS+. You could then request zone_traveler_employment_all to get metrics for the employment traveler attribute in each zone.

The following is an example response for a Check analysis status query:

{
  "analyses": [
    {
      "metrics": [
        "od_all",
        "zone_od_all",
        "od_traveler_equity_all",
        "zone_traveler_equity_all",
        "od_traveler_household_all",
        "zone_traveler_household_all",
        "od_traveler_education_income_all",
        "zone_traveler_education_income_all",
        "od_traveler_trip_purpose_all",
        "zone_traveler_trip_purpose_all",
        "sample_size"
      ],
      "name": "OriginDestination_MyCity",
      "status": "Available",
      "uuid": "1be1edc3-7575-4003-850c-62145f4986cb"
    }
  ],
  "status": "success"
}

Travel Mode

Most metric strings will have a suffix for the travel mode of the analysis. These strings are added to the analysis type strings below for a complete metric request string.

  • all: All Vehicles
  • comm: Truck
  • bike: Bicycle
  • ped: Pedestrian
  • bus: Bus
  • rail: Rail

Traveler Attributes

If your analysis includes traveler attributes, you request the category of traveler attribute in your metric request. These strings are added to the analysis type strings below for a complete metric request string.

📘

For more information in the StreetLight Help Center, see Traveler Attributes .

  • equity: Includes the self-identified equity demographics for travel at the zones.
  • education_income: Includes education and income demographics for travel in the analysis or zones.
  • household: Includes the household demographics for travel at the zones.
  • employment: This metric contains the employment demographics for travel at the zones.
  • trip_purpose: Represents the purpose of travel and can be any of the following:
    • Home-Based Work (HBW): travel between home and work in either direction.
    • Home-Based Other (HBO): travel to or from home, to anywhere other than work.
    • Non-Home Based (NHB): all travel not to or from home (i.e. all travel other than the above)

Analysis Type

In these strings, [Travel Mode] represents the travel mode string described above. [Traveler Attribute] represents the traveler attribute category described above.

Zone Activity

  • za_[Travel Mode]: Includes the Zone Activity metrics.
  • zone_trip_[Travel Mode]: Includes the trip attributes for the zones.
  • zone_traveler_[Travel Mode]: Includes the traveler attributes for the zones.

Home and Work Locations

📘

For more information in the StreetLight Help Center, see Home and Work Location Methodology .

  • home_grid_[Travel Mode]: Lists the distribution of home locations of the trips to the zones, by 1 km by 1km grid cells.
  • work_grid_[Travel Mode]: Lists the distribution of work locations of the trips to the zones, by 1 km by 1km grid cells.
  • home_metro_area_[Travel Mode]: Lists the distribution of the home locations of the trips to the zones, by metro area as defined in the 2020 US Census.
  • home_state_[Travel Mode]: Lists the distribution of the home locations of the trips to the zones, by state.
  • home_zip_codes_[Travel Mode]: Lists the distribution of the home locations of the trips to the zones, by state.
  • home_zip_codes_top_[Travel Mode]: Lists the top home zip codes of visitors to the zones.
  • tourist_summary_[Travel Mode]: Includes the percentage split of visitors to the zone by state and metro area. For state the split is by In and Out-of-State visitors. For Metro Area the split is by Local Metro Area, Other Metro Area, and Rural Area.
  • home_distance_[Travel Mode]: The distance between trips' home locations and the zone they visit.
  • work_distance_[Travel Mode]: The distance between trips' work locations and the zone they visit.
  • home_block_groups_[Travel Mode]: Lists the distribution of the home locations of the trips to the zones, by 2020 census block group.
  • work_block_groups_[Travel Mode]: Lists the distribution of the work locations of the trips to the zones, by 2020 census block group.

Origin-Destination Analysis

  • od_[Travel Mode]: Includes the Origin-Destination metrics.
  • zone_od_[Travel Mode]: Includes information about each zone used in the analysis. The count represents all trips appropriate to each zone with no limitations on where they came or where they went.
  • od_trip_[Travel Mode]: Includes the trip attributes for the analysis.
  • zone_trip_[Travel Mode]: Includes the trip attributes for travel in the zones.
  • od_traveler_[Traveler Attribute]_[Travel Mode]: Includes the specified traveler attribute in the analysis.
  • zone_traveler_[Traveler Attribute]_[Travel Mode]: Includes the specified traveler attribute for travel at the zones.

Segment Analysis

sa_[Travel Mode]: Includes the Segment Analysis metrics

AADT

estimated_aadt: Includes the AADT metrics

Top Routes for Zones

tr_za: Includes the Top Routes for Zones metrics

Origin-Destination through Middle Filters

  • mf_[Travel Mode]: Includes the Origin-Destination through Middle Filters metrics
  • zone_mf_[Travel Mode]: Includes information about each zone used in the analysis. The count represents all trips appropriate to each zone with no limitations on where they came or where they went.
  • mf_trip_[Travel Mode]: Includes the trip attributes for the analysis.
  • zone_trip_[Travel Mode]: Includes the trip attributes for the zones.
  • mf_traveler_[Traveler Attribute]_[Travel Mode]: Includes the specified traveler attribute for the analysis.
  • zone_traveler_[Traveler Attribute]_[Travel Mode]: Includes the specified traveler attribute for travel at the zones.

Trips to or from Pre-set Geography

  • odg_[Travel Mode]: Includes the Trips to or from Pre-set Geography metrics
  • zone_odg_[Travel Mode]: Includes information about each zone used in the analysis. The count represents all trips appropriate to each zone with no limitations on where they came or where they went.
  • odg_trip_[Travel Mode]: Includes the trip attributes for the analysis.
  • zone_trip_[Travel Mode]: Includes the trip attributes for the zones.
  • odg_traveler_[Traveler Attribute]_[Travel Mode]: Includes the specified traveler attribute in the analysis.
  • zone_traveler_[Traveler Attribute]_[Travel Mode]: Includes the traveler attributes for travel at the zones.

Top Routes between Origins and Destinations

tr_od: Includes the Top Routes between Origins and Destinations metrics

Sample Size

sample_size: Includes the size of the data sample that was analyzed for this analysis and its data period.

Prediction Interval

prediction_interval: Includes prediction interval metrics that represent the range within which we expect the true value to lie 95% of the time and are formed using the 2.5th percentile and the 97.5th percentile of the error distribution.