Description Usage Arguments Value Colors
The hour value is to be interpreted as the starting point of measurement until the next full hour. this means, if you are looking for the past hour, you need to add 1 to the hour values.
1 2 3 4 5 |
x |
An object of class |
time |
An optional vector with two elements, start and end time, either in character
format supported by |
calc |
Character vector of air quality indices to calculate. Currently, "CAQI" and "EAQI" are supported. |
latex_cellcolors |
Logical,
if true the "*_color_*" columns will show LaTeX |
A data frame as returned by layout_df
,
but reduced to hourly means.
The data frame contains rows to support coloring tables or plots,
e.g. if you use the data in
an RMarkdown document. If latex_cellcolors=FALSE
,
they simply provide hexadecimal HTML color codes
for each index value. Otherwise,
the factor labels are in LaTeX format using the \cellcolor
command.
This is useful, e.g.,
if combined with the kableExtra::kable
function. To use the code out of the box,
define the following colors in your preamble (example shows usage in a YAML header):
1 2 3 4 5 6 7 8 9 10 11 12 | header-includes:
- \definecolor{CAQIvh}{HTML}{960018}
- \definecolor{CAQIh}{HTML}{F29305}
- \definecolor{CAQIm}{HTML}{EEC20B}
- \definecolor{CAQIl}{HTML}{BBCF4C}
- \definecolor{CAQIvl}{HTML}{79BC6A}
- \definecolor{EAQIep}{HTML}{7D2181}
- \definecolor{EAQIvp}{HTML}{960032}
- \definecolor{EAQIp}{HTML}{FF5050}
- \definecolor{EAQIm}{HTML}{F0E641}
- \definecolor{EAQIf}{HTML}{50CCAA}
- \definecolor{EAQIg}{HTML}{50F0E6}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.