Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crazycapivara/deckgl

An R Interface to deck.gl
https://github.com/crazycapivara/deckgl

deck-gl htmlwidgets mapbox-gl maps r rspatial spatial webgl

Last synced: about 2 months ago
JSON representation

An R Interface to deck.gl

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
library(deckgl)
```

# r-deckgl: An R Interface to deck.gl

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/deckgl)](https://cran.r-project.org/package=deckgl) [![github_status_badge](https://img.shields.io/badge/github-v0.3.0-blue.svg)](https://github.com/crazycapivara/deckgl/releases/latest) [![Travis-CI Build Status](https://travis-ci.org/crazycapivara/deckgl.svg?branch=master)](https://travis-ci.org/crazycapivara/deckgl) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![deck.gl Version](https://img.shields.io/badge/deck.gl-v8.1.9-blue.svg)](https://github.com/visgl/deck.gl/releases/tag/v8.1.9)

The r-deckgl package makes the open-source JavaScript library [deck.gl](https://deck.gl/) available within R via the [htmlwidgets](https://www.htmlwidgets.org/) package.

![vancouver-blocks](man/figures/README-vancouver-blocks.png)

## Installation

```{r cran-installation, eval = FALSE}
install.packages("deckgl")
```

You can install the latest version of r-deckgl from github with:

```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("crazycapivara/deckgl")
```

```{r, child="vignettes/partials/_get-started"}
```

## Development

The JavaScript library of r-deckgl uses [webpack](https://webpack.js.org/) as module bundler. Therefore, you need [node.js](https://nodejs.org) 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:

```bash
npm install

npm run build
```

To spin up the [webpack-dev-server](https://github.com/webpack/webpack-dev-server) run:

```bash
npm run start
```

## Documentation

- [r-deckgl pkgdown Site](https://crazycapivara.github.io/deckgl/)
- [Example Scripts](https://github.com/crazycapivara/deckgl/tree/master/_examples)
- [deck.gl JavaScript API Reference](https://deck.gl/#/documentation/deckgl-api-reference)

## Note

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.