I read in the data as below and do some modifications:
data1 <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/airline-safety/air