powered by
Converts an `sf` object with POINT geometriers into JSON for plotting in an htmlwidget
widget_point( data, fill_colour = NULL, fill_opacity = NULL, lon = NULL, lat = NULL, legend = TRUE, json_legend = TRUE, digits = 6 )
sf object
sf
string specifying column of sf to use for the fill colour, or a single value to apply to all rows of data
string specifying column of sf to use for the fill opacity, or a single value to apply to all rows of data
string specifying the column of data containing the longitude. Ignored if using an sf object
data
string specifying the column of data containing the latitude. Ignored if using an sf object
logical indicating if legend data will be returned
logical indicating if the legend will be returned as json
number of decimal places for rounding lon o& lat coordinates. Default 6
l <- widget_point( data = widget_capitals, legend = FALSE )
Run the code above in your browser using DataLab