Requesting Metrics

StreetLight InSight® API

Once your analysis is complete, you can retrieve the resulting metrics in CSV format using one of 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 Modes

Most metric strings include a suffix to indicate the travel mode:

SuffixTravel Mode
allAll Vehicles
commTruck
bikeBicycle
pedPedestrian
busBus
railRail

Traveler Attributes

If your analysis includes traveler attributes, these strings indicate the category of demographic information:

SuffixDescription
equityDemographics on equity (e.g., race, income level)
education_incomeEducation and income demographics
householdHousehold size and composition
employmentEmployment status
trip_purposeTrip intent: HBW, HBO, NHB

📘

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

Trip Attributes

Metrics strings with trip contain trip attributes for the analysis.

Some analysis types will include a zone_trip_[Travel Mode] set of metrics, which contains trip attributes for individual zones.

Home and Work Locations

You can get metrics for home and work locations with the Zone Activity analysis type.

Metrics StringDescription
home_grid_[Travel Mode]Home location by 1km grid
work_grid_[Travel Mode]Work location by 1km grid
home_metro_area_[Travel Mode]Home metro area (2020 Census)
home_state_[Travel Mode]Home state distribution
home_zip_codes_[Travel Mode]Home ZIP code distribution
home_zip_codes_top_[Travel Mode]Top ZIP codes for visitors
tourist_summary_[Travel Mode]Visitor origin breakdown (state, metro)
home_distance_[Travel Mode]Distance from home to zone
work_distance_[Travel Mode]Distance from work to zone
home_block_groups_[Travel Mode]Home census block group
work_block_groups_[Travel Mode]Work census block group

📘

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

Sample Size

sample_size: Shows the size of the data sample used in the analysis period.

Prediction Interval

prediction_interval: Provides a 95% confidence range based on the 2.5th and 97.5th percentile of the error distribution.