Interactive Maps with leaflet in R
Rich Majerus
Vice President of Strategy & Planning, Queens University of Charlotte
ipeds %>%
leaflet() %>%
addProviderTiles("CartoDB") %>%
addCircleMarkers(
lng = ~lng,
lat = ~lat,
popup = ~name,
color = "#FF0000")
# ipeds is specified 3 times
leaflet() %>%
addProviderTiles("CartoDB") %>%
addCircleMarkers(
lng = ipeds$lng,
lat = ipeds$lat,
popup = ipeds$name,
color = "red")
ipeds %>%
leaflet() %>%
addProviderTiles("CartoDB")%>%
addCircleMarkers(
lng = ~lng, lat = ~lat,
popup = ~name,color = "#FF0000")
Hex | Decimal | RGB Color |
---|---|---|
FF | 255 | Red |
00 | 0 | Green |
00 | 0 | Blue |
= 16^1*15 + 16^0*15
= 16*15 + 1*15
= 240 + 15
= 255
addCircleMarkers(popup = ~name)
addCircleMarkers(popup = ~paste0(name, "-", sector_label)
addCircleMarkers(popup = ~paste0("<b>",name,"</b>"," <br/>",sector_label))
ipeds %>%
leaflet() %>%
addProviderTiles("CartoDB") %>%
addCircleMarkers(label = ~name, radius = 2)
Interactive Maps with leaflet in R