htmlwidgets gallery


leaflet

leaflet(width = "100%") %>% addProviderTiles("CartoDB") %>%
  addCircleMarkers(
    data = st_read(airports_shp),
    popup = ~ name,
    weight = 2,
    color = "green"
  )
## Reading layer `ne_10m_airports' from data source `/home/gabbo/coding/rosgeo-live/FOSSGIS-workshop/data/ne_10m_airports/ne_10m_airports.shp' using driver `ESRI Shapefile'
## Simple feature collection with 891 features and 10 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: -175.1356 ymin: -53.78147 xmax: 179.1954 ymax: 78.24672
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs

yaml

dependencies:
  - name: jquery
    version: 1.12.4
    src: "htmlwidgets/lib/jquery"
    script: jquery.min.js
  - name: leaflet
    version: 0.7.7
    src: "htmlwidgets/lib/leaflet"
    script: leaflet.js
stylesheet: leaflet.css
...