mass-tracts

Author

Nithura

read_csv("mass-tracts.csv", show_col_types = FALSE) |> ggplot(aes(x= med_income, y= race, fill = race)) + geom_density(alpha = 0.5, adjust = 2) + labs(
  title = "Median Income for Massachusetts Census Tracts",
  subtitle = "The richest tracts are White",
  x = "Median Income", y= "Race", 
  caption = "The race of each tract is determined by the most numerous racial group \n present in that tract. Data from the American Community Survey 2022"
) + 
scale_x_continuous(labels = scales::dollar_format()) + scale_fill_manual(values = c("Hispanic" = "red", "Black" = "green", "Asian" = "blue", "White" = "purple")) +
  theme_minimal() +
  theme(plot.title = element_text(size = 20),
        plot.subtitle = element_text(size = 15),
        plot.caption = element_text(size = 10))