-
-
Save jonathanlxy/b1c8803a48ee11f3eaa853209cc154ea to your computer and use it in GitHub Desktop.
Vision Zero Visualization Blog Post Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deaths per 1000 accidents | |
temp <- data.frame(PERIOD = death_n_label_dt$PERIOD, | |
d_rate = death_n_label_dt$N / accident_n_dt$N * 1000) | |
ggplot(data = temp, aes(x = PERIOD, y = d_rate)) + | |
geom_point(shape = 16, size = 3, color = 'red', alpha = .5) + | |
geom_line(aes(group = 1), size = 2, color = 'red', alpha = .5) + | |
labs(x = NULL, y = 'Deaths Per 1000 Accidents') + | |
theme(legend.position = 'none') + | |
geom_label(aes(y = d_rate + .03, label = round(d_rate, 2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment