Creates a calendar that displays daily averages.

timeseriesCalendar(
  data = NULL,
  meta = NULL,
  index = "monitorID",
  label = "label",
  full = TRUE,
  ...
)

Arguments

data

A data.frame that contains the hourly-resolution point location timeseries data. See Details.

meta

A data.frame that contains the point location metadata. See Details.

index

A string to index point location metadata and temporal data by.

label

A string to index point location metadata label by.

full

Fill and display full calendar year.

...

Additional arguments. See details.

Details

Use of this function requires data and meta dataframes that are linked by location-specific unique identifiers. In meta, each row contains location metadata associated with a unique timeseries. The unique identifiers for are found in meta[[index]]. The data dataframe uses these identifiers as column names with a separate column of data for each timeseries.

data must be a dataframe of regular time series data. The data dataframe must contain one 'datetime' column. All other columns must have the names specified in meta[[index]].

meta must be a dataframe that contains location information associated with the timeseries found in data.

The following meta columns must be included:

  • code"timezone" -- A column named "timezone" must contain the Olson timezone associated with each location.

  • codeindex -- Name of the the column containing the unique identifier associated with each location. These map onto columns in the data dataframe.

  • codelabel -- Name of the column containing the human readable label associated with each location.

... Additional (optional) configuration arguments:

  • width -- widget width

  • height -- widget_height

  • colors -- colors

  • breaks -- color ramp breaks

  • elementId -- HTML element ID

  • inputId -- shiny input ID

  • unitString -- units appended to hover text

Note

When specifying colors and breaks, you must use the d3 idiom where the vector of colors is one longer than the vector of breaks. Everything below the lowest break gets the lowest color. Everything above the highest break gets the highest color.

Examples

library(tiotemp) sensor <- example_airsensor_object timeseriesCalendar( data = sensor$data[,c(1,2)], meta = sensor$meta[1,], unitString = " (\u00B5g/m\u00B3)")