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:
Suffix | Travel Mode |
---|---|
all | All Vehicles |
comm | Truck |
bike | Bicycle |
ped | Pedestrian |
bus | Bus |
rail | Rail |
Traveler Attributes
If your analysis includes traveler attributes, these strings indicate the category of demographic information:
Suffix | Description |
---|---|
equity | Demographics on equity (e.g., race, income level) |
education_income | Education and income demographics |
household | Household size and composition |
employment | Employment status |
trip_purpose | Trip 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 String | Description |
---|---|
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.
Updated 2 days ago