All,
Please see below code to a R script. I am simply trying to populate a map of UK with list of stores (storeLocations) and customers (CustomerLocations).
STRTRADECODE is the column name within StoreLocations table which contains name of a particular store.
I am unable to output the labels. Please help.
Thanks in advance.
library(RgoogleMaps)
library(maps)
library(ggmap)
library(ggplot)
UKMap <- qmap("United Kingdom", zoom = 6.0)
storeOverlay <- geom_point(aes(x = longitude, y = latitude),
data = StoreLocations, colour = "red")
storeOverlay <- storeOverlay + geom_text(data= StoreLocations, aes(label=STRTRADECODE))
CustomerOverlay <- geom_point(aes(x = longitude, y = latitude),
data = CustomerLocations, colour = "green")
UKMap + CustomerOverlay + storeOverlay