BW #29: Auto accidents

There seem to be more cars on the road than ever. But are there also more auto accidents? This week, we'll examine data about accidents in OECD countries.

BW #29: Auto accidents

This week, I heard so much about automated vehicles, the problems they’re having, and the promise that they’ll be safer than regular human-driven cars, that I got to thinking about regular cars, and how safe (or not) they are.

I decided to look through data from the OECD (Organization for Economic Co-operation and Development), summarizing road-accident data from their 38 member countries. I was particularly interested in seeing if countries had reduced their accident rate over the years, and if all countries have done similarly well (or poorly) at reducing accidents.

I’ve traveled quite a bit, and while I’m certainly able to drive, I generally try to avoid it if I can. I’ve driven in the US (where I grew up), in Israel (where I live), and also in Portugal (on vacation several years ago), and was curious to know how these three countries fare in terms of accident rates. (I often say that I’m glad that I learned to drive in Boston before coming to Israel, since both places have aggressive drivers, and lots of poorly labeled, narrow roads.)

From Stable Diffusion: “A whimsical auto accident, where the cars are driven by robots, in the style of Dali”

Data … and nine questions

This week, I asked you to look at two different data sources. The main one is the OECD’s report on road accidents, a CSV file you can download from:

https://stats.oecd.org/sdmx-json/data/DP_LIVE/.ROADACCID.../OECD?contentType=csv&detail=code&separator=comma&csv-lang=en

I also We'll also make use of the Wikipedia page that translates ISO 3-letter country codes into country names:

https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

Here are my nine questions and tasks for this week. Learning goals include using selecting rows and columns with .loc, calculating percentage differences, plotting with selected parts of the data, creating data frames from HTML pages, and joining:

  • Load the data from OECD into a data frame. We won't look at the columns named "INDICATOR", "FREQUENCY", or "Flag Codes."
  • What is the most recent year for which we have data? Are there any countries for which the latest data isn't from that year?