Description Usage Arguments Examples
Wrapper of 'r2d3' to create maps
1 2 3 4 5 |
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. |
1 | # todo
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.