plotSGMap: Plot data on a static map of Singapore

Description Usage Arguments Value Examples

View source: R/plotSGMap.R

Description

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.

Usage

1
2
plotSGMap(dataframe, colour = "red", size = 1, alpha = 0.5,
  darken = 0)

Arguments

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

Value

A static Singapore map with the coordinates plotted

Examples

1
2
mydata <- getTrafficImages(mykey)
plotSGMap(mydata, cluster = FALSE, colour = 'black', size = 7, alpha = 0.7)

shaunkhoo/ltaer documentation built on Sept. 6, 2020, 8:24 p.m.