Maryland Bridges
Data manipulation, Map visualization
Notable topics: Data manipulation, Map visualization
Recorded on: 2018-11-26
Timestamps by: Alex Cookson
Screencast
Timestamps
Using %/% operator (truncated division) to bin years into decades (e.g., 1980, 1984, and 1987 would all become "1980")
Using percent_format function from scales package to get nice-looking axis labels
Using comma_format function from scales package to get more readable axis labels (e.g., "1e+05" becomes "100,000")
Using cut function to bin continuous variable into customized breaks (also does a mutate within a group_by!)
Encoding a continuous variable to colour, then using scale_colour_gradient2 function to specify colours and midpoint
Specifying the trans argument (transformation) of the scale_colour_gradient2 function to get a logarithmic scale
Using str_to_title function to get values to Title Case (first letter of each word capitalized)
Predicting whether bridges are in "Good" condition using logistic regression (remember to specify the family argument! Dave fixes this at 52:54)
Using the augment function from the broom package to illustrate why a linear model is not a good fit
Specifying the type.predict argument in the augment function so that we get the actual predicted probability
Using a cubic spline model (a type of GAM, Generalized Additive Model) as an alternative to logistic regression