#LS14LASO
---
title: "LS14LASO"
output:
flexdashboard::flex_dashboard:
vertical_layout: scroll
theme: bootstrap
source_code: embed
orientation: rows
---
```{r setup, include = FALSE}
library(flexdashboard)
library(maptools)
library(tidyverse)
library(purrr)
library(leaflet)
library(plotly)
library(lipdR)
library(dygraphs)
library(geoChronR)
library(lipdverseR)
#read functions
load("../../temp.Rdata")
load("../../chronTemp.Rdata")
#remove columns we don't want to plot
varNames <- sapply(TS, "[[","paleoData_variableName")
# good <- which(!(varNames %in% c("year","depth","age")))
# TS <- TS[good]
#All datasets
dsn <- lipdR::pullTsVariable(TS,"dataSetName")
ui <- which(!duplicated(dsn))
udsn <- dsn[ui]
lat <- lipdR::pullTsVariable(TS,"geo_latitude")[ui]
lon <- lipdR::pullTsVariable(TS,"geo_longitude")[ui]
elev <- lipdR::pullTsVariable(TS,"geo_elevation")[ui]
archiveType <- lipdR::pullTsVariable(TS,"archiveType")[ui]
link <- paste0(udsn,".html") %>%
str_replace_all("'","_")
#Organize metadata for map
map.meta <- data.frame(dataSetName = udsn, #datasetname
lat = lat,#lat
lon = lon,#lon
# elev = elev,#elevation
archiveType = factor(archiveType),#archiveType
link = link)#Link
#set index number
i = 326
thisTS <- TS[which(udsn[i] == dsn)]
```
#LS14LASO
Metadata {.sidebar}
-------------------------------------
[Download LiPD file](LS14LASO.lpd)
[Edit LiPD file](http://lipd.net/playground?source=http://lipdverse.org/iso2k/1_0_0/LS14LASO.lpd)
[Download paleoData only (csv)](LS14LASO.csv)
[Download chronData only (csv)](LS14LASO-chron.csv)
[Report an issue (include dataset name)](https://github.com/nickmckay/LiPDverse/issues)
root
archiveType: LakeSediment
lipdVersion: 1.3
pub
pub1
citeKey: lauterbach2014climaticimprintofthemidla
journal: The Holocene
volume: 24
title: Climatic imprint of the mid-latitude Westerlies in the Central Tian Shan of Kyrgyzstan and teleconnections to North Atlantic climate variability during the last 6000 years
geo
latitude: 41.7939
longitude: 75.1961
elevation: 3016
siteName: Sonk11D
PaleoData columns
year (AD)
TSid: WEBa86ea34e
variableName: year
units: AD
description: Year AD
age (BP)
TSid: WEB1a77aeb9
variableName: age
units: BP
description: Years before present (1950) BP
depth (cm)
TSid: WEB48a85350
variableName: depth
units: cm
description: depth
d2H (permil)
TSid: LPD343ffe05
variableName: d2H
units: permil
description: terrestrial biomarker
useInGlobalTemperatureAnalysis: TRUE
interpretation
1
basis: previously published inferrences: fraction reflects evapotranspiration during the growing season
inferredMaterial: precipitation as modified by evapotranspiration
interpDirection: negative
rank: 1
scope: climate
seasonality: Summer
variable: moisture (P-E)
variableDetail: C-29
direction: negative
seasonalityOriginal: summer
variableGroup: moisture (P-E)
2
basis: δDn-C29 record of the Son Kol sediments can be used to infer information about past summer moisture conditions.
direction: negative
seasonality: JJA
variable: P_E
scope: isotope
variableGroup: EffectiveMoisture
variableGroupOriginal: P_E
variableGroupDirection: list("negative")
C170x2D28 (unitless)
TSid: LPDd7ba1947
variableName: C170x2D28
units: unitless
useInGlobalTemperatureAnalysis: FALSE
ChronData columns
depth (cm)
TSid: LPDe54dc6d7
variableName: depth
units: cm
Lab ID (unitless)
TSid: LPD797006f7
variableName: Lab ID
units: unitless
description: Poz
material (unitless)
TSid: LPD777a1b28
variableName: material
units: unitless
14C age (yr BP)
TSid: LPD493f1394
variableName: 14C age
units: yr BP
age percision (yr)
variableName: age percision
units: yr
description: ±1SD
Corrected 14C age (yr BP)
variableName: Corrected 14C age
units: yr BP
description: Aquatic samples with asterisks were corrected for the hardwater effect prior to calibration
calibrated age range (cal yr BP)
variableName: calibrated age range
units: cal yr BP
description: 2 sigma range
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### Sitemap
```{r}
map.meta.split <- split(map.meta, map.meta$archiveType)
factpal <- colorFactor("Paired",map.meta$archiveType)
buff <- 15
l <- leaflet() %>%
addTiles() %>%
fitBounds(map.meta$lon[i]-buff,map.meta$lat[i]-buff,map.meta$lon[i]+buff,map.meta$lat[i]+buff)
names(map.meta.split) %>%
purrr::walk( function(df) {
l <<- l %>%
addMarkers(data=map.meta.split[[df]],
lng=~lon, lat=~lat,
label=~as.character(archiveType),
popup=~paste(str_c('Dataset: ',dataSetName,''),
# str_c("Elevation: ",elev),
str_c("Archive Type: ",archiveType),
sep = "
"),
group = df,
clusterOptions = markerClusterOptions(removeOutsideVisibleBounds = F),
labelOptions = labelOptions(noHide = F,
direction = 'auto'))
})
l <- l %>% addCircleMarkers(lng = map.meta$lon[i], lat = map.meta$lat[i],radius = 20,color = "red",fillColor = "none")
l %>%
addLayersControl(position = "bottomleft",
overlayGroups = names(map.meta.split),
options = layersControlOptions(collapsed = FALSE,
opacity = 0.8)
)
```
### Search the LiPDverse (Beta! doesn't work well yet)
```{r}
#Add google search bar
htmltools::includeHTML("../../googleSearchChunk.html")
```
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### d2H (permil)
```{r}
plotCol(thisTS,ind = 5)
```
### C170x2D28 (unitless)
```{r}
plotCol(thisTS,ind = 1)
```
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### depth (cm)
```{r}
plotCol(chronTS,ind = 2)
```
### Lab ID (unitless)
```{r}
plotCol(chronTS,ind = 1)
```
### material (unitless)
```{r}
plotCol(chronTS,ind = 3)
```
### 14C age (yr BP)
```{r}
plotCol(chronTS,ind = 4)
```
### age percision (yr)
```{r}
plotCol(chronTS,ind = 5)
```
### Corrected 14C age (yr BP)
```{r}
plotCol(chronTS,ind = 6)
```
### calibrated age range (cal yr BP)
```{r}
plotCol(chronTS,ind = 7)
```