View source: R/config_to_data.R
config_preds_to_data_column | R Documentation |
Most of this code is the same whether it's a pred (the name of a model on sciencebase) or a pred_file (the name of a local file name)
config_preds_to_data_column(var, site, src, type)
var |
the variable name to retrieve |
src |
the model_name or model file name |
type |
character in c("SB","file") indicating whether src is a model on sciencebase or a local file name |
The trick is that model predictions only store the input time, with was either local.time (< streamMetabolizer 0.8.0) or solar.time (>=0.8.0) rather than UTC time. So this function draws on our knowledge of the site-specific mapping between UTC time and solar.time or date (as stored in sitetime and sitedate, respectively) to come up with the UTC DateTime stamps that correspond to these predictions. We could potentially just use convert_solartime_to_UTC, but I'm nervous about tiny imprecisions that would make these not match up to other DateTime stamps.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.