An approach to using Vega in R Markdown.
-
Install system dependencies:
sudo apt-get install build-essential curl g++ gcc python-dev
-
Install NVM and Node 8.x:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash source ~/.bashrc nvm install v8.9.4 nvm alias default v8.9.4
-
Install Node dependencies:
cd /path/to/plover npm install
-
Install R dependencies:
install.packages(c("jsonlite", "purrr", "rmarkdown"))
To get started, open /vega/index.Rmd
in RStudio.
A Vega-Lite spec can be supplied in long-form, or generated with Finch, as done in this example.
A global theme is stored in /vega/theme.json
. Remember to knit the document after making changes.
- Finch - Vega-Lite specification generator
- Vega-Lite: specifications
- Vega-Lite: theme configuration
- hrbrmstr/vegalite - Write Vega-Lite specs in R
- mdequeljoe/vl - Write Vega-Lite specs in R
- ijlyttle/altair - R interface to Altair (Python)
Copyright (c) 2018 Hein Bekker. Licensed under the GNU Affero General Public License, version 3.