widget_od: Widget OD

View source: R/spatial_widget.R

widget_odR Documentation

Widget OD

Description

Converts an 'sf' object with two POINT geometriers into JSON for plotting in an htmlwidget

Usage

widget_od(
  data,
  origin,
  destination,
  fill_colour = NULL,
  fill_opacity = NULL,
  legend = TRUE,
  json_legend = TRUE,
  digits = 6
)

Arguments

data

sf object

origin

string specifying the column of data containing the origin geometry

destination

string specifying the column of data containing the destination geometry

fill_colour

string specifying column of sf to use for the fill colour, or a single value to apply to all rows of data

fill_opacity

string specifying column of sf to use for the fill opacity, or a single value to apply to all rows of data

legend

logical indicating if legend data will be returned

json_legend

logical indicating if the legend will be returned as json

digits

number of decimal places for rounding lon o& lat coordinates. Default 6

Examples


l <- widget_od( data = widget_arcs, origin = "origin", destination = "destination", legend = FALSE )


spatialwidget documentation built on May 29, 2024, 6:41 a.m.