For this week's #tidytuesday, I decided to play with choropleth maps! Mapping is something I'm still getting used to in #rstats but I think I got this one done pretty well. The shapefile for the NYC boroughs came from https://data.cityofnewyork.us/City-Government/Borough-Boundaries/tqmj-j8zm
@rstats @R4DSCommunity
The Rmd file for this week is at https://github.com/ldanderson2015/tidytuesday/blob/main/12-06-2022/2022_12_06_tidy_tuesday.Rmd
Also if anyone has any suggestions for a good way of arranging these plots which preserves the size well enough that the labels don't completely overshadow the map polygons, it would be much appreciated. I tried to use facet_grid/facet_wrap and then grid.arrange() but each had their own set of problems...
Thank you to @johannes_lehmann and @LeafyEricScott! I was able to use patchwork (and some additional tidying of the data) to make this visualization a bit more useful!
@rstats @R4DSCommunity @johannes_lehmann @LeafyEricScott
And now the final result! This has been a good learning experience and exactly what I was hoping for when I started interacting with this community!
@deaconlincoln
Do you mean arrange into a figure panel? Then patchwork is fantastic.
https://patchwork.data-imaginist.com/articles/patchwork.html
@johannes_lehmann I’ll check that out!
@johannes_lehmann @deaconlincoln I second using patchwork, but I'd make the sub-plots all have the same color scale and use plot_layout(guides="collect") so there's only one legend for all the subplots
@LeafyEricScott @rstats @R4DSCommunity @johannes_lehmann
I’m also considering adding a sixth map as a “key” of sorts for the boroughs for those unfamiliar (like me) and removing the labels from the others.
@deaconlincoln @rstats @R4DSCommunity @johannes_lehmann that would streamline it and make the colors pop more
@LeafyEricScott @rstats @R4DSCommunity @johannes_lehmann that’s my thinking too! I will do that and then consider this week done. Thank you again for the input and inspiration