saturnlighting / road-traffic-fatalities-by-light-condition

Comparative analysis of road traffic fatalities by light condition between the US and the UK
1 stars 1 forks source link

Comparing pedalcyclist crashes during dark in U.S. vs. U.K. #2

Closed elipousson closed 1 year ago

elipousson commented 1 year ago

Hello @eugenividal! I had a conversation with @Robinlovelace last week about a travel to school analysis that I'm working on and he asked if I might have any ideas about what might explain the big difference between the share of US and UK cyclist fatalities that take place in the dark. I forked the repo and added a script to download the FARS data that is a bit more succinct than the version in the README along with a visualization script.

At first I thought it might be related to the UK's greater population density but it doesn't look light there is any relationship in the FARS data, e.g. states with the lowest share of cyclist fatalities in the dark include rural states like Nebraska, Kansas, and Wisconsin, and the highest include urban areas like District of Columbia (although also rural states like Montana, Oklahoma, and Wyoming).

It also doesn't look like there is a clear relationship between the share of cyclists killed in the dark and the share for pedestrians or drivers. Again, when comparing U.S. states with lower average shares of cyclists killed in the dark to those with a higher average, the shares for pedestrians and drivers don't look much different.

I'd be curious to double-check and make sure it isn't some classification issue but, otherwise, it may be easier to try to figure out why the UK has such a large share of fatal cyclist crashes taking place during the day when the shares for pedestrians are different but at least somewhat more comparable to the U.S. If I think of anything further, I'll definitely share it here but, based on my preliminary explorations, I am stumped.

eugenividal commented 1 year ago

Hi @elipousson! Thanks for your comments. That’s very interesting! I also thought the differences between the share of US and UK cyclist fatalities in the dark could be explained, in part, by differences in population density. It is also interesting to know that the link between the share of cyclists killed in the dark and pedestrians is not clear.

Perhaps cycling levels in the dark in the US are actually higher than in the UK? I understand there are more captive cyclists in the US (who cannot choose whether to cycle in the dark). Using a denominator (distance travelled) to estimate cycling fatality risk by light conditions (daylight/dark) would help to clarify this. Although I am afraid this estimation won’t be easy, particularly to split distance travelled by light conditions. And only the estimation of fatality risk by mode of transport may give us material for a whole paper! Don’t you think, @robinlovelace? (it could be interesting).

Another explanation could be that the bikes used and clothing worn by cyclists in the UK are more night-friendly (better lights and reflective clothing), which again would be related to a higher number of captive (low-income) cyclists in the US. One of the main findings of my PhD was that in the UK socioeconomically disadvantaged people tend to cycle less overall (unlike in the US).

I am currently working on other two projects, but I’ll keep you updated once I focus again on this analysis and make some progress.

eugenividal commented 1 year ago

Oh, I almost forgot. Thanks also for the download and display scripts! It almost worked, but I got an error (that you can see below). I guess it's because the filenames on the website are not consistent. No worries, I'll work with my basic code for now and try to fix it later.

Error in `map()`:
ℹ In index: 1.
Caused by error:
! '/home/eugeni/Documents/saturn_project/road-traffic-fatalities-by-light-condition/data/FARS2011_Aux/ACC_AUX.csv' does not exist.
elipousson commented 1 year ago

I think you may need to create both a "data" and "output" folder before running the script. I forgot to include that in the setup and the script errors if the folder structure isn't in place.

Robinlovelace commented 1 year ago

Aha, thanks for the feedback @elipousson. And see my email from today!

eugenividal commented 1 year ago

Thanks, @elipousson. It works! Nice visualizations. You were right, I needed to add an "output" folder. I also had to change "ACC_AUX.csv" and "PER_AUX.csv" to "ACC_AUX.CSV" and "PER_AUX.CSV" in the code.