I have generated a map showing the intensity of burglaries that have occurred on a street segment. I have used the tmap package from R to generate the desired street-level map. The codes are as follows:
map.burglary = tm_shape(street.crime.rates.lines) +
tm_lines(col = "b_rates",
style = "fixed",
breaks = c(0, 1, 10, 20, 50, 500),
labels = c("<1.0", "1.0-9.9", "10.0-19.9","20.0", 49.9", "50.0+"),
textNA = "Unavailable",
colorNA = "gray87",
title.col = c("Burglary (per 10 households)")) +
tm_compass(type = "8star", position = c("right","top")) +
tm_scale_bar(breaks = c(0, 0.25, 0.5, 0.75, 1)) +
tm_layout(frame = TRUE, legend.title.size = 0.8, legend.outside = TRUE, legend.outside.position = "right")
map.burglary
The resulting output:
I want to increase the line thickness of each line as the intensity of burglaries represented on the map becomes larger. I want this detail to be reflected in the map and legends. Does anyone know how to code this in R using the tmap package?