Hi, I've just installed the biscale package to make a bivariate map of crime rate and deprivation. I am new to R so I apologise if the formatting is wrong. This is the code I used:
bimap <- bi_class(LSOA, x = IMD_RANK, y = lograte, style = "quantile", dim = 3)
map2 <- ggplot() +
geom_sf(data = LSOA, mapping = aes(fill = bimap), color = "white", size = 0.1, show.legend = FALSE) +
bi_scale_fill(pal = "DkBlue", dim = 3) +
labs(
title = "Crime rate and deprivation in London",
subtitle = "Dark Blue (DkBlue) Palette"
) +
bi_theme()
And this is the error I received:
Error: Aesthetics must be either length 1 or the same as the data (4835): fill
Does anyone know how I would go about fixing this? Thanks!