Skip to contents

Map - polygons - Create leaflet map from shapefile, in shiny app

Usage

map_shapes_leaflet(shapes, color = "green", popup = NULL)

Arguments

shapes

like from shapes_counties_from_countyfips(fips_counties_from_state_abbrev("DE")), or at least a data.frame that can be interpreted as indicating points via shapefile_from_sitepoints()

color

passed to leaflet::addPolygons()

popup

passed to leaflet::addPolygons()

Value

html widget from leaflet::leaflet()

Examples

out = testoutput_ejamit_10pts_1miles
out$results_bysite = out$results_bysite[1:2,]
map_shapes_leaflet(
  ejam2shapefile(out, save=F),
  popup = popup_from_ejscreen(out$results_bysite)
)
#> Using only basic 250 or so columns -
#> To include averages, ratios, and raw EJ scores, set varnames = 'all' or NULL.
#> To include specific columns provides those as a character vector of varnames.
#> input was not a simple feature object, but will convert to one
#> Warning: sf layer has inconsistent datum (+proj=longlat +datum=NAD83 +no_defs).
#> Need '+proj=longlat +datum=WGS84'