knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" ) library(deckgl)
The r-deckgl package makes the open-source JavaScript library deck.gl available within R via the htmlwidgets package.
install.packages("deckgl")
You can install the latest version of r-deckgl from github with:
# install.packages("remotes") remotes::install_github("crazycapivara/deckgl")
The JavaScript library of r-deckgl uses webpack as module bundler. Therefore, you need node.js to build the module. All JavaScript code is located in the javascript/src
folder and test components go to javascript/src/test-components
.
Install deps and build the library from inside the javascript
folder with:
npm install npm run build
To spin up the webpack-dev-server run:
npm run start
If the deckgl
widget is not visible in the viewer pane of RStudio, just open it in your browser by clicking "Show in new window" and everything will be fine.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.