Collects specified inputs to create a filtered dataset from which outputs can pull.
Usage
input_dataview(id = NULL, y = NULL, x = NULL, time = NULL,
time_agg = "last", time_filters = list(), dataset = NULL, ids = NULL,
features = NULL, variables = NULL, palette = "")Arguments
- id
An ID of the data view, for association with output elements. Defaults to
'view'appended with a zero-index of views, based on the order in which they were specified (e.g.,'view0'for the first view).- y
Primary variable of interest, used by default to color elements in outputs, and shown on the y-axis of plots; name of a variable or ID of a variable selector.
- x
Secondary variable, shown by default on the x-axis of plots, and across columns in a single-variable table; name of a variable or ID of a variable selector.
- time
Name of a variable giving names to multiple time points (such as a vector of years). Defaults to the time specified in an associated metadata, or a sequence along each variable.
- time_agg
Specifies how multiple time points should be treated when a single value is required. Default is to use the last time with data. This could point to an input which selects a time.
- time_filters
A list with entries specifying which years to display. Each entry should be a list with entries for
"variable"(which variable is being filtered, which can be"index"),"type"(specifying the operator, such as">"), and"value". The value of each entry can be static (e.g., referring to a variable) or the ID of an input.- dataset
Select which dataset to pull from; the name of an included dataset, or ID of a selector of dataset names.
- ids
Select which IDs to include; a vector of IDs that appear in the specified dataset, or the ID of a selector of IDs. If an IDs map is included in the site's datapackage, mapped components can be referred to here.
- features
Select IDs based on their features; a named list or vector, with names corresponding to the names of features included in an
idsfield of the site's datapackage, and values corresponding to a value or vector of values, or a selector of values.- variables
Select IDs based on the values of their variables; a list of lists with entries for
"variable"(name of the variable),"type"(comparison operator), and"value"(value to check against). For example,list(list(variable = "a", type = ">", value = 0)). Each entry may also refer to another input.- palette
The name of the color palette used in maps and plots (from colorbrewer); one of
"rdylbu7"(default),"orrd7","gnbu7","brbg7","puor7","prgn6","reds5","greens5","greys4","paired4".