From 1991 to 1996, Jeffrey pine beetles (JPB) caused tree mor-tality throughout the Lake Tahoe Basin during a severedrought. Census data were collected annually on 10,721trees to assess patterns of JPB-caused mortality. The data were collected during the Lake Tahoe Basin Jeffrey pine beetle outbreak in 1991-1996 from a 60-acre study area with 10,722 trees followed annually.
Explain the map below and the dataset
---
title: "Pine Beetle Models"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
source_code: embed
theme: flatly
---
```{r setup, include = FALSE}
library(flexdashboard)
library(readxl)
library(dplyr)
library(knitr)
library(ggplot2)
library(GGally)
library(tidymodels)
library(vip)
pine_table <- read_excel("Data_1993.xlsx", sheet = 1)
```
Data Description
=======================================================================
Column {data-width=400}
-----------------------------------------------------------------------
### Data Description
From 1991 to 1996, Jeffrey pine beetles (JPB) caused tree mor-tality throughout the Lake Tahoe Basin during a severedrought. Census data were collected annually on 10,721trees to assess patterns of JPB-caused mortality.
The data were collected during the Lake Tahoe Basin Jeffrey pine beetle outbreak in 1991-1996 from a 60-acre study area with 10,722 trees followed annually.
### Those tiny beetles(5 millimeters) can destroy large forest areas
```{r beetle-image, fig.width = 8, fig.height = 8}
image_url <- "http://t0.gstatic.com/licensed-image?q=tbn:ANd9GcRrTUh-9yo7qa8r-paTauCrJMC_Zj4F8miepv24zrr79paRUjnlJchmzoLaRMax7JN2mGjorwzRjMcgmlU"
include_graphics(image_url)
# Data prep
pine_table <-
pine_table %>%
mutate(Response = factor(Response,
labels = c("Not infested", "Infested")),
BA_Inf_20th = BA_Inf_20th + 0.001)
```
###
Column {data-width=1000}
-----------------------------------------------------------------------
### Introduction
Explain the map below and the dataset
### Infestation map
```{r inf-map, fig.width = 25, fig.height = 15}
ggplot(data = pine_table, aes(x = Easting, y = Northing)) +
geom_point(aes(color = Infest_Serv1),
alpha = 0.9) +
scale_color_gradient("",
low = "#009E73",
high = "red") +
theme_gray() +
xlab("UTM X") +
ylab("UTM Y") +
theme(text = element_text(size = 30))
```
Exploratory Analysis
=======================================================================
Column {data-width=500}
-----------------------------------------------------------------------
###
###
```{r tree-diam-hist, fig.width = 15, fig.height = 10}
pine_table %>%
ggplot(aes(x = TreeDiam, fill = Response)) +
geom_histogram(color="black", alpha = 0.6, position = "identity") +
scale_fill_manual(values = c("#009E73", "#E69F00")) +
labs(y = "", x = "Tree diameter", fill = "") +
theme_gray() +
theme(text = element_text(size = 22))
```
Column {data-width=500}
-----------------------------------------------------------------------
###
###
Statistical Models
=======================================================================
Column {data-width=330}
-----------------------------------------------------------------------
###
###
###
Column {data-width=330}
-----------------------------------------------------------------------
###
###
###