I am not sure how to word this, but I am creating a map on R that will map the city names onto a map of TZ, and I need help to change the name of each city to a different colour when displayed on the map. but that doesn't work. (I am not familiar with R, and did some research but couldn't find a solution.
city_data <- data.frame(city_name=c("Dar es Salaam", "Mwanza", "Arusha", "Dodoma", "Mbeya"))
city_data$lat <- c(-6.7924,-2.5164,-3.3869,-6.1630,-8.9094)
city_data$lon <- c(39.2083,32.9175,36.6830,35.7516,33.4608)
ggplot(data = tanzania) +
geom_sf() +
xlab("Longitude") + ylab("Latitude") +
ggtitle("Major Cities in the United Republic of Tanzania") +
annotation_scale(location = "bl", width_hint = 0.4) +
annotation_north_arrow(location = "bl", which_north = "true",
pad_x = unit(0.0, "in"), pad_y = unit(0.2, "in"),
style = north_arrow_fancy_orienteering) +
geom_point(data = city_data, mapping = aes(x = lon, y = lat), colour = "red") +
geom_text(data = city_data, mapping=aes(x=lon, y=lat, label=city_name), nudge_y = 0.5