I am currently trying to show the values of different variables on the same map.
Below is my code:
tm_shape(pv_malay_merge) +
tm_fill(col = "Exposure", n = 10, title = "Policyholders' Exposure",
palette = rev(brewer.pal(n = 4, "RdYlGn"))) +
tm_borders(lwd = 0.5) +
tm_text(text = "NAME_1", size = 0.5) +
tm_shape(malay_merge) +
tm_bubbles(size = "Exposure")
The code above results in:
After that I try to change it to:
tm_shape(pv_malay_merge) +
tm_fill(col = "Exposure", n = 10, title = "Policyholders' Exposure",
palette = rev(brewer.pal(n = 4, "RdYlGn"))) +
tm_borders(lwd = 0.5) +
tm_text(text = c("NAME_1", "Exposure"), size = 1) +
tm_shape(malay_merge) +
tm_bubbles(size = "Exposure")
Notice the change in tm_text()
function. This results in:
Any suggestion on combining the maps?