See the testviz directory for an example, and see below for a detailed description.
The fetch section takes a list of items. Each item is a raw data file.
Items always have a
id field. They also always have information,
either explicit or implicit, about how to (1) fetch and (2) read the data
Fields describing (1) fetch include
fetcher, which can take the
sciencebase, then the
remoteItemId field should also be included and should be the
24-digit hexadecimal ScienceBase item ID, and the
should be included and should be the filename as the item is stored on
Fields describing (2) read include
mimeType, which can take the
If the reader function is unspecified then a default reader will use the
mimeType to determine how to read the data file into R.
customReader field may be included with a value
describing a custom reading function defined in the scripts|lib folder,
where the function has the name
readData.mytype and the value in the
customReader field is
mytype. For example, you could define a
custom function called readData.netCDF and give
netCDF. If both customReader and mimeType are specified, mimeType will be
passed as a second argument to the customReader function.
export tag is by default true for figures, false for data and
munged. but can be set for any of those classes of items. Any item for
which export=true will be copied to the target directory when the full
visualization is built.
If the customReader argument is ever given, the code will automatically source all files in scripts/read before trying to run the customReader.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.