I've followed instructions in the above mentioned article.
install.packages("sf")
install.packages("biscale")
library(biscale)
data <- bi_class(stl_race_income, x = pctWhite, y = medInc, style = "quantile", dim = 3)
map <- ggplot() +
geom_sf(data = data, mapping = aes(fill = bi_class), color = "white", size = 0.1, show.legend = FALSE) +
bi_scale_fill(pal = "DkBlue", dim = 3) +
labs(
title = "Race and Income in St. Louis, MO",
subtitle = "Dark Blue (DkBlue) Palette"
) +
bi_theme()
Above results in: Error in ggplot() : could not find function "ggplot"
How do I fix this? One googled suggestion was to install colorspace, which I did, to no avail.
I did! Sorry that gave you brief, @bgailer, and hope the rest of your mapping is more straight forward. I've opened an issue on the package to add these missing packages to the tutorial!