Skip to content

Discovery

Query what the server supports at runtime instead of hard-coding it. These methods return typed models (except manifest/health, which return dicts).

python
hb.filters()    # FiltersResponse: every filter, its options, per-mode defaults
hb.regions()    # RegionsResponse: regions + the modes each supports
hb.manifest()   # dict: dataset metadata (schema version, row counts)
hb.health()     # dict: service status; needs a Cloud Run base_url (see note)

filters()

python
for f in hb.filters().modes["geofence"]:
    print(f.id, "→", [o.id for o in f.options], "default:", f.default)

Each filter exposes id, label, description, affects (n/d/both/rate), multiselect, options ({id, label}), and the per-mode default. See the generated catalog below and the Filters concept page.

regions()

python
for r in hb.regions().regions:
    print(r.county, r.modes)        # e.g. travis ['geofence', 'route', 'depot']
print(hb.regions().default_county)  # 'travis'

manifest()

Returns dataset metadata: schema_version, generated_at, row_counts, files (with sha256), counties, region_modes, depot_available.

health()

python
HumanBaselines(api_key="hbk_...",
               base_url="https://human-baseline-api-yz2u5f75wa-uc.a.run.app").health()
# {"status": "ready"}

WARNING

/health is unversioned and is not proxied by humanbaselines.com. Use a Cloud Run base_url for this call (the client raises a clear APIError explaining this if you don't).

Filter catalog

These tables are generated from the API's filter catalog, the same data filters() returns.

Geofence

FilterTypeAffectsDefaultOptionsDescription
outcomesingle-selectnpolice_reportedpolice_reported: Police-reported
observed_any_injury: Any reported injury
airbag: Any airbag deployment
ego_airbag: Ego airbag deployment
ka: Serious+ (K or A)
fatal: Fatal (K)
What kind of crash to count. Each outcome is a subset of police-reported.
severityintn11: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
under_reportingsingle-selectnnonenone: None (unadjusted)
adjusted: Adjusted (Blincoe et al. 2023)
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
in_transportsingle-selectnin_transportin_transport: In-transport only
include_all: Include parked
Whether to exclude parked vehicles (Vehicle Parked Flag).
ego_vehiclemulti-selectbothcars, light_truckscars: Cars
light_trucks: Light trucks
heavy_trucks: Heavy trucks
motorcycles: Motorcycles
buses: Buses
other: Other
Vehicle classes to count and to size the exposure denominator against.
unresolved_nfssingle-selectbothmarginalmarginal: Use observed class share
none: Exclude
all: Include at full weight
How to treat units whose vehicle class could not be resolved (NFS tier 3).
road_typemulti-selectbotharterial, collector_localinterstate: Interstate
other_freeway: Other freeway / expressway
arterial: Arterial
collector_local: Collector / local
Functional road classes to include. The dynamic operator multiplier only applies when every selected class is a surface street (arterial / collector_local).
robo_taxi_weightingsingle-selectratecounty_widecounty_wide: County-wide
operator_weighted: Operator-weighted (dynamic)
Plain county-wide Σ/Σ rate, or the Chen 2024 operator-weighted spatial multiplier (needs Waymo rider-only mileage).
multiplier_vmtsingle-selectratecalibratedcalibrated: Calibrated (TxDOT × VM-4)
hpms: HPMS (Chen 2024)
Exposure source used inside the operator-weighted multiplier. Only relevant when robo_taxi_weighting=operator_weighted.
denominator_vmtsingle-selectdcalibratedcalibrated: CPRD (Caltrans)
hpms: HPMS (functional class)
Road-mileage dataset for the rate denominator. Effectively California-only: the CA pipelines expose a Caltrans CPRD vs HPMS toggle, whereas Texas/Arizona/Nevada counties have a single state-DOT calibrated denominator and reject 'hpms' with a 400.
weathermulti-selectbothdry, rain, fogany: Any
dry: Dry
rain: Rain
fog: Fog
winter_storm: Winter storm
Weather buckets (NOAA-derived). 'any' disables the filter.
light_conditionmulti-selectbothanyany: Any
daylight: Daylight
dawn_dusk: Dawn / dusk
dark: Dark
Ambient-light buckets. 'any' disables the filter.
crash_yearint (multi)n20222022: 2022
2023: 2023
2024: 2024
Which year(s) of police-reported crash data feed the numerator. Geofence cities only (their units carry a crash_year column). Selecting multiple years pools their crashes and scales the denominator by the number of years, so the rate stays an annual mean. The listed years are advertised, not county-validated; years absent from a county are silently ignored.

Route

FilterTypeAffectsDefaultOptionsDescription
outcomesingle-selectnpolice_reportedpolice_reported: Police-reported
observed_any_injury: Any reported injury
airbag: Any airbag deployment
ego_airbag: Ego airbag deployment
ka: Serious+ (K or A)
fatal: Fatal (K)
What kind of crash to count. Each outcome is a subset of police-reported.
severityintn11: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
under_reportingsingle-selectnnonenone: None (unadjusted)
adjusted: Adjusted (Blincoe et al. 2023)
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
in_transportsingle-selectnin_transportin_transport: In-transport only
include_all: Include parked
Whether to exclude parked vehicles (Vehicle Parked Flag).
ego_vehiclemulti-selectbothcombinationcars: Cars
light_trucks: Light trucks
combination: Combination trucks (Class 8 / tractor-trailer)
motorcycles: Motorcycles
buses: Buses
other: Other
Vehicle classes to count and to size the exposure denominator against.
unresolved_nfssingle-selectbothmarginalmarginal: Use observed class share
none: Exclude
all: Include at full weight
How to treat units whose vehicle class could not be resolved (NFS tier 3).
weathermulti-selectbothdry, rain, fogany: Any
dry: Dry
rain: Rain
fog: Fog
winter_storm: Winter storm
Weather buckets (NOAA-derived). 'any' disables the filter.
light_conditionmulti-selectbothanyany: Any
daylight: Daylight
dawn_dusk: Dawn / dusk
dark: Dark
Ambient-light buckets. 'any' disables the filter.
driver_impairmentsingle-selectnanyany: Any
exclude_impaired: Exclude impaired
impaired_only: Impaired only
Filter by driver-impairment coding. Route and depot modes only.
ci_methodsingle-selectratefay_feuerfay_feuer: Fay-Feuer (weighted Poisson)
empirical_bayes: Empirical Bayes (Gamma-Poisson)
Method for the 95% CI in route / depot modes.

Depot

FilterTypeAffectsDefaultOptionsDescription
outcomesingle-selectnpolice_reportedpolice_reported: Police-reported
observed_any_injury: Any reported injury
airbag: Any airbag deployment
ego_airbag: Ego airbag deployment
ka: Serious+ (K or A)
fatal: Fatal (K)
What kind of crash to count. Each outcome is a subset of police-reported.
severityintn11: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
under_reportingsingle-selectnnonenone: None (unadjusted)
adjusted: Adjusted (Blincoe et al. 2023)
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
in_transportsingle-selectnin_transportin_transport: In-transport only
include_all: Include parked
Whether to exclude parked vehicles (Vehicle Parked Flag).
ego_vehiclemulti-selectbothcombinationcars: Cars
light_trucks: Light trucks
combination: Combination trucks (Class 8 / tractor-trailer)
motorcycles: Motorcycles
buses: Buses
other: Other
Vehicle classes to count and to size the exposure denominator against.
unresolved_nfssingle-selectbothmarginalmarginal: Use observed class share
none: Exclude
all: Include at full weight
How to treat units whose vehicle class could not be resolved (NFS tier 3).
weathermulti-selectbothdry, rain, fogany: Any
dry: Dry
rain: Rain
fog: Fog
winter_storm: Winter storm
Weather buckets (NOAA-derived). 'any' disables the filter.
light_conditionmulti-selectbothanyany: Any
daylight: Daylight
dawn_dusk: Dawn / dusk
dark: Dark
Ambient-light buckets. 'any' disables the filter.
driver_impairmentsingle-selectnanyany: Any
exclude_impaired: Exclude impaired
impaired_only: Impaired only
Filter by driver-impairment coding. Route and depot modes only.
ci_methodsingle-selectrateempirical_bayesfay_feuer: Fay-Feuer (weighted Poisson)
empirical_bayes: Empirical Bayes (Gamma-Poisson)
Method for the 95% CI in route / depot modes.

Region / mode matrix

RegionGeofenceRouteDepot
travis
houston--
sanantonio--
dallas--
sf--
la--
phoenix--
vegas--
sandiego--
sacramento--
ca_az_interstates-

Derived statistics only. Attribute every published figure. Maintained by Valgo.