Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Synopsis

We plan to finalize 2023 Crash Data in May of 2024With the goal of providing finalized 2023 data sets by the end of May, we have scheduled 2 finalization dates, a primary for 2024-05-15 and a fallback for 2024-05-22.

Overall Numbers (Preliminary)

These results for 2022 and earlier reflect finalized data. The 2023 data are production as of 2024-04-24 end of day. The statistics are the same as or similar to those provided in Final year-end crash statistics. Some of the statistics from that source are omitted because their calculation may have required significantly more work to interpret and reproduce.

...

Highlight Color

Meaning

Fatality Count Differences. The official statistics have one additional fatality in 2018 and 2020. It is on off in each year.

Idiosyncratic; no obvious reason for the difference.

Differences caused by how individuals are identified as Motorcyclists. Mine is anyone whose Unit Type is Motorcycle. Something more elaborate may be being used for the official calculations. If the identifying motorcyclists is non-trivial, we might want to consider adding a person level motorcyclist flag improve analysis reproducibility.

Something strange with Injured Pedestrians

There appears to be a difference in how large truck crashes were identified in 2020 and earlier.

TLDR = Showing Work Because of Disagreeing Numbers

This is a lot of lines, but it is not complex. Create a flags for each of the person characteristics of interest. For example, person.is_bike_a, was the person a bicyclist who suffered an A injury? Sum those over crashes to get the counts of each sort of person in each crash, and joint those totals to the crash level data. Finally sum those over the years to get year totals for each types of person and/or type of crash.

Identifying fatalities from the person data is made interesting by our rule that a fatality is not counted unless both indicated as such by the law enforcement officer’s report and by the FARS system. If the injury level is not fatal on the crash report, we use whatever injury was reported on the DT4000. On the other hand, if the report shows a fatality but the FARS team determined that it was not a motor vehicle traffic crash fatality, the injury level is taken as No Apparent Injury.

Code Block
languagejulia
person.is_fatal = map(eachrow(person)) do x
   x.INJSVR=="Fatal Injury" || return false
   x.STAFATL=="Y"
end
person.is_pdo = map(eachrow(person)) do x
   x.INJSVR=="No Apparent Injury" && return true
   x.INJSVR=="Fatal Injury" || return false
   x.STAFATL=="N"
end
person.is_injury = .!(person.is_fatal.||person.is_pdo)
person.is_ainjury = person.INJSVR.=="Suspected Serious Injury"
person.is_mcycle = person.UNITTYPE.=="Motorcycle"
person.is_ped = person.UNITTYPE.=="Pedestrian"
person.is_bike = person.UNITTYPE.=="Bicycle"
person.is_mcycle_k = person.is_mcycle.&&person.is_fatal
person.is_mcycle_a = person.is_mcycle.&&person.is_ainjury
person.is_mcycle_inj = person.is_mcycle.&&person.is_injury
person.is_ped_k = person.is_ped.&&person.is_fatal
person.is_ped_a = person.is_ped.&&person.is_ainjury
person.is_ped_inj = person.is_ped.&&person.is_injury
person.is_bike_k = person.is_bike.&&person.is_fatal
person.is_bike_a = person.is_bike.&&person.is_ainjury
person.is_bike_inj = person.is_bike.&&person.is_injury

psums = combine(groupby(person, :CRSHNMBR),
   :is_fatal=>sum=>:num_fatal,
   :is_injury=>sum=>:num_injury,
   :is_ainjury=>sum=>:num_ainjury,
   :is_mcycle_k=>sum=>:num_mcycle_k,
   :is_mcycle_a=>sum=>:num_mcycle_a,
   :is_mcycle_inj=>sum=>:num_mcycle_inj,
   :is_ped_k=>sum=>:num_ped_k,
   :is_ped_a=>sum=>:num_ped_a,
   :is_ped_inj=>sum=>:num_ped_inj,
   :is_bike_k=>sum=>:num_bike_k,
   :is_bike_a=>sum=>:num_bike_a,
   :is_bike_inj=>sum=>:num_bike_inj,
)
leftjoin!(crash, psums, on=:CRSHNMBR)
...
df = combine(groupby(crash, :crash_year),
   "is_mcycle"=>sum=>"Motorcycle Crashes",
   "num_mcycle_k"=>sum=>"Motorcyclists Killed",
   "num_mcycle_inj"=>sum=>"Motorcyclists Injured",
   "num_mcycle_a"=>sum=>"Motorcyclist A-Injuries",
   "is_ped"=>sum=>"Pedestrian Crashes",
   "num_ped_k"=>sum=>"Pedestrians Killed",
   "num_ped_inj"=>sum=>"Pedestrians Injured",
   "num_ped_a"=>sum=>"Pedestrian A-Injuries",
   "is_bike"=>sum=>"Bicycle Crashes",
   "num_bike_k"=>sum=>"Bicyclists Killed",
   "num_bike_inj"=>sum=>"Bicyclists Injured",
   "num_bike_a"=>sum=>"Bicyclist A-Injuries",
)
leftjoin!(cstats, df, on=:crash_year)
...