Fetch a dataset from the puddle, or if its not present, fetch the dataset from elsewhere, store it in the puddle, and then pass it along to you.
1 2 3 4 5 6 7 8 |
FETCH_FUN |
A zero-argument function that fetches raw data, such as a csv file, xml, or json, and returns it. |
READ_FUN |
A one-argument function that takes the raw data of FETCH_FUN and returns a dataframe. For example, read.csv, or function(text) read.csv(text, stringsAsFactors=F) |
data_name |
A name for the dataset in the puddle. Must be unique in the puddle. |
description |
Descriptive text about the dataset. |
renew |
Should |
puddle |
A string for connecting to the sqlite puddle database. Defaults to ':memory:', which is only really useful for demonstration. FETCH_FUN and READ_FUN are complementary. They can be whatever you want, so long as the composition, READ_FUN( FETCH_FUN() ) returns your dataset as a dataframe. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.