A simple ggmap wrapper which enables users to plot the data retrieved from the LTA APIs on a static map of Singapore. Some simple options are provided for ease of use. Note that this function only works automatically with outputs from getTaxiAvail, getCarparkAvail, getTrafficIncidents, getVMS, and getTrafficImages from this package. For all others, please rename the latitude and longitude columns to 'Latitude' and 'Longitude' respectively.
plotSGMap(dataframe, colour = "red", size = 1, alpha = 0.5, darken = 0)
dataframe | The dataframe containing the latitude/longitude data |
---|---|
colour | Colour of the markers - default is 'red' |
size | Size of the markers - default is 1 |
alpha | Opacity of the markers - default is 0.5 |
darken | How dark the base map should be - default is 0 |
A static Singapore map with the coordinates plotted
# NOT RUN { mydata <- getTrafficImages(mykey) plotSGMap(mydata, cluster = FALSE, colour = 'black', size = 7, alpha = 0.7) # }