View source: R/f - Plot Checkerboard on Leaflet.R
f_plot_checkerboard_on_leaflet | R Documentation |
Plot Checkerboard on Leaflet.
f_plot_checkerboard_on_leaflet(
df.input,
c.id.polygon,
v.coord.point,
c.value,
c.leaflet.title = "Title",
n.layer = NULL,
v.layer = NULL,
n.round = 0,
n.dig.lab = 3,
v.info.tag.polygon.label = NULL,
v.info.veld.polygon.label = NULL,
v.info.tag.polygon.popup = NULL,
v.info.veld.polygon.popup = NULL,
b.save.leaflet = FALSE
)
df.input |
Data frame containing all info, |
c.id.polygon |
Feature name containing unique polygon ID, |
v.coord.point |
Vector with feature names of x- and y-coordinate, |
c.value |
Feature name to color the checkerboard by, |
c.leaflet.title |
Leaflet title (default: "Title") |
n.layer |
Feature to layer by (default: NULL) |
v.layer |
Vector with number to layer leaflet by (default: NULL) |
n.round |
Number to round of by (default: 0) |
n.dig.lab |
Number of digits in label (default: 3) |
v.info.tag.polygon.label |
—- (default: NULL) |
v.info.veld.polygon.label |
—- (default: NULL) |
v.info.tag.polygon.popup |
—- (default: NULL) |
v.info.veld.polygon.popup |
—- (default: NULL) |
b.save.leaflet |
Should we save the leaflet to file? (default: FALSE) |
-
Data frame used to plot polygons with f_plot_leaflet.
Pieter Overdevest
f_plot_checkerboard_on_leaflet(
df.input = df.del.act.by.cell,
c.id.polygon = "cel.id",
v.coord.point = c("bord.x.cell.mid", "bord.y.cell.mid"),
c.value = "perc.delivered",
c.leaflet.title = paste0("Sign delivery percentage in ", n.step/1000, "km-by-", n.step/1000, "km cells"),
n.layer = NULL,
v.layer = c(0, 0.001, 1, 50, 75, 90, 95, 99.999, 100),
n.round = 1,
n.dig.lab = 3,
v.info.tag.polygon.label = v.info.tag.polygon.label.,
v.info.veld.polygon.label = v.info.veld.polygon.label.,
v.info.tag.polygon.popup = v.info.tag.polygon.popup.,
v.info.veld.polygon.popup = v.info.veld.polygon.popup.,
b.save.leaflet = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.