r2d3map: Wrapper of 'r2d3' to create maps

Description Usage Arguments Examples

Description

Wrapper of 'r2d3' to create maps

Usage

1
2
3
4
5
r2d3map(data, script, css = "auto", dependencies = NULL,
  options = NULL, d3_version = c("5", "4", "3"), container = "svg",
  elementId = NULL, width = NULL, height = NULL,
  sizing = default_sizing(), viewer = c("internal", "external",
  "browser"))

Arguments

data

An 'sf' or 'sp' object to convert to topojson.

script

JavaScript file containing the D3 script.

css

CSS file containing styles. The default value "auto" will use any CSS file located alongside the script file with the same stem (e.g. "barplot.css" would be used for "barplot.js") as well as any CSS file with the name "styles.css".

dependencies

Additional HTML dependencies. These can take the form of paths to JavaScript or CSS files, or alternatively can be fully specified dependencies created with [htmltools::htmlDependency].

options

Options to be passed to D3 script.

d3_version

Major D3 version to use, the latest minor version is automatically picked.

container

The 'HTML' container of the D3 output.

elementId

Use an explicit element ID for the widget (rather than an automatically generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.

width

Desired width for output widget.

height

Desired height for output widget.

sizing

Widget sizing policy (see [htmlwidgets::sizingPolicy]).

viewer

"internal" to use the RStudio internal viewer pane for output; "external" to display in an external RStudio window; "browser" to display in an external browser.

Examples

1
# todo

dreamRs/r2d3maps documentation built on May 25, 2019, 8:17 a.m.