Takes the output of ejamit() and uses mapfastej()
to
create a map of the points.
Arguments
- ejamitout
output of ejamit()
- radius
radius in miles
- column_names
can be "ej", passed to
mapfast()
- launch_browser
logical optional whether to open the web browser to view the map
- shp
shapefile it can map if analysis was for polygons, for example
Value
like what mapfastej()
returns
Details
Gets radius by checking ejamitout$results_overall$radius.miles You can use browse=TRUE to save it as a shareable .html file and see it in your web browser.
Examples
pts = testpoints_100
mapfast(pts)
# out = ejamit(pts, radius = 1)
out = testoutput_ejamit_100pts_1miles
# See in RStudio viewer pane
ejam2map(out, launch_browser = FALSE)
#> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored
mapfastej(out$results_bysite[c(12,31),])
# \donttest{
# See in local browser instead
ejam2map(out)
#> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored
#> /tmp/RtmpuU15oN/mapfast_2a00139d1839.html
# Open folder where interactive map
# .html file is saved, so you can share it:
x = ejam2map(out)
#> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored
#> /tmp/RtmpuU15oN/mapfast_2a00595ae072.html
fname = map2browser(x)
#> Error in map2browser(x): must be in interactive mode in R to view html widget this way
# browseURL(normalizePath(dirname(fname))) # to open the temp folder
# file.copy(fname, "./map.html") # to copy map file to working directory
out <- testoutput_ejscreenapi_plus_5
mapfastej(out)
#> Warning: Not all summary index columns found. Using NA values for all summary indexes in map popups.
# }