Title: | Analysis of Aerobiological Data |
---|---|
Description: | Supports analysis of aerobiological data. Available features include determination of pollen season limits, replacement of outliers (Kasprzyk and Walanus (2014) <doi:10.1007/s10453-014-9332-8>), calculation of growing degree days (Baskerville and Emin (1969) <doi:10.2307/1933912>), and determination of the base temperature for growing degree days (Yang et al. (1995) <doi:10.1016/0168-1923(94)02185-M). |
Authors: | Jakub Nowosad [aut, cre] |
Maintainer: | Jakub Nowosad <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.82.0 |
Built: | 2025-02-19 02:58:41 UTC |
Source: | https://github.com/nowosad/pollen |
This function determines a base temperature ("tbase") based on the mean temperature of the entire season and the number of days of the ith planting to reach a given developmental stage under study. It allows to use one of four methods to calculate tbase, including: (1) the least standard deviation in GDD (Magoon and Culpepper, 1932; Stier, 1939) - '"sd_gdd"'; (2) the least standard deviation in days (Arnold, 1959) - '"sd_day"'; (3) the coefficient of variation in days (Nuttonson, 1958) - '"cv_day"'; (4) the regression coefficient (Hoover, 1955) - '"y_i"'.
base_temp(tavg, d, type)
base_temp(tavg, d, type)
tavg |
the mean temperature of the entire season for the plantings (a numerical vector, where one value is a planting) |
d |
the number of days of the ith planting to reach a given developmental stage under study (e.g., flowering ) (a numerical vector, where one value is a planting) |
type |
either '"sd_gdd"', '"sd_day"', '"cv_day"', or '"y_i"'. For the explanation of each type, see the Yang et al. 1995 |
a numeric value representing base temperature that could be then used, for example, in GDD calculations
Yang, S., Logan, J., & Coffey, D. L. (1995). Mathematical formulae for calculating the base temperature for growing degree days. In Agricultural and Forest Meteorology (Vol. 74, Issues 1-2, pp. 61-74). Elsevier BV
Magoon, C. A., & Culpepper, C. W. (1932). Response of sweet corn to varying temperatures from time of planting to canning maturity (No. 1488-2016-124513).
Stier, H. S. (1939). A physiological study of growth and fruiting in the tomato (Lycopersicon esculentum L.) with reference to the effect of climatic and edaphic conditions (Doctoral dissertation, Ph. D. Dissertation, University of Maryland, College Park, MD, USA).
Arnold, C. Y. (1959, January). The determination and significance of the base temperature in a linear heat unit system. In Proceedings of the american Society for horticultural Science (Vol. 74, No. 1, pp. 430-445).
Nuttonson, M. Y. (1955). Wheat-climate relationships and the use of phenology in ascertaining the thermal and photo-thermal requirements of wheat. Amer. Inst. of Crop Ecology, Washington, D.
Hoover, M. W. (1955). Some effects of temperature on the growth of southern peas. In Proc. Am. Soc. Hortic. Sci (Vol. 66, pp. 308-312).
[gdd()] for calculation of growing degree days (GDD)
library(pollen) tavg <- c(25, 20, 15, 10) d <- c(6, 11, 16, 21) base_temp(tavg = tavg, d = d, type = "sd_gdd") base_temp(tavg = tavg, d = d, type = "sd_day") base_temp(tavg = tavg, d = d, type = "cv_day") base_temp(tavg = tavg, d = d, type = "y_i")
library(pollen) tavg <- c(25, 20, 15, 10) d <- c(6, 11, 16, 21) base_temp(tavg = tavg, d = d, type = "sd_gdd") base_temp(tavg = tavg, d = d, type = "sd_day") base_temp(tavg = tavg, d = d, type = "cv_day") base_temp(tavg = tavg, d = d, type = "y_i")
This function calculates growing degree days (GDD) using the average of the daily maximum and minimum temperatures, a base temperature and a maximum base temperature
gdd(tmax, tmin, tbase, tbase_max, type = "C")
gdd(tmax, tmin, tbase, tbase_max, type = "C")
tmax |
daily maximum temperature |
tmin |
daily minimum temperature |
tbase |
base temperature |
tbase_max |
maximum base temperature |
type |
either "B", "C", or "D". The default is "C". Type "B" - The heat units are calculated based on the difference between the mean daily temperature and the threshold ('tbase'). In the case when the value of 'tmin' is lower than 'tbase', then it is replaced by 'tbase'. Type '"C"' - same as type '"B"' and when the value of 'tmax' is larger than 'tbase_max', then it is replaced by 'tbase_max'. Type '"D"'- same as type '"B"' and when the value of 'tmax' is larger than 'tbase_max', then no heat units are added. |
a numeric vector with GDD values
Baskerville, G., & Emin, P. (1969). Rapid Estimation of Heat Accumulation from Maximum and Minimum Temperatures. Ecology, 50(3), 514-517. doi:10.2307/1933912
[base_temp()] for determining a base temperature
set.seed(25) df <- data.frame(tmax = runif(100, 6, 10), tmin = runif(100, 4, 6)) gdd(tmax = df$tmax, tmin = df$tmin, tbase = 5, tbase_max = 30)
set.seed(25) df <- data.frame(tmax = runif(100, 6, 10), tmin = runif(100, 4, 6)) gdd(tmax = df$tmax, tmin = df$tmin, tbase = 5, tbase_max = 30)
gdd_data A dataset containing a synthetic data of day, tmax (daily maximum temperature), and tmin (daily minimum temperature)
A data frame with 100 rows and 3 variables:
day
tmax
tmin
This function finds outliers in pollen time-series and replaces them with background values
outliers_replacer(value, date, threshold = 5, sum_percent = 100)
outliers_replacer(value, date, threshold = 5, sum_percent = 100)
value |
pollen concentration values |
date |
dates |
threshold |
a number indicating how many times outlying value needs to be larger than the background to be replaced (default is 5) |
sum_percent |
a sum_percent parameter |
a new data.frame object with replaced outliers
Kasprzyk, I. and A. Walanus.: 2014. Gamma, Gaussian and Logistic Distribution Models for Airborne Pollen Grains and Fungal Spore Season Dynamics, Aerobiologia 30(4), 369-83.
data(pollen_count) df <- subset(pollen_count, site=='Shire') new_df <- outliers_replacer(df$birch, df$date) identical(df, new_df) library('purrr') new_pollen_count <- pollen_count %>% split(., .$site) %>% map_df(~outliers_replacer(value=.$hazel, date=.$date, threshold=4))
data(pollen_count) df <- subset(pollen_count, site=='Shire') new_df <- outliers_replacer(df$birch, df$date) identical(df, new_df) library('purrr') new_pollen_count <- pollen_count %>% split(., .$site) %>% map_df(~outliers_replacer(value=.$hazel, date=.$date, threshold=4))
pollen_count A dataset containing a synthetic data of alder, birch, and hazel pollen count in four locations ('Oz', 'Shire', 'Atlantis', 'Hundred Acre Wood') between 2007 and 2016
A data frame with 8352 rows and 5 variables:
site
date
alder
birch
hazel
This function calculates the Pollen Index (PI), which is implemented as the average amount of annual pollen collected based on the input data
pollen_index(value, date)
pollen_index(value, date)
value |
pollen concentration values |
date |
dates |
data(pollen_count) df <- subset(pollen_count, site == 'Oz') pollen_index(value = df$birch, date = df$date)
data(pollen_count) df <- subset(pollen_count, site == 'Oz') pollen_index(value = df$birch, date = df$date)
This function calculates the start and the end of pollen season for each year
pollen_season(value, date, method, threshold = NULL)
pollen_season(value, date, method, threshold = NULL)
value |
pollen concentration values |
date |
dates |
method |
the pollen season method - "90", "95", "98", "Mesa", "Jager", "Lejoly", or "Driessen" |
threshold |
a threshold value used for the "Driessen" method |
a data.frame object with year, date of pollen season start and date of pollen season end
Nilsson S. and Persson S.: 1981, Tree pollen spectra in the Stockholm region (Sweden) 1973-1980, Grana 20, 179-182.
Andersen T.B.: 1991, A model to predict the beginning of the pollen season, Grana 30, 269-275.
Torben B.A.: 1991, A model to predict the beginning of the pollen season, Grana 30, 269-275.
Galan C., Emberlin J., Dominguez E., Bryant R.H. and Villamandos F.: 1995, A comparative analysis of daily variations in the Gramineae pollen counts at Cordoba, Spain and London, UK, Grana 34, 189-198.
Sanchez-Mesa J.A., Smith M., Emberlin J., Allitt U., Caulton E. and Galan C.: 2003, Characteristics of grass pollen seasons in areas of southern Spain and the United Kingdom, Aerobiologia 19, 243-250.
Jager S., Nilsson S., Berggren B., Pessi A.M., Helander M. and Ramfjord H.: 1996, Trends of some airborne tree pollen in the Nordic countries and Austria, 1980-1993. A comparison between Stockholm, Trondheim, Turku and Vienna, Grana 35, 171-178.
Lejoly-Gabriel and Leuschner: 1983, Comparison of air-borne pollen at Louvain-la-Neuve (Belgium) and Basel (Switzerland) during 1979 and 1980, Grana 22, 59-64.
Driessen M. N. B. M., Van Herpen R. M. A. and Smithuis, L. O. M. J.: 1990, Prediction of the start of the grass pollen season for the southern part of the Netherlands, Grana, 29(1), 79-86.
data(pollen_count) df <- subset(pollen_count, site=='Oz') pollen_season(value=df$birch, date=df$date, method="95") df2 <- subset(pollen_count, site=='Atlantis') pollen_season(value=df2$alder, date=df2$date, method="95") library('purrr') pollen_count %>% split(., .$site) %>% map_df(~pollen_season(value=.$hazel, date=.$date, method="95"), .id="site")
data(pollen_count) df <- subset(pollen_count, site=='Oz') pollen_season(value=df$birch, date=df$date, method="95") df2 <- subset(pollen_count, site=='Atlantis') pollen_season(value=df2$alder, date=df2$date, method="95") library('purrr') pollen_count %>% split(., .$site) %>% map_df(~pollen_season(value=.$hazel, date=.$date, method="95"), .id="site")