-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresent.qmd
265 lines (198 loc) · 11 KB
/
present.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
---
title: "Present: Current Ecosystem Conditions"
---
```{r include=FALSE, echo=FALSE, message=FALSE, warning=FALSE}
library(tidyverse)
```
LANDFIRE's [Existing Vegetation Type, Cover and Height](https://landfire.gov/vegetation.php){target="blank"} datasets describe vegetation conditions.
- Existing Vegetation Type (EVT) - represents the current distribution of the terrestrial ecological systems classification, developed by NatureServe for the western hemisphere, through 2016.
- Existing Vegetation Cover (EVC) - represents the vertically projected percent cover of the live canopy layer for a 30-m cell.
- Existing Vegetation Height (EVH) - represents the average height of the dominant vegetation for a 30-m cell.
[Read more about LANDFIRE Vegetation Products](https://landfire.gov/vegetation.php){target="blank"}
## Summary
* Note-Existing Vegetation Types (EVT) sometimes vary from Biophysical Settings Names due to review and evolution of the legend.*
* Within the EVT data wetland types dominate, followed by Northern Hardwoods forest. On the map, some types were eliminated and/or combined for clarity.
* Much of the Hiawatha has canopy cover > 60%, with most being between 60-79%.
* Almost all of the Hiawatha is classified as treed, with over 50% being in the 15-20M category.
## Most Prevalent Existing Vegetation Types
<br>
![](images/evt.png){width="100%"}
<br>
## Most Prevalent Existing Vegetation Types
```{r evt chart, echo=FALSE, message=FALSE, warning=FALSE, fig.width=10, fig.height=10}
evtname <- read.csv(file = "data/evt_aoi_attributes.csv") %>%
group_by(EVT_NAME) %>%
summarize(ACRES = sum(ACRES),
REL_PERCENT = sum(REL_PERCENT)) %>%
arrange(desc(REL_PERCENT)) %>%
filter(!EVT_NAME %in% c("Open Water","Developed-Roads")) |>
top_n(n = 10, wt = REL_PERCENT)
# plot
evtChart <-
ggplot(data = evtname, aes(x = EVT_NAME, y = REL_PERCENT)) +
geom_bar(stat = "identity") +
labs(
title = "Top 10 Existing Vegetation Types",
caption = "Data from landfire.gov",
x = "",
y = "Percent of landscape") +
scale_x_discrete(limits = rev(evtname$EVT_NAME),
labels = function(x) str_wrap(x, width = 18)) +
coord_flip() +
theme_bw(base_size = 14)
evtChart
```
<br>
## Existing Vegetation Cover
The Existing Vegetation Cover (EVC) map is a visual representation of EVC classifications across the subregion. The chart below the map provides a breakdown of each vegetation cover classification and their relative distribution across the forest.
![](images/evc.png){width="100%"} <br> <br>
```{r evc chart, echo=FALSE, message=FALSE, warning=FALSE, fig.width=10, fig.height=10}
evcname <- read.csv("data/evc_aoi_attributes.csv") %>%
mutate(type = if_else(Value %in% 11, "Open Water",
if_else(Value %in% 12, "Snow / Ice",
if_else(Value %in% c(13:25), "Developed",
if_else(Value %in% 31, "Barren",
if_else(Value %in% c(60:70), "Agriculture",
if_else(Value %in% 32, "Quarries",
if_else(Value %in% 100, "Sparse Vegetation",
if_else(Value %in% c(101:199), "Tree",
if_else(Value %in% c(201:299), "Shrub",
if_else(Value %in% c(301:399), "Herb",
"Other")))))))))))
# create reverse substr() function
revSubstr <- function(x, start, stop) {
x <- strsplit(x, "")
sapply(x,
function(x) paste(rev(rev(x)[start:stop]), collapse = ""),
USE.NAMES = FALSE) }
# create cover column based on 2nd and 3rd to last Values of classname
# if "Other" type, make 0
evcname <- evcname %>% mutate(cover = as.numeric(if_else(Value > 100,
revSubstr(evcname$CLASSNAMES, start = 2, stop = 3),
"0")))
# create bin breaks for grouping
breaks <- seq(0, 100, 10)
# create intervals for grouping and summarize
# also create factor order for "type"
evcgroup <- evcname %>%
mutate(interval = cut(cover,
breaks,
include.lowest = TRUE,
right = T,
labels = c("0-9", "10-19", "20-29", "30-39", "40-49", "50-59", "60-69", "70-79",
"80-89", "90-100")),
type = factor(type, levels = c("Tree", "Shrub", "Herb", "Open Water", "Snow / Ice", "Developed", "Agriculture", "Sparse Vegetation", "Barren", "Quarries", "Other"))) %>%
group_by(type, interval) %>%
summarize(COUNT = sum(Freq),
acres = sum(ACRES),
rel_percent = sum(REL_PERCENT))
# add label and legend names based on condition
evcgroup <- evcgroup %>% mutate(label = if_else(type %in% c("Tree", "Shrub", "Herb"),
paste0(type, " Cover = ", interval, "%"), as.character(type)),
legend = if_else(type %in% c("Tree", "Shrub", "Herb", "Open Water"),
type, as.factor("Other")))
# turn current label order to factors
evclabel.list <- evcgroup$label
evcgroup <- evcgroup %>% mutate(label = fct_rev(factor(label, evclabel.list)))
# join in custom cols column to color bars by specific label
evc_group_cols <- read.csv("data/evc_group_acc.csv")
evcgroup <- left_join(evcgroup, evc_group_cols, by = "label")
evcgroup$label <- factor(evcgroup$label, levels = rev(evcgroup$label))
evcgroup <- evcgroup %>%
filter(rel_percent > 0.01)
# plot
evcChart <-
ggplot(data = evcgroup, aes(x = label, y = rel_percent, fill = colors)) +
geom_bar(stat = "identity") +
labs(
title = "Existing Vegetation Cover",
caption = "Data from landfire.gov",
x = "Amount of landscape",
y = "Most dominant lifeform") +
scale_fill_identity() +
coord_flip() +
theme_classic(base_size = 12)+
theme(legend.position = "none")
evcChart
```
<br>
## Existing Vegetation Height
The Existing Vegetation Height (EVH) map showcases EVH across the forest. The chart below the map provides the percentage of the landscape represented by each EVH height.
![](images/evh.png){width="100%"} <br>
```{r evh chart, echo=FALSE, message=FALSE, warning=FALSE, fig.width=10, fig.height=10}
# load evh attribute table
evhname <- read.csv(file = "data/evh_aoi_attributes.csv") %>%
mutate(type = if_else(Value %in% 11, "Open Water",
if_else(Value %in% 12, "Snow / Ice",
if_else(Value %in% c(13:25), "Developed",
if_else(Value %in% 31, "Barren",
if_else(Value %in% c(60:70), "Agriculture",
if_else(Value %in% 32, "Quarries",
if_else(Value %in% 100, "Sparse Vegetation",
if_else(Value %in% c(101:199), "Tree",
if_else(Value %in% c(201:299), "Shrub",
if_else(Value %in% c(301:399), "Herb",
"Other"))))))))))) %>%
mutate(height_m = if_else(type %in% "Tree", (Value -100),
if_else(type %in% "Shrub", ((Value - 200) / 10),
if_else(type %in% "Herb", ((Value - 300) / 10), 0))) %>%
as.character() %>% as.numeric())
# create bin breaks for grouping
breaks <- c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100)
# create intervals for grouping and summarize
# also create factor order for "type"
evhgroup <- evhname %>%
mutate(interval = cut(height_m,
breaks,
include.lowest = TRUE,
right = F,
labels = c("0", "0.1-0.2", "0.2-0.3", "0.3-0.4" ,"0.4-0.5", "0.5-0.6", "0.6-0.7", "0.7-0.8", "0.8-0.9", "0.9-1.0", "1-5", "5-10", "10-15", "15-20", "20-25", "25-30", "30-35", "35-40", "40-45", "45-50", "50-55", "55-60", "60-65", "65-70", "70-75", "75-80", "80-85", "85-90", "90-95", "95-100")),
type = factor(type, levels = c("Tree", "Shrub", "Herb", "Open Water", "Snow / Ice", "Developed", "Agriculture", "Sparse Vegetation", "Barren", "Quarries", "Other"))) %>%
group_by(type, interval) %>%
summarise(COUNT = sum(Freq),
acres = sum(ACRES),
rel_percent = sum(REL_PERCENT))
# add label and legend names based on condition
evhgroup <- evhgroup %>% mutate(label = if_else(type %in% c("Tree", "Shrub", "Herb"),
paste0(type, " Height = ", interval, " m"), as.character(type)),
legend = if_else(type %in% c("Tree", "Shrub", "Herb", "Open Water"),
type, as.factor("Other")))
# turn current label order to factors
evhlabel.list <- evhgroup$label
evhgroup <- evhgroup %>% mutate(label = fct_rev(factor(label, evhlabel.list)))
# join in custom cols column to color bars by specific label
evh_group_cols <- read.csv("data/evh_group_acc.csv")
evhgroup <- left_join(evhgroup, evh_group_cols, by = "label")
evhgroup$label <- factor(evhgroup$label, levels = rev(evhgroup$label))
evhgroup <- evhgroup %>%
filter(rel_percent > 0.01)
# plot
evhChart <-
ggplot(data = evhgroup, aes(x = label, y = rel_percent, fill = colors)) +
geom_bar(stat = "identity") +
labs(
title = "Existing Vegetation Height",
subtitle = "",
caption = "\nData from landfire.gov.",
x = "",
y = "Percent of landscape") +
scale_fill_identity() +
coord_flip() +
theme_bw()
evhChart
# plot with original color scheme
# evhChart <-
# ggplot(data = evhgroup, aes(x = label, y = REL_PERCENT, fill = legend)) +
# geom_bar(stat = "identity") +
# labs(
# title = "Existing Vegetation Height",
# subtitle = "landscape_name",
# caption = "Data from landfire.gov.",
# x = "",
# y = "percent of landscape") +
# scale_fill_manual(Values = cols, name = "") +
# coord_flip() +
# theme_bw()
#
# evhChart
```