-
Notifications
You must be signed in to change notification settings - Fork 0
/
past.qmd
197 lines (148 loc) · 6.86 KB
/
past.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
---
title: "Past: Historical Ecosystems"
---
### LANDFIRE's Biophysical Settings (BpSs)
<br>
>*BpS models represent the vegetation system that may have been dominant on the landscape prior to Euro-American settlement. These models are based on a combination of the current environment and an approximation of the historical disturbance regime.* [Read more](https://landfire.gov/bps.php){target="blank"}.
Check out this 3-minute tutorial for a quick refresher on the [basics of Biophysical Settings Models](https://youtu.be/xjaWJCe7udQ){target="blank"}.
Use this page as a starting point to explore the most prevalent BpSs in the SRFSN Wyoming Sagebrush Subregion. In addition to the charts and maps, the historical disturbance data can be directly accessed using this site.
## Summary
* Prior to European colonization, the most dominant vegetation system for the Wyoming Sagebrush Subregion was [Inter-Mountain Basins Big Sagebrush Shrubland-Wyoming Big Sagebrush](https://landfirereview.org/search.php?q=Inter-Mountain%20Basins%20Big%20Sagebrush%20Shrubland-Wyoming%20Big%20Sagebrush&hPP=20&idx=lf_landfire_dev&p=0&is_v=1){target="blank"}.
* This system burned on average 4x more than the next most common ecosystem (Inter-Mountain Basins Montane Sagebrush Steppe).
* The most prevalent LANDFIRE Mean Fire Return Interval (from BpS) was 76-100 years.
Scroll down to explore the "historical disturbances per ecosystem" using the interactive web app.
## Most Prevalent Biophysical Settings
![](images/bps.jpg){width=100%}
```{r bps chart, message=FALSE, warning=FALSE, echo=FALSE, fig.width=10, fig.height=10}
library(tidyverse)
library(scales)
library(stringr)
bps_data <- read.csv("data/bps_aoi_attributes.csv")
bpsname <- bps_data %>%
group_by(BPS_NAME) %>%
summarize(ACRES = sum(ACRES),
REL_PERCENT = sum(REL_PERCENT)) %>%
arrange(desc(REL_PERCENT)) %>%
top_n(n = 10, wt = REL_PERCENT)
# plot
bpsChart <-
ggplot(data = bpsname, aes(x = BPS_NAME, y = REL_PERCENT)) +
geom_bar(stat = "identity") +
labs(
title = "Top 10 Biophysical Settings",
caption = "Data from landfire.gov; Chart © Randy Swaty",
x = "",
y = "Percent of landscape") +
scale_x_discrete(limits = rev(bpsname$BPS_NAME),
labels = function(x) str_wrap(x, width = 18)) +
coord_flip() +
theme_bw(base_size = 14)
bpsChart
```
## Historic Annual Acres Burned (per ecosystem)
```{r fire bar, echo=FALSE, message=FALSE, warning=FALSE, fig.width=10, fig.height=10}
# read bps attribute table .csv and summarize
annualFire <- bps_data %>%
mutate(annual_fire_acres = ((1/FRI_ALLFIR)*ACRES)) %>%
filter(BPS_NAME != 'Open Water') %>%
group_by(BPS_NAME) %>%
summarize(acres = sum(annual_fire_acres)) %>%
arrange(desc(acres)) %>%
top_n(n = 10, wt = acres)
# plot
fireChart <-
ggplot(data = annualFire, aes(x = BPS_NAME, y = acres)) +
geom_bar(stat = "identity") +
labs(
title = "Cumulative estimates of all fire types prior to pre-European colonization",
caption = "Data from landfire.gov; Chart © Randy Swaty",
x = "",
y = "Acres") +
scale_x_discrete(limits = rev(annualFire$BPS_NAME),
labels = function(x) str_wrap(x, width = 18)) +
scale_y_continuous(name = 'Acres', labels = comma) +
coord_flip() +
theme_bw(base_size = 14) +
theme(plot.margin = margin(10, 30, 0, 0))
fireChart
# if the plot looks good, save it
ggsave("./OUTPUTS/fireChart.png", width = 12, height = 5)
```
<br>
## Top Historical Fire Regimes
![](images/mfri.jpg){width=100%}
<br>
## Historical Disturbances (per ecosystem)
```{r all disturbances, echo=FALSE, message=FALSE, warning=FALSE, out.width="100%"}
# Load packages
library(tidyverse)
library(crosstalk)
library(ggsci)
library(scales)
library(plotly)
# This code reads a CSV file named "bps_aoi_disturbances.csv" from the "data" directory into a data frame.
bps_aoi_disturbances <- read_csv("data/bps_aoi_disturbances.csv")
# The data frame is then filtered to exclude certain values in the "TransitionGroupID" column.
# The excluded values are: "All Fire", "All Transitions", "Alternative Succession",
# "Non Fire Disturbances", "Non Replacement Fire", "Optional 1", "Optional 2".
bps_aoi_disturbances <- bps_aoi_disturbances %>%
filter(!TransitionGroupID %in% c("All Fire",
"All Transitions",
"Alternative Succession",
"Non Fire Disturbances",
"Non Replacement Fire",
"Optional 1",
"Optional 2"))
# The data frame is then grouped by the "BpS_Name" and "TransitionGroupID" columns.
# The annual_dist_acres column is then summarized with the sum of all values for each group.
bps_aoi_disturbances <- bps_aoi_disturbances %>%
group_by(BpS_Name, TransitionGroupID) %>%
summarise(annual_dist_acres = sum(annual_dist_acres))
# The annual_dist_acres column is then converted to a numeric format,
# with trailing zeros removed and rounded to 0 decimal places.
bps_aoi_disturbances <- bps_aoi_disturbances %>%
mutate(annual_dist_acres = as.numeric(format(round(annual_dist_acres, 0), scientific = FALSE)))
# A new data frame "sdbps_aoi_disturbances" is created,
# with a highlight function applied to the original data frame.
sdbps_aoi_disturbances <- highlight_key(bps_aoi_disturbances)
# A ggplot chart is created using the "sdbps_aoi_disturbances" data frame.
# The chart plots the TransitionGroupID column on the X-axis,
# and the annual_dist_acres column on the Y-axis.
# The chart has a title, labels for the X and Y axes,
# and the Y-axis has a continuous scale with comma formatted labels.
bpsChart <-
ggplot(sdbps_aoi_disturbances, aes(x = TransitionGroupID, y = annual_dist_acres)) +
geom_point(size = 3) +
labs(
title = "Annual historical disturbances",
x = "",
y = "Acres") +
coord_flip() +
scale_y_continuous(labels = comma)+
theme_bw()
# The chart is displayed.
#bpsChart
# A chart with a dropdown list is created with tooltips disabled.
bscols(widths = c(3, 10),
filter_select("BP",
"Select ecosystem",
sdbps_aoi_disturbances,
~ BpS_Name,
multiple = FALSE),
ggplotly(bpsChart,
tooltip = FALSE,
width = 815)
)
```
## Data Table
```{r bps data table, echo=FALSE, message=FALSE, warning=FALSE, fig.width=10}
# clean data
clean_bps_data <- bps_data[-c(1,17:22, 12:15, 1:4)]
library(kableExtra)
kable(clean_bps_data,
format.args = list(big.mark = ",")) %>%
kable_styling(
font_size = 10,
bootstrap_options = c("striped", "hover", "condensed")
)
```