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
| Filter | Type | Affects | Default | Options | Description |
|---|---|---|---|---|---|
outcome | single-select | n | police_reported | police_reported: Police-reportedobserved_any_injury: Any reported injuryairbag: Any airbag deploymentego_airbag: Ego airbag deploymentka: Serious+ (K or A)fatal: Fatal (K) | What kind of crash to count. Each outcome is a subset of police-reported. |
severity | int | n | 1 | 1: 12: 23: 34: 45: 56: 67: 7 | Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating). |
under_reporting | single-select | n | none | none: 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_transport | single-select | n | in_transport | in_transport: In-transport onlyinclude_all: Include parked | Whether to exclude parked vehicles (Vehicle Parked Flag). |
ego_vehicle | multi-select | both | cars, light_trucks | cars: Carslight_trucks: Light trucksheavy_trucks: Heavy trucksmotorcycles: Motorcyclesbuses: Busesother: Other | Vehicle classes to count and to size the exposure denominator against. |
unresolved_nfs | single-select | both | marginal | marginal: Use observed class sharenone: Excludeall: Include at full weight | How to treat units whose vehicle class could not be resolved (NFS tier 3). |
road_type | multi-select | both | arterial, collector_local | interstate: Interstateother_freeway: Other freeway / expresswayarterial: Arterialcollector_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_weighting | single-select | rate | county_wide | county_wide: County-wideoperator_weighted: Operator-weighted (dynamic) | Plain county-wide Σ/Σ rate, or the Chen 2024 operator-weighted spatial multiplier (needs Waymo rider-only mileage). |
multiplier_vmt | single-select | rate | calibrated | calibrated: 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_vmt | single-select | d | calibrated | calibrated: 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. |
weather | multi-select | both | dry, rain, fog | any: Anydry: Dryrain: Rainfog: Fogwinter_storm: Winter storm | Weather buckets (NOAA-derived). 'any' disables the filter. |
light_condition | multi-select | both | any | any: Anydaylight: Daylightdawn_dusk: Dawn / duskdark: Dark | Ambient-light buckets. 'any' disables the filter. |
crash_year | int (multi) | n | 2022 | 2022: 20222023: 20232024: 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
| Filter | Type | Affects | Default | Options | Description |
|---|---|---|---|---|---|
outcome | single-select | n | police_reported | police_reported: Police-reportedobserved_any_injury: Any reported injuryairbag: Any airbag deploymentego_airbag: Ego airbag deploymentka: Serious+ (K or A)fatal: Fatal (K) | What kind of crash to count. Each outcome is a subset of police-reported. |
severity | int | n | 1 | 1: 12: 23: 34: 45: 56: 67: 7 | Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating). |
under_reporting | single-select | n | none | none: 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_transport | single-select | n | in_transport | in_transport: In-transport onlyinclude_all: Include parked | Whether to exclude parked vehicles (Vehicle Parked Flag). |
ego_vehicle | multi-select | both | combination | cars: Carslight_trucks: Light truckscombination: Combination trucks (Class 8 / tractor-trailer)motorcycles: Motorcyclesbuses: Busesother: Other | Vehicle classes to count and to size the exposure denominator against. |
unresolved_nfs | single-select | both | marginal | marginal: Use observed class sharenone: Excludeall: Include at full weight | How to treat units whose vehicle class could not be resolved (NFS tier 3). |
weather | multi-select | both | dry, rain, fog | any: Anydry: Dryrain: Rainfog: Fogwinter_storm: Winter storm | Weather buckets (NOAA-derived). 'any' disables the filter. |
light_condition | multi-select | both | any | any: Anydaylight: Daylightdawn_dusk: Dawn / duskdark: Dark | Ambient-light buckets. 'any' disables the filter. |
driver_impairment | single-select | n | any | any: Anyexclude_impaired: Exclude impairedimpaired_only: Impaired only | Filter by driver-impairment coding. Route and depot modes only. |
ci_method | single-select | rate | fay_feuer | fay_feuer: Fay-Feuer (weighted Poisson)empirical_bayes: Empirical Bayes (Gamma-Poisson) | Method for the 95% CI in route / depot modes. |
Depot
| Filter | Type | Affects | Default | Options | Description |
|---|---|---|---|---|---|
outcome | single-select | n | police_reported | police_reported: Police-reportedobserved_any_injury: Any reported injuryairbag: Any airbag deploymentego_airbag: Ego airbag deploymentka: Serious+ (K or A)fatal: Fatal (K) | What kind of crash to count. Each outcome is a subset of police-reported. |
severity | int | n | 1 | 1: 12: 23: 34: 45: 56: 67: 7 | Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating). |
under_reporting | single-select | n | none | none: 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_transport | single-select | n | in_transport | in_transport: In-transport onlyinclude_all: Include parked | Whether to exclude parked vehicles (Vehicle Parked Flag). |
ego_vehicle | multi-select | both | combination | cars: Carslight_trucks: Light truckscombination: Combination trucks (Class 8 / tractor-trailer)motorcycles: Motorcyclesbuses: Busesother: Other | Vehicle classes to count and to size the exposure denominator against. |
unresolved_nfs | single-select | both | marginal | marginal: Use observed class sharenone: Excludeall: Include at full weight | How to treat units whose vehicle class could not be resolved (NFS tier 3). |
weather | multi-select | both | dry, rain, fog | any: Anydry: Dryrain: Rainfog: Fogwinter_storm: Winter storm | Weather buckets (NOAA-derived). 'any' disables the filter. |
light_condition | multi-select | both | any | any: Anydaylight: Daylightdawn_dusk: Dawn / duskdark: Dark | Ambient-light buckets. 'any' disables the filter. |
driver_impairment | single-select | n | any | any: Anyexclude_impaired: Exclude impairedimpaired_only: Impaired only | Filter by driver-impairment coding. Route and depot modes only. |
ci_method | single-select | rate | empirical_bayes | fay_feuer: Fay-Feuer (weighted Poisson)empirical_bayes: Empirical Bayes (Gamma-Poisson) | Method for the 95% CI in route / depot modes. |
Region / mode matrix
| Region | Geofence | Route | Depot |
|---|---|---|---|
travis | ✅ | ✅ | ✅ |
houston | ✅ | - | - |
sanantonio | ✅ | - | - |
dallas | ✅ | - | - |
sf | ✅ | - | - |
la | ✅ | - | - |
phoenix | ✅ | - | - |
vegas | ✅ | - | - |
sandiego | ✅ | - | - |
sacramento | ✅ | - | - |
ca_az_interstates | - | ✅ | ✅ |