the leaflet e x tras package
play

The leaflet . e x tras Package IN TE R AC TIVE MAP S W ITH L E - PowerPoint PPT Presentation

The leaflet . e x tras Package IN TE R AC TIVE MAP S W ITH L E AFL E T IN R Rich Majer u s Assistant Vice President , Colb y College The leaflet . e x tras Package We w ill foc u s on three e x tras : addSearchOSM() - make map searchable


  1. The leaflet . e x tras Package IN TE R AC TIVE MAP S W ITH L E AFL E T IN R Rich Majer u s Assistant Vice President , Colb y College

  2. The leaflet . e x tras Package We w ill foc u s on three e x tras : addSearchOSM() - make map searchable addReverseSearchOSM() - geocode w ith a mo u se click addResetMapButton() - reset map v ie w INTERACTIVE MAPS WITH LEAFLET IN R

  3. addSearchOSM () leaflet() %>% addTiles() %>% addSearchOSM() INTERACTIVE MAPS WITH LEAFLET IN R

  4. Find the T w ine Image B y TigerPa w2154, Wikipedia - P u blic Domain INTERACTIVE MAPS WITH LEAFLET IN R

  5. addRe v erseSearchOSM () leaflet() %>% addTiles() %>% addSearchOSM() %>% addReverseSearchOSM() INTERACTIVE MAPS WITH LEAFLET IN R

  6. addResetMapB u tton () leaflet() %>% addTiles() %>% addSearchOSM() %>% addReverseSearchOSM() %>% addResetMapButton() INTERACTIVE MAPS WITH LEAFLET IN R

  7. Let ' s practice ! IN TE R AC TIVE MAP S W ITH L E AFL E T IN R

  8. O v erla y Gro u ps IN TE R AC TIVE MAP S W ITH L E AFL E T IN R Rich Majer u s Assistant Vice President , Colb y College

  9. Gro u ping Colleges b y Sector m <- ca_colleges %>% ca_public <- ipeds %>% leaflet() %>% filter(sector == "Public", addProviderTiles("CartoDB") state == "CA") m %>% m %>% addCircleMarkers( addCircleMarkers( radius = 2, data = ca_public, label = ~name) group = "Public") INTERACTIVE MAPS WITH LEAFLET IN R

  10. m %>% addCircleMarkers( data = ca_public, color = ~pal(sector_label), group = "Public") %>% addCircleMarkers( data = ca_private, color = ~pal(sector_label), group = "Private") %>% addCircleMarkers( data = ca_profit, color = ~pal(sector_label), group = "For-Profit") INTERACTIVE MAPS WITH LEAFLET IN R

  11. m %>% addCircleMarkers( data = ca_public, color = ~pal(sector_label), group = "Public") %>% addCircleMarkers( data = ca_private, color = ~pal(sector_label), group = "Private") %>% addCircleMarkers( data = ca_profit, color = ~pal(sector_label), group = "For-Profit") %>% addLayersControl( overlayGroups = c("Public", "Private", "For-Profit" INTERACTIVE MAPS WITH LEAFLET IN R

  12. What We are Working To w ard INTERACTIVE MAPS WITH LEAFLET IN R

  13. Let ' s practice ! IN TE R AC TIVE MAP S W ITH L E AFL E T IN R

  14. Base Gro u ps IN TE R AC TIVE MAP S W ITH L E AFL E T IN R Rich Majer u s Assistant Vice President , Colb y College

  15. Base Gro u ps and M u ltiple Map Tiles leaflet() %>% addTiles(group = "OSM") %>% addProviderTiles("CartoDB", group = "Carto") %>% addProviderTiles("Esri", group = "Esri") INTERACTIVE MAPS WITH LEAFLET IN R

  16. leaflet() %>% addTiles(group = "OSM") %>% addProviderTiles("CartoDB", group = "Carto") %>% addProviderTiles("Esri", group = "Esri") %>% addLayersControl(baseGroups = c("OSM", "Carto", "Esri"), position = "topleft") INTERACTIVE MAPS WITH LEAFLET IN R

  17. E x ploring Esri Base Maps INTERACTIVE MAPS WITH LEAFLET IN R

  18. O v erla y and Base Gro u ps # initialize leaflet map leaflet() %>% # add basemaps with groups addTiles(group = "OSM") %>% addProviderTiles("CartoDB", group = "Carto") %>% addProviderTiles("Esri", group = "Esri") %>% INTERACTIVE MAPS WITH LEAFLET IN R

  19. O v erla y and Base Gro u ps # add marker layer for each sector with corresponding group name addCircleMarkers(data = public, radius = 2, label = ~htmlEscape(name), color = ~pal(sector_label), group = "Public") %>% addCircleMarkers(data = private, radius = 2, label = ~htmlEscape(name), color = ~pal(sector_label), group = "Private") %>% addCircleMarkers(data = profit, radius = 2, label = ~htmlEscape(name), color = ~pal(sector_label), group = "For-Profit") % # add layer controls for base and overlay groups addLayersControl(baseGroups = c("OSM", "Carto", "Esri"), overlayGroups = c("Public", "Private", "For-Profit")) INTERACTIVE MAPS WITH LEAFLET IN R

  20. The Big Re v eal INTERACTIVE MAPS WITH LEAFLET IN R

  21. Let ' s practice ! IN TE R AC TIVE MAP S W ITH L E AFL E T IN R

  22. Pieces of Flair IN TE R AC TIVE MAP S W ITH L E AFL E T IN R Rich Majer u s Assistant Vice President , Colb y College

  23. The College Search ca_public <- ipeds %>% filter(sector_label == "Public", state == "CA") ca_public %>% leaflet() %>% addProviderTiles("Esri") %>% addCircleMarkers(radius = 2, label = ~htmlEscape(name), color = ~pal(sector_label), group = "Public") %>% addSearchFeatures(targetGroups = 'Public', options = searchFeaturesOptions(zoom = 10)) INTERACTIVE MAPS WITH LEAFLET IN R

  24. # search for markers addSearchFeatures(options = addSearchFeatures( searchFeaturesOptions(zoom = 10), targetGroups = 'Public') targetGroups = 'Public') INTERACTIVE MAPS WITH LEAFLET IN R

  25. Cl u stering Colleges ipeds %>% leaflet() %>% addTiles() %>% addCircleMarkers(radius = 2, color = ~pal(sector_label), clusterOptions = markerClusterOptions()) INTERACTIVE MAPS WITH LEAFLET IN R

  26. Cl u stering Colleges INTERACTIVE MAPS WITH LEAFLET IN R

  27. Let ' s practice ! IN TE R AC TIVE MAP S W ITH L E AFL E T IN R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend