# Search for sites with "Pseudotsuga" pollen that are older than 8kyr BP and
# that are roughly within western British Columbia:
t8kyr.datasets <- get_dataset(taxonname='*Picea*', loc=c(-90, 41, -89, 44),
ageold = 20000, ageyoung=10000)
# Returns 20 records (as of 04/04/2013), get the dataset for all records:
pollen.records <- get_download(t8kyr.datasets)
# Standardize the taxonomies for the different records using the WS64 taxonomy.
compiled.sites <- compile_taxa(pollen.records, list.name='WS64')
# Extract the Pseudotsuga curves for the sites:
get.curve <- function(x, taxa) {
if (taxa %in% colnames(x$counts)) {
count <- x$counts[,taxa]/rowSums(x$counts, na.rm=TRUE)
} else {
count <- rep(0, nrow(x$count))
}
data.frame(site = x$dataset$site.data$site.name,
age = x$sample.meta$age,
count = count)
}
curves <- do.call(rbind.data.frame,
lapply(compiled.sites, get.curve, taxa = 'Larix/Pseudotsuga'))
# For illustration, remove the sites with no Pseudotsuga occurance:
curves <- curves[curves$count > 0, ]
smooth.curve <- predict(loess(sqrt(count)~age, data=curves),
data.frame(age=seq(20000, 0, by = -100)))
plot(sqrt(count) ~ age, data = curves,
ylab = '% Pseudotsuga/Larix', xlab='Calibrated Years BP', pch=19,
col=rgb(0.1, 0.1, 0.1, 0.1), xlim=c(0, 20000))
lines(seq(20000, 0, by = -100), smooth.curve, lwd=2, lty=2, col=2)
# This figure shows us an apparent peak in Larix/Pseudotsuga pollen in the early-Holocene that
# lends support to a warmer, drier early-Holocene in western North America.
Run the code above in your browser using DataLab