Description Usage Arguments Details Value See Also Examples
You can use this function to retrieve a vegaspec
from
blocks (gists) where the spec is in its own JSON file.
1 2 |
id |
|
file |
|
endpoint |
|
env_pat |
|
quiet |
|
You will need a GitHub Personal Access Token
stored in an environment variable called GITHUB_PAT
.
See Happy Git with R
for more information on how to acquire and store a PAT.
The file
argument accepts a regular expression for the name of the JSON file
within the gist. If you don't provide a file
, it will return the first file
in the gist with a .json
extension (not case sensitive). Don't worry about
escaping the dots in file
, it will likely not make a difference.
S3 object of class vegaspec
Blocks documentation,
vw_create_block()
, gistr::gist()
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# https://bl.ocks.org/domoritz/455e1c7872c4b38a58b90df0c3d7b1b9
spec_bars <-
vw_retrieve_block("455e1c7872c4b38a58b90df0c3d7b1b9")
spec_bars <-
vw_retrieve_block("dmoritz/455e1c7872c4b38a58b90df0c3d7b1b9")
spec_bars <-
vw_retrieve_block(
"455e1c7872c4b38a58b90df0c3d7b1b9",
file = "bar.vl.json"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.