Function to plot the pollen data during several seasons. Also plots the averaged pollen season over the study period. It is possible to plot the relative abundance per day and smoothing the pollen season by calculating a moving average.
plot_summary(data, pollen, mave = 1, normalized = FALSE,
interpolation = TRUE, int.method = "lineal", export.plot = FALSE,
export.format = "pdf", axisname = "Pollen grains / m3", ...)
A data.frame
object. This data.frame
should include a first column in format Date
and the rest of columns in format numeric
belonging to each pollen type by column.
A character
string with the name of the particle to show. This character
must match with the name of a column in the input database. This is a mandatory argument.
An integer
value specifying the order of the moving average applied to the data. By default, mave = 1
.
A logical
value specifying if the visualization shows real pollen data (normalized = FALSE
) or the percentage of every day over the whole pollen season (normalized = TRUE
). By default, normalized = FALSE
.
A logical
value specifying if the visualization shows the gaps in the inputs data (interpolation = FALSE
) or if an interpolation method is used for filling the gaps (interpolation = TRUE
). By default, interpolation = TRUE
.
A character
string with the name of the interpolation method to be used. The implemented methods that may be used are: "lineal"
, "movingmean"
, "tseries"
or "spline"
. By default, int.method = "lineal"
.
A logical
value specifying if a plot will be exported or not. If FALSE
graphical results will only be displayed in the active graphics window. If TRUE
graphical results will be displayed in the active graphics window and also one pdf/png file will be saved within the plot_AeRobiology directory automatically created in the working directory. By default, export.plot = FALSE
.
A character
string specifying the format selected to save the plot. The implemented formats that may be used are: "pdf"
or "png"
. By default, export.format = "pdf"
.
A character
string specifying the title of the y axis. By default, axisname = "Pollen grains / m3"
.
Other additional arguments may be used to customize the exportation of the plots using "pdf"
or "png"
files and therefore arguments from functions pdf
and png
may be implemented. For example, for pdf files the user may custom the arguments: width, height, family, title, fonts, paper, bg, fg, pointsize...; and for png files the user may custom the arguments: width, height, units, pointsize, bg, res...
This function returns plot of class ggplot2. User are able to customize the output as a ggplot2 object.
This function allows to summarize the pollen season by a simple plot. Even though the package was originally designed to treat aeropalynological data, it can be used to study many other atmospheric components (e.g., bacteria in the air, fungi, insects ...) (Buters et al., 2018; Oteros et al., 2019).
Buters, J. T. M., Antunes, C., Galveias, A., Bergmann, K. C., Thibaudon, M., Galan, C. & Oteros, J. (2018). Pollen and spore monitoring in the world. Clinical and translational allergy, 8(1), 9.
Oteros, J., Bartusel, E., Alessandrini, F., Nunez, A., Moreno, D. A., Behrendt, H., ... & Buters, J. (2019). Artemisia pollen is the main vector for airborne endotoxin. Journal of Allergy and Clinical Immunology.
# NOT RUN {
data("munich_pollen")
plot_summary(munich_pollen, pollen = "Betula", export.plot = FALSE, interpolation = FALSE)
# }
Run the code above in your browser using DataLab