The goal of vegablock is to provide an interface between Vega and Blocks.
If you have a GitHub account, you can use this package to deploy Vega(-Lite) blocks. Further, if a block contains a Vega(-Lite) specification and meets a specific format, you can use this package to import such a specification to your R environment.
For now, you can install vegablock from GitHub:
To make things easiest, you should have these environment variables set in your
GITHUB_PAT - a GitHub Personal Access Token (PAT) you create; its scope will have to include gists.
GITHUB_USERNAME - your GitHub-account name.
With the environment variables set, you can create a block from vegaspec:
#> block url: https://bl.ocks.org/06a512525fbe7a96e1a2028e1871b61c #> gist url: https://gist.github.com/06a512525fbe7a96e1a2028e1871b61c
You can visit the created block here.
If the block has a specific format, where the Vega(-Lite) specification is in its own file, you can retrieve a vegaspec from a block into your R environment: