Open mdsumner opened 7 years ago
Tried this code, how to save as image zoomed into Macquarie Island?
library(orsifronts) ## install. packages("orsifronts") library(leaflet) ## install.packages("leaflet") ## orsifronts is a SpatialPolygonsDataFrame (could be read via shapefile, or contoured from other data) data(orsifronts) fronts_as_points <- as(orsifronts, "SpatialPointsDataFrame") fronts_as_points <- fronts_as_points[sample(nrow(fronts_as_points), 20), ] leaflet() %>% leaflet::setMaxBounds(130, -60, 160, -40) %>% addProviderTiles(providers$Esri.NatGeoWorldMap) %>% addPolylines(data = rmapshaper::ms_simplify(orsifronts), color = ~colorFactor(viridis::viridis(nrow(orsifronts)), front)(front)) %>% addMarkers(data = fronts_as_points, label = ~front, labelOptions = labelOptions(noHide = TRUE))
@mdsumner hey, can we actually do this
Tried this code, how to save as image zoomed into Macquarie Island?