---
title: "CodeCheck"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: scroll
theme:
version: 4
bootswatch: minty
source_code: embed
#https://rstudio.github.io/flexdashboard/articles/theme.html
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidymodels)
library(tidyverse)
library(modeldata)
library(vip)
library(plotly)
library(dplyr)
library(gt)
library(readxl)
library(bslib)
theme_set(theme_minimal())
pine_beetle <- read_xlsx(
"~/Desktop/Spring Semester 2026/DataScience2/hgen-612/data/Data_1993.xlsx")
```
```{r data-prep}
pine_data <- pine_beetle %>%
drop_na(DeadDist)
set.seed(123)
split <- initial_split(pine_data, prop = 0.8)
train <- training(split)
test <- testing(split)
```
```{r panel 1}
#glimpse(pine_beetle)
#pine_beetle %>%
# sample_n(8) %>%
#gt()
Plot_1 <- ggplot(pine_beetle, aes(x = DeadDist)) +
geom_histogram(bins = 25, fill = "steelblue", alpha = 0.8) +
labs(
title = "Distance to Brood Tree",
x = "Distance to Nearest Brood Tree",
y = "# of Trees"
) +
theme_minimal()
ggplotly(Plot_1)
```