Filters
Filters select which crashes count toward the numerator and how the exposure denominator is sized. Pass them as keyword args, a typed Selections model, or a dict (three ways), all validated locally. Each filter applies to one or more compute modes.
Discover at runtime
Filter options and defaults change as data is added, so fetch them with filters() rather than hard-coding them:
for f in hb.filters().modes["geofence"]:
print(f.id, "→", [o.id for o in f.options], "default:", f.default)This returns, per mode, every filter with its id, label, description, affects (n / d / both / rate), multiselect flag, valid options, and the default for that mode. The tables below are generated from the same source.
How affects reads
n: changes the numerator, meaning which crashes are counted.d: changes the denominator, meaning the exposure miles.both: changes numerator and denominator together, as vehicle class does.rate: changes how the rate is derived fromNandD, through weighting or the confidence interval.
Multi-select filters accept either a single value or a list. Omitted fields fall back to the listed default.
Posted speed
Operating domains state the speed limit as a cap, so the client takes one in mph:
hb.compute(region="sf", posted_speed_max=45) # roads posted at 45 mph or lessThe cap must be one of the 5 mph steps from 15 to 65. The client expands it before validation into posted_speed, the contiguous run of bands the API takes: le15 (15 mph or less), s20, s25 and so on to ge70 (70 mph or more). Pass posted_speed=[...] yourself for a window that is not anchored at the bottom, for example ["s50", "s55", "s60", "s65", "ge70"] for freeway speeds. A cap of 70 or more is every band and therefore the unfiltered rate, so the client refuses it and you leave the filter unset instead. speed_bands_up_to(45) returns the list if you want to build it yourself.
It applies to both sides of the rate. A crash counts when its road segment is posted within the selection, and the exposure is the miles driven on segments in that range. Each segment's speed comes from a city speed-limit layer where one exists, then OpenStreetMap maxspeed, then HPMS SPEED_LIMIT, then an assumed value by road class. Each region's data notes give the share of miles on that assumed value.
Selecting every step is the unfiltered rate. Built for San Francisco and Las Vegas so far, and a no-op elsewhere, so check the region before quoting a per-speed rate.
Geofence filters
Outcome outcome
Type: single-select
Affects: n
Default: police_reported
What kind of crash to count. Each outcome is a subset of police-reported.
| Option | Meaning |
|---|---|
police_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) |
Minimum damage severity severity
Type: int
Affects: n
Default: 1
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
Options: 1, 2, 3, 4, 5, 6, 7
Under-reporting adjustment under_reporting
Type: single-select
Affects: n
Default: none
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
| Option | Meaning |
|---|---|
none | None (unadjusted) |
adjusted | Adjusted (Blincoe et al. 2023) |
Fatal definition fatal_definition
Type: single-select
Affects: n
Default: thirty_day_equivalent
How a death is counted for the fatal outcome. US sources count a death within 30 days of the crash. Tokyo's source counts within 24 hours, so its fatal count is scaled by the Tokyo Metropolitan Police's published 30-day to 24-hour ratio for the crash year (1.26 in 2022, 1.30 in 2023, 1.33 in 2024) to be comparable.
| Option | Meaning |
|---|---|
thirty_day_equivalent | 30-day equivalent |
as_recorded | As recorded (24-hour) |
How it is computed
'as_recorded' shows the raw 24-hour count. No effect on any other outcome or on a region already on the 30-day definition.
In-transport in_transport
Type: single-select
Affects: n
Default: in_transport
Whether to exclude parked vehicles (Vehicle Parked Flag).
| Option | Meaning |
|---|---|
in_transport | In-transport only |
include_all | Include parked |
Desk reports desk_reports
Type: single-select
Affects: n
Default: exclude
Whether to count crashes the driver reported at a police station instead of an officer attending the scene. Excluded by default, because a source that marks the channel is the exception: most states route the driver's own report to a motor-vehicle agency or drop it, so counting them makes a region read high against every other one.
| Option | Meaning |
|---|---|
exclude | Exclude desk reports |
include_all | Include desk reports |
How it is computed
A region whose source does not mark the channel has none to exclude and the filter is a no-op there.
Posted speed posted_speed
Type: multi-select
Affects: both
Default: le15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s65, ge70
Posted speed limit of the road, applied to both sides of the rate. A crash counts when its road segment is posted within the selected range, and the exposure is the miles driven on segments in that range.
| Option | Meaning |
|---|---|
le15 | 15 mph or less |
s20 | 20 mph |
s25 | 25 mph |
s30 | 30 mph |
s35 | 35 mph |
s40 | 40 mph |
s45 | 45 mph |
s50 | 50 mph |
s55 | 55 mph |
s60 | 60 mph |
s65 | 65 mph |
ge70 | 70 mph or more |
How it is computed
Each segment's speed comes from a city speed-limit layer where one exists, then OpenStreetMap maxspeed, then HPMS, then an assumed value by road class. Selecting every step is the unfiltered rate. Built for San Francisco and Las Vegas so far and a no-op elsewhere.
Ego vehicle type ego_vehicle
Type: multi-select
Affects: both
Default: cars, light_trucks, heavy_trucks, motorcycles, buses
Vehicle classes to count and to size the exposure denominator against. Also selects the hourly traffic curve used by time_of_day, since fleets do not share a day.
| Option | Meaning |
|---|---|
cars | Cars |
light_trucks | Light trucks |
heavy_trucks | Heavy trucks |
motorcycles | Motorcycles |
buses | Buses |
other | Other |
Unresolved vehicle class unresolved_nfs
Type: single-select
Affects: both
Default: marginal
How to treat units whose vehicle class could not be resolved (NFS tier 3).
| Option | Meaning |
|---|---|
marginal | Use observed class share |
none | Exclude |
all | Include at full weight |
Automated-driving traffic automation_traffic
Type: single-select
Affects: both
Default: include_all
Include all traffic, exclude only ADS-controlled vehicle units, or exclude every vehicle unit in an ADS-involved crash. Either exclusion also subtracts period-, class-, road- and cell-matched ADS mileage; the request is rejected when matching exposure is unavailable.
| Option | Meaning |
|---|---|
include_all | Include all traffic |
exclude_ads_units | Exclude ADS units |
exclude_ads_involved_crashes | Exclude ADS-involved crashes |
Road type road_type
Type: multi-select
Affects: both
Default: collector_local, arterial, other_freeway, interstate
Functional road classes to include. The dynamic operator multiplier only applies when every selected class is a surface street (arterial / collector_local).
| Option | Meaning |
|---|---|
interstate | Interstate |
other_freeway | Other freeway / expressway |
arterial | Arterial |
collector_local | Collector / local |
Operator weighting operator_weighting
Type: single-select
Affects: rate
Default: region_wide
Plain region-wide Σ/Σ rate, or the Chen 2025 operator-weighted spatial multiplier (needs an operator's rider-only mileage layer). The applied multiplier can be overridden with the operator_weight field. The old value county_wide is still accepted.
| Option | Meaning |
|---|---|
region_wide | Region-wide |
robotaxi | Robotaxi |
Multiplier VMT source multiplier_vmt
Type: single-select
Affects: rate
Default: calibrated
Exposure source used inside the operator-weighted multiplier. Only relevant when operator_weighting=robotaxi (and ignored when operator_weight is set explicitly).
| Option | Meaning |
|---|---|
calibrated | Calibrated (TxDOT × VM-4) |
hpms | HPMS (Chen 2025) |
Denominator VMT source denominator_vmt
Type: single-select
Affects: d
Default: calibrated
Road-mileage dataset for the rate denominator. Offered where the pipeline built a second denominator to compare against: California (Caltrans CPRD vs HPMS) and Massachusetts (MassDOT per-segment VMT vs HPMS). Texas, Arizona and Nevada have a single state-DOT calibrated denominator and reject 'hpms' with a 400.
| Option | Meaning |
|---|---|
calibrated | CPRD (Caltrans) |
hpms | HPMS (functional class) |
Cell tiling tiling
Type: single-select
Affects: both
Default: s2
Spatial cell scheme for the per-cell map and geofence aggregation. 'S2 level 13' (~1.27 sq km) is the default and matches the cells of the published robotaxi benchmark.
| Option | Meaning |
|---|---|
s2 | S2 level 13 |
h3 | H3 resolution 8 |
How it is computed
'H3 resolution 8' (~0.74 sq km) is an alternative for an H3-native framing; it is preliminary, static-rate only (operator weighting is unavailable), and served only for regions with H3 artifacts built (see /v1/regions tilings).
Weather weather
Type: multi-select
Affects: both
Default: any
Weather buckets (NOAA-derived). 'any' applies no conditioning, so the denominator is the full VMT with no exposure approximation, and it is the default. The per-bucket options scale VMT by the share of station-hours in that bucket.
| Option | Meaning |
|---|---|
any | All weather |
dry | Clear/cloudy |
rain | Rain |
fog | Fog |
winter_storm | Snow & ice |
How it is computed
An hour takes the condition of the station's SCHEDULED report rather than the worst report filed inside it, because the quantity wanted is the share of TIME in a condition and one instant sampled at a fixed offset estimates that without bias. Taking the worst of N reports estimates something larger, and larger the more often a station reports: it inflated rain hours by 1.06x at one report an hour and 1.80x at three. Where a measured traffic factor exists, the hour share is then converted to a share of MILES, since drivers travel less in bad weather: California rain hours carry 0.807 of their proportional traffic, so a rain denominator built from hour shares alone is about 24% too large and its rate correspondingly too low. Factors are measured for California and Pennsylvania; elsewhere the hour share is served unchanged and an adverse-condition rate should be read as a floor. They do not travel: Pennsylvania rain carries 0.956 of its proportional traffic against California's 0.808, because rain is routine there and drivers barely reduce travel for it. The compute response reports which basis was used in weather_exposure_basis. Thunderstorm (WMO 90-96) counts as RAIN, not as snow and ice. No crash source in the tool has a thunderstorm code, so an officer records one as rain, and leaving it on the snow side put hours in that denominator its numerator could never match: it was 22.9% of Philadelphia's snow hours, 99.6% of Houston's, and 100% of San Diego's and Sacramento's, which now report no snow exposure at all and so no rate. The buckets partition: a crash names one condition, so the four rates decompose the unconditioned one. Where a source files two weather fields, both are read and the result is resolved to a single bucket by the same severity rank the station-hours use (snow and ice over rain over fog), because an hour carrying several codes is counted once and the numerator has to match. 'fog' is offered here but the UI does not show it, and its rate should not be used: the officer's fog code and the station's fog report rarely describe the same hour. Joining California crashes to the nearest station's report, an officer coded fog in 4-23% of station-reported fog hours, against 47-59% for rain under the same join, and no visibility threshold closes the gap. The cause is that fog is not a county-scale condition there: two Bay Area stations 16 km apart agree on which hours are foggy only 2-7% of the time, so no officer could agree with the nearest one. Pennsylvania is different and still off: its stations agree on fog 19-36% of the time, but the county files 25 fog crashes a year, too few to check at all. 'winter_storm' is served for Philadelphia and offered but not shown elsewhere. California has too few hours to estimate exposure from, 125 station-hours against a 1,000-hour floor, so its factor is held at a neutral 1.0. Pennsylvania measures 0.753 on 22,420 hours, and its snow code tracks the station's report at 2.44x against a null of 0.99x, so the condition is served there. Because PennDOT publishes no day of month, that check joins a crash to every date in its (month, weekday) and scores the candidate mean, with a California city measured the same way for the reference (see scripts/analyze_weather_code_agreement.py). A list is accepted and its fractions are summed.
Light condition light_condition
Type: multi-select
Affects: both
Default: any
Ambient-light buckets. 'any' disables the filter. Superseded for reviewed regions by time_of_day, which conditions on the same thing with a calibrated denominator; the two cannot be combined.
| Option | Meaning |
|---|---|
any | Any |
daylight | Daylight |
dawn_dusk | Dawn / dusk |
dark | Dark |
How it is computed
Not offered in the UI, and a light-conditioned rate is uncalibrated: the buckets are shares of station-HOURS, and unlike the weather buckets no mile-share correction has been applied. Dark hours carry substantially less traffic than their share of the clock, so a dark denominator is too large and its rate too low, and daylight errs the other way. The crash-side classification itself is sound: solar geometry reproduces the officer's own light coding on 87.5% of California crashes, with bucket shares matching to 1.6pp. Selecting a light bucket together with a weather bucket multiplies the two shares as though they were independent, which they are not: fog and dark co-occur about 1.36x more often than the product implies.
Time of day time_of_day
Type: multi-select
Affects: both
Default: any
Local clock hours, e.g. ["h22","h23","h00"] for a window across midnight. A span is the set of hours in it, so it need not be contiguous. Selecting all 24 collapses to "any", since picking every hour conditions on nothing.
Options: any Any, h00 00:00, h01 01:00, h02 02:00, h03 03:00, h04 04:00, h05 05:00, h06 06:00, h07 07:00, h08 08:00, h09 09:00, h10 10:00, h11 11:00, h12 12:00, h13 13:00, h14 14:00, h15 15:00, h16 16:00, h17 17:00, h18 18:00, h19 19:00, h20 20:00, h21 21:00, h22 22:00, h23 23:00
How it is computed
The denominator comes from a weather-by-hour joint rather than two marginals multiplied: how often each condition occupies an hour, times how much traffic that hour carries (FHWA TMAS). Weather and hour are dependent by an amount that varies by city, so a product would be wrong by a knowable amount: an overnight hour is 1.23x as likely to be raining as independence implies in the Bay Area, and 0.98x in San Diego. Measured on clock hours rather than on solar darkness, which is entangled with season. Each weather bucket's 24 hours sum back to that bucket's own share, so turning this filter on cannot move a weather-only rate. The traffic curve follows ego_vehicle, blended by the miles the denominator counts for each class: in California heavy trucks drive 18.9% of their miles in 22:00-06:00 against cars' 12.3%, so serving one fleet's curve to another is worth about 1.5x on an overnight rate. The curves are per state: Pennsylvania reads 19.2% and 9.3% for the same two fleets. Two limits: the hour profile is measured statewide, so it carries no local or road-type shape, and it is served only where it has been reviewed. Cannot be combined with light_condition, which partitions the same day differently.
Day of week day_type
Type: single-select
Affects: both
Default: any
Weekday or weekend, where the weekend runs Friday 18:00 through Monday 05:59. Not the calendar weekend: Friday evening behaves like the weekend and Monday's small hours behave like Sunday night, and this is also the boundary Scanlon et al.
| Option | Meaning |
|---|---|
any | Any |
weekday | Weekday |
weekend | Weekend |
How it is computed
(2026) use, which is the only external benchmark for this axis. Selecting both collapses to "any". This shares one denominator with time_of_day rather than multiplying a separate share into it, because the two day types do not have the same shape across the day: a weekend 05:00 hour carries 0.56x what a weekday one does, while midnight carries 1.40x. Their 22:00-06:00 totals agree to 9%, so multiplying marginals would be a no-op across a wide window and about 2x wrong across a narrow one. Because the two arms recombine to the pooled hourly curve exactly, selecting both cannot move a time-of-day answer and selecting neither cannot move anything. Cannot be combined with light_condition, which conditions on the same clock. Served only where hourly exposure has been reviewed.
Crash year crash_year
Type: int (multi)
Affects: n
Default: 2022
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.
Options: 2022, 2023, 2024, 2025
How it is computed
The listed years are advertised, not region-validated: years absent from a region are silently ignored, so asking for one returns N=0. Coverage is not uniform. Most regions carry 2022-2024, and Miami-Dade carries 2023-2025. Omit the field to get each region's own default, which is what /v1/regions and the UI use.
Route filters
Outcome outcome
Type: single-select
Affects: n
Default: police_reported
What kind of crash to count. Each outcome is a subset of police-reported.
| Option | Meaning |
|---|---|
police_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) |
Minimum damage severity severity
Type: int
Affects: n
Default: 1
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
Options: 1, 2, 3, 4, 5, 6, 7
Under-reporting adjustment under_reporting
Type: single-select
Affects: n
Default: none
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
| Option | Meaning |
|---|---|
none | None (unadjusted) |
adjusted | Adjusted (Blincoe et al. 2023) |
In-transport in_transport
Type: single-select
Affects: n
Default: in_transport
Whether to exclude parked vehicles (Vehicle Parked Flag).
| Option | Meaning |
|---|---|
in_transport | In-transport only |
include_all | Include parked |
Ego vehicle type ego_vehicle
Type: multi-select
Affects: both
Default: combination
Vehicle classes to count and to size the exposure denominator against.
| Option | Meaning |
|---|---|
cars | Cars |
light_trucks | Light trucks |
combination | Combination trucks (Class 8 / tractor-trailer) |
motorcycles | Motorcycles |
buses | Buses |
other | Other |
Unresolved vehicle class unresolved_nfs
Type: single-select
Affects: both
Default: marginal
How to treat units whose vehicle class could not be resolved (NFS tier 3).
| Option | Meaning |
|---|---|
marginal | Use observed class share |
none | Exclude |
all | Include at full weight |
Weather weather
Type: multi-select
Affects: both
Default: any
Weather buckets (NOAA-derived). 'any' applies no conditioning, so the denominator is the full VMT with no exposure approximation, and it is the default. The per-bucket options scale VMT by the share of station-hours in that bucket.
| Option | Meaning |
|---|---|
any | All weather |
dry | Clear/cloudy |
rain | Rain |
fog | Fog |
winter_storm | Snow & ice |
How it is computed
An hour takes the condition of the station's SCHEDULED report rather than the worst report filed inside it, because the quantity wanted is the share of TIME in a condition and one instant sampled at a fixed offset estimates that without bias. Taking the worst of N reports estimates something larger, and larger the more often a station reports: it inflated rain hours by 1.06x at one report an hour and 1.80x at three. Where a measured traffic factor exists, the hour share is then converted to a share of MILES, since drivers travel less in bad weather: California rain hours carry 0.807 of their proportional traffic, so a rain denominator built from hour shares alone is about 24% too large and its rate correspondingly too low. Factors are measured for California and Pennsylvania; elsewhere the hour share is served unchanged and an adverse-condition rate should be read as a floor. They do not travel: Pennsylvania rain carries 0.956 of its proportional traffic against California's 0.808, because rain is routine there and drivers barely reduce travel for it. The compute response reports which basis was used in weather_exposure_basis. Thunderstorm (WMO 90-96) counts as RAIN, not as snow and ice. No crash source in the tool has a thunderstorm code, so an officer records one as rain, and leaving it on the snow side put hours in that denominator its numerator could never match: it was 22.9% of Philadelphia's snow hours, 99.6% of Houston's, and 100% of San Diego's and Sacramento's, which now report no snow exposure at all and so no rate. The buckets partition: a crash names one condition, so the four rates decompose the unconditioned one. Where a source files two weather fields, both are read and the result is resolved to a single bucket by the same severity rank the station-hours use (snow and ice over rain over fog), because an hour carrying several codes is counted once and the numerator has to match. 'fog' is offered here but the UI does not show it, and its rate should not be used: the officer's fog code and the station's fog report rarely describe the same hour. Joining California crashes to the nearest station's report, an officer coded fog in 4-23% of station-reported fog hours, against 47-59% for rain under the same join, and no visibility threshold closes the gap. The cause is that fog is not a county-scale condition there: two Bay Area stations 16 km apart agree on which hours are foggy only 2-7% of the time, so no officer could agree with the nearest one. Pennsylvania is different and still off: its stations agree on fog 19-36% of the time, but the county files 25 fog crashes a year, too few to check at all. 'winter_storm' is served for Philadelphia and offered but not shown elsewhere. California has too few hours to estimate exposure from, 125 station-hours against a 1,000-hour floor, so its factor is held at a neutral 1.0. Pennsylvania measures 0.753 on 22,420 hours, and its snow code tracks the station's report at 2.44x against a null of 0.99x, so the condition is served there. Because PennDOT publishes no day of month, that check joins a crash to every date in its (month, weekday) and scores the candidate mean, with a California city measured the same way for the reference (see scripts/analyze_weather_code_agreement.py). A list is accepted and its fractions are summed.
Light condition light_condition
Type: multi-select
Affects: both
Default: any
Ambient-light buckets. 'any' disables the filter. Superseded for reviewed regions by time_of_day, which conditions on the same thing with a calibrated denominator; the two cannot be combined.
| Option | Meaning |
|---|---|
any | Any |
daylight | Daylight |
dawn_dusk | Dawn / dusk |
dark | Dark |
How it is computed
Not offered in the UI, and a light-conditioned rate is uncalibrated: the buckets are shares of station-HOURS, and unlike the weather buckets no mile-share correction has been applied. Dark hours carry substantially less traffic than their share of the clock, so a dark denominator is too large and its rate too low, and daylight errs the other way. The crash-side classification itself is sound: solar geometry reproduces the officer's own light coding on 87.5% of California crashes, with bucket shares matching to 1.6pp. Selecting a light bucket together with a weather bucket multiplies the two shares as though they were independent, which they are not: fog and dark co-occur about 1.36x more often than the product implies.
Driver impairment driver_impairment
Type: single-select
Affects: n
Default: any
Filter by driver-impairment coding. Route and depot modes only.
| Option | Meaning |
|---|---|
any | Any |
exclude_impaired | Exclude impaired |
impaired_only | Impaired only |
Confidence-interval method ci_method
Type: single-select
Affects: rate
Default: fay_feuer
Method for the 95% CI in route / depot modes.
| Option | Meaning |
|---|---|
fay_feuer | Fay-Feuer (weighted Poisson) |
empirical_bayes | Empirical Bayes (Gamma-Poisson) |
Depot filters
Outcome outcome
Type: single-select
Affects: n
Default: police_reported
What kind of crash to count. Each outcome is a subset of police-reported.
| Option | Meaning |
|---|---|
police_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) |
Minimum damage severity severity
Type: int
Affects: n
Default: 1
Minimum CRIS vehicle-damage rating (1–7) a unit must have to be counted. Ignored for SF (SWITRS records no damage rating).
Options: 1, 2, 3, 4, 5, 6, 7
Under-reporting adjustment under_reporting
Type: single-select
Affects: n
Default: none
Apply Blincoe et al. 2023 NHTSA under-reporting multipliers (PDO ×2.48, non-fatal injury ×1.47, fatal ×1.0).
| Option | Meaning |
|---|---|
none | None (unadjusted) |
adjusted | Adjusted (Blincoe et al. 2023) |
In-transport in_transport
Type: single-select
Affects: n
Default: in_transport
Whether to exclude parked vehicles (Vehicle Parked Flag).
| Option | Meaning |
|---|---|
in_transport | In-transport only |
include_all | Include parked |
Ego vehicle type ego_vehicle
Type: multi-select
Affects: both
Default: combination
Vehicle classes to count and to size the exposure denominator against.
| Option | Meaning |
|---|---|
cars | Cars |
light_trucks | Light trucks |
combination | Combination trucks (Class 8 / tractor-trailer) |
motorcycles | Motorcycles |
buses | Buses |
other | Other |
Unresolved vehicle class unresolved_nfs
Type: single-select
Affects: both
Default: marginal
How to treat units whose vehicle class could not be resolved (NFS tier 3).
| Option | Meaning |
|---|---|
marginal | Use observed class share |
none | Exclude |
all | Include at full weight |
Weather weather
Type: multi-select
Affects: both
Default: any
Weather buckets (NOAA-derived). 'any' applies no conditioning, so the denominator is the full VMT with no exposure approximation, and it is the default. The per-bucket options scale VMT by the share of station-hours in that bucket.
| Option | Meaning |
|---|---|
any | All weather |
dry | Clear/cloudy |
rain | Rain |
fog | Fog |
winter_storm | Snow & ice |
How it is computed
An hour takes the condition of the station's SCHEDULED report rather than the worst report filed inside it, because the quantity wanted is the share of TIME in a condition and one instant sampled at a fixed offset estimates that without bias. Taking the worst of N reports estimates something larger, and larger the more often a station reports: it inflated rain hours by 1.06x at one report an hour and 1.80x at three. Where a measured traffic factor exists, the hour share is then converted to a share of MILES, since drivers travel less in bad weather: California rain hours carry 0.807 of their proportional traffic, so a rain denominator built from hour shares alone is about 24% too large and its rate correspondingly too low. Factors are measured for California and Pennsylvania; elsewhere the hour share is served unchanged and an adverse-condition rate should be read as a floor. They do not travel: Pennsylvania rain carries 0.956 of its proportional traffic against California's 0.808, because rain is routine there and drivers barely reduce travel for it. The compute response reports which basis was used in weather_exposure_basis. Thunderstorm (WMO 90-96) counts as RAIN, not as snow and ice. No crash source in the tool has a thunderstorm code, so an officer records one as rain, and leaving it on the snow side put hours in that denominator its numerator could never match: it was 22.9% of Philadelphia's snow hours, 99.6% of Houston's, and 100% of San Diego's and Sacramento's, which now report no snow exposure at all and so no rate. The buckets partition: a crash names one condition, so the four rates decompose the unconditioned one. Where a source files two weather fields, both are read and the result is resolved to a single bucket by the same severity rank the station-hours use (snow and ice over rain over fog), because an hour carrying several codes is counted once and the numerator has to match. 'fog' is offered here but the UI does not show it, and its rate should not be used: the officer's fog code and the station's fog report rarely describe the same hour. Joining California crashes to the nearest station's report, an officer coded fog in 4-23% of station-reported fog hours, against 47-59% for rain under the same join, and no visibility threshold closes the gap. The cause is that fog is not a county-scale condition there: two Bay Area stations 16 km apart agree on which hours are foggy only 2-7% of the time, so no officer could agree with the nearest one. Pennsylvania is different and still off: its stations agree on fog 19-36% of the time, but the county files 25 fog crashes a year, too few to check at all. 'winter_storm' is served for Philadelphia and offered but not shown elsewhere. California has too few hours to estimate exposure from, 125 station-hours against a 1,000-hour floor, so its factor is held at a neutral 1.0. Pennsylvania measures 0.753 on 22,420 hours, and its snow code tracks the station's report at 2.44x against a null of 0.99x, so the condition is served there. Because PennDOT publishes no day of month, that check joins a crash to every date in its (month, weekday) and scores the candidate mean, with a California city measured the same way for the reference (see scripts/analyze_weather_code_agreement.py). A list is accepted and its fractions are summed.
Light condition light_condition
Type: multi-select
Affects: both
Default: any
Ambient-light buckets. 'any' disables the filter. Superseded for reviewed regions by time_of_day, which conditions on the same thing with a calibrated denominator; the two cannot be combined.
| Option | Meaning |
|---|---|
any | Any |
daylight | Daylight |
dawn_dusk | Dawn / dusk |
dark | Dark |
How it is computed
Not offered in the UI, and a light-conditioned rate is uncalibrated: the buckets are shares of station-HOURS, and unlike the weather buckets no mile-share correction has been applied. Dark hours carry substantially less traffic than their share of the clock, so a dark denominator is too large and its rate too low, and daylight errs the other way. The crash-side classification itself is sound: solar geometry reproduces the officer's own light coding on 87.5% of California crashes, with bucket shares matching to 1.6pp. Selecting a light bucket together with a weather bucket multiplies the two shares as though they were independent, which they are not: fog and dark co-occur about 1.36x more often than the product implies.
Driver impairment driver_impairment
Type: single-select
Affects: n
Default: any
Filter by driver-impairment coding. Route and depot modes only.
| Option | Meaning |
|---|---|
any | Any |
exclude_impaired | Exclude impaired |
impaired_only | Impaired only |
Confidence-interval method ci_method
Type: single-select
Affects: rate
Default: empirical_bayes
Method for the 95% CI in route / depot modes.
| Option | Meaning |
|---|---|
fay_feuer | Fay-Feuer (weighted Poisson) |
empirical_bayes | Empirical Bayes (Gamma-Poisson) |
Mode-specific vehicle classes
Route and depot modes count Class-8 combination trucks (combination) to match the combination-truck exposure denominator, so combination replaces heavy_trucks in those modes.