My manager asked me to create a bivalent chloropleth map in R from a csv file that contains latitude/longitude data and two variables. I’ve tried to use this tutorial and this stack overflow post but have been unsuccessful – the plot comes up completely empty.
This is an example of what my manager is looking for: https://jech.bmj.com/content/jech/75/6/496/F1.large.jpg
I’ve tried to use this tutorial and this stack overflow post but have been unsuccessful – the plot comes up completely empty.
Below is a mini reproducible version of the data.
df <- data.frame(Region = c(1001, 1003, 1005, 1007),
ID = c(5, 6, 7, 8),
latitude = c(32.53953, 30.72775, 31.86826, 32.99642),
longitude = c(-86.64408, -87.72207, -85.38713, -87.12511),
variable_1 = c(0.3465, 0.3028, 0.4168, 0.3866),
variable_2 = c(0.44334, 0.45972, 0.46996, 0.44406))
I am not well-versed in mapping (or in R, frankly) so I would be deeply appreciative of any help this community could provide. Even understanding what additional data I need to create a bivalent plot would be really helpful.
Thank you and please let me know of any additional info I could provide!