exploreSGMap: Explore data on an interactive map of Singapore

Description Usage Arguments Value Examples

View source: R/exploreSGMap.R

Description

A simple Leaflet wrapper which enables users to plot the data retrieved from the LTA APIs on an interactive map of Singapore. Some basic 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 obtain data for the coordinates and rename the respective columns to 'Latitude' and 'Longitude'.

Usage

1
2
exploreSGMap(dataframe, popup = NA, cluster = FALSE, colour = "red",
  size = 5, alpha = 0.5)

Arguments

dataframe

The dataframe containing the latitude/longitude data

popup

Variable to be displayed when a marker is clicked on - default is NA, needs to be a string of the variable name

cluster

Whether to cluster the markers or not - default is FALSE

colour

Colour of the markers - default is 'red'

size

Size of the markers - default is 5

alpha

Opacity of the markers - default is 0.5

Value

An interactive map of Singapore with the coordinates plotted as circular markers on the map

Examples

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

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