View source: R/MultiSensorsPlot.R
It is used for exporting multiple graphs with one variable (multiple sensors) on each graph, and a total of five variables("pm25" , "voc" , "co2" , "temperature" , "humidity") is included. It is particularly used for the sensors located at the nursing centers. The raw "ens" data is applied to the function directly. The function setwd() is recommended to use beforhand to specify the file path of these plots to a preferred folder.
1 2 3 4 5 6 7 8 9 10 11 12 | MultiSensorsPlot(
data_path,
imeiID,
sitenames,
mode = "both",
x_breaks = "2 days",
x_labels = "%d",
N_cols = 2,
font = "STKaiti",
width = 40,
height = 30
)
|
data_path |
Required. The path of the raw "ens" data downloaded. |
imeiID |
Required. Note that the order of the imeiID input should be paired with the order of sitenames input. |
sitenames |
Required. Note that the order of the sitenames input should be paired with the order of imeiID input. |
mode |
The output could be either time series("ts"), hourly average("havg"), or both time series and hourly average plots("both"). The default is "both". |
x_breaks |
It define the X axis intervals for time series plots only. The format of x_breaks input could be, for example, "1 hour" , "12 hours" , "1 day" , "2 weeks", and etc. The default is 2 days. For hourly average plots, the X axis intervals is fixed to 2 hours. |
x_labels |
It define the X axis labels for time series plots only. The format of x_breaks input could be, for example, "%d %H", "%m/%d %H", "%Y/%m/%d", and etc. The default is "%d". |
N_cols |
The number of the columns of the plot. The default is 1. |
font |
The font family of the plot. The default is "STKaiti". Please be awared that the default is for iOS users. For windows users, please change the font to, for example, "KaiTi". |
width |
The width of the plot output. The default is 40 cm. |
height |
The height of the plot output. The default is 30 cm. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.