#Temp12k1_0_2
---
title: "Temp12k1_0_2"
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 = 1
```
#Temp12k1_0_2
Metadata {.sidebar}
-------------------------------------
[Download all LiPD files for Temp12k1_0_2](Temp12k1_0_2.zip)
[Download R serialization of all LiPD files for Temp12k1_0_2](Temp12k1_0_2.RData)
[Download matlab serialization of all LiPD files for Temp12k1_0_2](Temp12k1_0_2.mat)
[Download python (pickle) serialization of all LiPD files for Temp12k1_0_2](Temp12k1_0_2.pkl)
[Report an issue (include project name)](https://github.com/nickmckay/LiPDverse/issues)
[View changelog for Temp12k](changelogSummary.html)
[View detailed changelog for Temp12k v1_0_2](changelogDetail.html)
***
Information and links to compilation publications and long-term archival at [lipdverse.org](http://lipdverse.org) main page
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### Sitemap
```{r}
map.meta.split <- split(map.meta, map.meta$archiveType)
factpal <- colorFactor("Paired",map.meta$archiveType)
buff <- 60
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")
```