Fire size and severity

Data for this lab.

Download Lab5.zip from the course data archive on Zenodo and unzip it into a folder called data/Lab5/ in your project directory.

Background

Fire plays a critical role in many terrestrial ecosystems on Earth, influencing both nature and society. This is especially true in Montana. We will be using several different kinds of data to explore patterns of total area burned, fire size, fire severity, and the relationships between these metrics and climate and topography in Montana’s Crown of the Continent.

We will be working with data from the Monitoring Trends in Burn Severity (MTBS) program (available at https://www.mtbs.gov/) and Sean Parks and colleagues (2025). The MTBS program uses remotely sensed data to estimate fire severity by looking at the difference between conditions before and after a fire. They classify data into 5 severity classes: unburned = dark green; low severity = light green, moderate severity = yellow; high severity = red; increased greenness = not shown below). The example below is from the Bridger Foothills fire in September 2020. Sean Parks and colleagues combined remotely sensed data and data collected in the field to estimate burn severity using information on the ecological impacts to forest (e.g., percent tree mortality) to develop their composite burn severity index.

Monitoring Trends in Burn Severity (MTBS) burn severity map of the 2020 Bridger Foothills Fire near Bozeman, Montana, showing fire severity classes within the fire perimeter overlaid on a hillshade basemap. Green pixels indicate low severity or unburned, yellow indicates moderate severity, and red indicates high severity fire, with high severity patches concentrated in the central and western portions of the fire perimeter.

Photograph of the 2020 Bridger Foothills Fire taken from Bozeman, Montana, showing a massive pyrocumulus smoke column rising above the Bridger Mountains. Bozeman Health Deaconess Hospital and trees are visible in the foreground.

Photo by Travis Belote.

For this lab, we will ask: (1) how might climate (drought) influence the total area burned in the Crown of the Continent? (2) what is the statistical distribution of fire sizes and what might this tell us about the causes and ecological and social consequences of fire management? (3) how does topography and vegetation influence fire severity?

In this lab, you will continue to learn how to manipulate spatial and tabular data in R.

Total area burned and drought

In lab 5, we learned about potential evapotranspiration and actual evapotranspiration in relations to water deficit, net primary productivity, and the distribution of ecoregions. The same factors (energy and moisture) have been studied to develop indices of drought. For example, the Palmer Drought Severity Index (PDSI) has been used in multiple papers relating climate to fires. The PDSI combines precipitation, temperature (potential evapotranspiration, PET), and a simple soil moisture balance to estimate relative water surplus or deficit. It is a unitless index that typically ranges from about −5 (extreme drought) to +5 (extreme wet). We will investigate the relationship between annual and summer PDSI and total area burned.

First, we will bring in the fire perimeters for the Crown of the Continent, use a function in R to work with “strings” to make year a variable, and calculate total area burned each year using acres for each fire. We will then bring in two tables, join them to our year and area burned dataframe, and do some simple plotting to investigate relationships.

Code
library(terra)
library(sf)
library(tidyverse)
library(mapview) # Thanks, Jayden!

##### PART 1

fires <- vect("data/Lab5/Crown_fires84_24.shp")
crown <- vect("data/Lab5/Crown_MT.shp")
crown <- crown %>% project(fires) %>% st_as_sf()

Notice that year is included in Ig_Date (ignition date) and includes the month and day. We want to create a new variable called “year” that only includes the year. To do this, we can use the str_sub from the stringr package (part of the tidyverse). After you make year a variable, plot the fires so that “year” is the fill of the fire perimeters.

Code
# Look at the variables and the top 5 rows of data. Notice Ig_Date.
head(fires)
               Event_ID irwinID                  Incid_Name        Incid_Type
1 MT4755711337219850629    <NA>              CHARLOTTE PEAK          Wildfire
2 MT4703511332619911012    <NA>                  GAME RANGE          Wildfire
3 MT4763211227619931103    <NA>              FREEZEOUT LAKE          Wildfire
4 MT4736211449719991024    <NA>                    MCDONALD          Wildfire
5 MT4868711403819990806    <NA>                    ANACONDA Wildland Fire Use
6 MT4771011352620010803    <NA> BERGSICKER COMPLEX (CANNON) Wildland Fire Use
    Map_ID Map_Prog Asmnt_Type BurnBndAc BurnBndLat BurnBndLon    Ig_Date
1     5018     MTBS   Extended      5221     47.557   -113.372 1985-06-29
2     7394     MTBS   Extended      5123     47.035   -113.326 1991-10-12
3 10005235     MTBS    Initial      9793     47.669   -112.164 1993-11-03
4    10380     MTBS    Initial      1174     47.362   -114.497 1999-10-24
5    10859     MTBS   Extended     11452     48.687   -114.038 1999-08-06
6    12008     MTBS   Extended      1445     47.710   -113.526 2001-08-03
           Pre_ID         Post_ID Perim_ID dNBR_offst dNBR_stdDv NoData_T
1 504102719840716 504102719860807     <NA>         20      -9999     -970
2 504102719880609 504102719920519     <NA>         10      -9999     -970
3 504002719890418 504002719940331     <NA>        -25         34     -970
4 704102719991022 504102719991030     <NA>         26      -9999     -970
5 504102619990726 704102620000720     <NA>        -15      -9999     -970
6 704002720000713 504002720020625     <NA>         69      -9999     -970
  IncGreen_T Low_T Mod_T High_T Comment Shape_Leng   Shape_Area
1       -150   130   250    800    <NA>  0.5669271 0.0025247432
2       -150   115   350    625    <NA>  0.2583140 0.0024534272
3       -150     0   250   9999    <NA>  0.5250718 0.0042204765
4       -150   130   420   9999    <NA>  0.1532660 0.0005656041
5       -150    85   334    615    <NA>  0.6459018 0.0056583482
6       -150   180   442    750    <NA>  0.1340689 0.0007008647
Code
# make year a variable using str_sub()
fires <- fires %>% sf::st_as_sf() %>% 
  mutate(year = as.integer(stringr::str_sub(Ig_Date, 1, 4))) # take the first four digits from Ig_Date

# If this works, you will see map of fires that have occured in the Crown of the Continent since 1984. Older fires are green and more recent fires are red.
fires %>% ggplot() +
  geom_sf(aes(fill = year), color = NA) +              # fire perimeters
  geom_sf(data = crown, fill = NA, color = "black",    # crown boundary
          size = 0.6) +
  scale_fill_gradientn(colors = c("seagreen", "khaki", "darkred")) +
  theme_minimal() +
  labs(fill = "Year")

Now that we have “year” as a new variable, we can sum the area burned for all fires within year to create another new variable, “total area burned” (TAB).

Code
# Calculate total area burned (TAB)
TAB <- fires %>% group_by(year) %>% summarize(TAB = sum(BurnBndAc)) %>% st_drop_geometry()

unique(TAB$year)
 [1] 1984 1985 1988 1991 1992 1993 1994 1996 1998 1999 2000 2001 2002 2003 2005
[16] 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
[31] 2021 2022 2023
Code
View(TAB)

I have downloaded drought PDSI data for western Montana from NOAA here. You can bring these data into R and clean it up a bit to make it usable for our purposes. Namely, we want to look at the relationship between total area burned and drought severity.

Code
### Bring in PDSI data

pdsi <- read.csv("data/Lab5/PDISdata.csv")

names(pdsi)
[1] "X...Montana"                                            
[2] "Climate.Division.1.Palmer.Drought.Severity.Index..PDSI."
Code
names(pdsi) <- c("year_month", "pdsi")

head(pdsi)
  year_month  pdsi
1       Date Value
2     198401 -0.46
3     198402 -1.11
4     198403  0.02
5     198404  0.45
6     198405  0.97
Code
# get rid of the top line
pdsi <- pdsi %>% slice(-1)

# use str_sub to take the 1st and 4th values in that field
# turn that string into "year" with mutate
pdsi <- pdsi %>% mutate(year = as.integer(str_sub(year_month, 1, 4))) 
head(pdsi)
  year_month  pdsi year
1     198401 -0.46 1984
2     198402 -1.11 1984
3     198403  0.02 1984
4     198404  0.45 1984
5     198405  0.97 1984
6     198406  1.09 1984
Code
# use str_sub to get the 5th and 6th characters (months) and make it called month
pdsi <- pdsi %>% mutate(month = as.integer(str_sub(year_month, 5, 6))) 
head(pdsi)
  year_month  pdsi year month
1     198401 -0.46 1984     1
2     198402 -1.11 1984     2
3     198403  0.02 1984     3
4     198404  0.45 1984     4
5     198405  0.97 1984     5
6     198406  1.09 1984     6
Code
unique(pdsi$month)
 [1]  1  2  3  4  5  6  7  8  9 10 11 12
Code
# glimpse is a handy function to look at the types of data in a dataframe
glimpse(pdsi)
Rows: 500
Columns: 4
$ year_month <chr> "198401", "198402", "198403", "198404", "198405", "198406",…
$ pdsi       <chr> "-0.46", "-1.11", "0.02", "0.45", "0.97", "1.09", "0.77", "…
$ year       <int> 1984, 1984, 1984, 1984, 1984, 1984, 1984, 1984, 1984, 1984,…
$ month      <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7,…
Code
#notice that pdsi is listed as <chr>. we need to change that to numeric.

pdsi$pdsi <- as.numeric(pdsi$pdsi)

Now, that we have monthly PDSI organized, let’s calculate annual average PDSI, plot PDSI across each year in our dataset, and join these data to our total area burned dataframe. To calculate average PDSI for each year, we first group_by year, then use summarise to create a new variable “mean_annual_PDSI” using mean().

Code
# calculate annual average PDSI
annual_pdsi <- pdsi %>% group_by(year) %>% summarise(mean_annual_PDSI = mean(pdsi), .groups = "drop")

# plot PDSI across years
# This plot will show PDSI on the y-axis and year on the x-axis.
annual_pdsi %>% ggplot() + geom_line(aes(year, mean_annual_PDSI)) 

Code
# remember you calculated total area burned data above; look at it and annual PDSI
TAB
# A tibble: 33 × 2
    year    TAB
 * <int>  <dbl>
 1  1984   7990
 2  1985   5221
 3  1988 244213
 4  1991   5123
 5  1992   3088
 6  1993   9793
 7  1994  70778
 8  1996   4461
 9  1998  27539
10  1999  12626
# ℹ 23 more rows
Code
annual_pdsi
# A tibble: 42 × 2
    year mean_annual_PDSI
   <int>            <dbl>
 1  1984           0.667 
 2  1985          -0.0542
 3  1986           0.357 
 4  1987          -1.93  
 5  1988          -3.02  
 6  1989           0.462 
 7  1990           1.14  
 8  1991          -0.37  
 9  1992          -2.37  
10  1993           0.464 
# ℹ 32 more rows
Code
# join the data
TAB_pdsi <- full_join(TAB, annual_pdsi, by = "year")

# Look at the data
View(TAB_pdsi) 

Notice that there are NAs listed for total area burned. In our dataset, we may want to consider the total area burned as 0 in these cases. We will use mutate to turn NAs into 0 with a if_else. Keep in mind that the MTBS does not include fires <1,000 acres. If we report total area burned as 0, we should be aware that some small fires may have burned in those years.

After turning NAs into 0, plot TAB on the y-axis and mean_annual_PDSI on the x-axis. This explores the question “How is total area burned for each year related to the annual drought severity?”

Code
TAB_pdsi <- TAB_pdsi %>% mutate(TAB = if_else(is.na(TAB), 0, TAB))

# This plot will show total area burned (TAB) on the y-axis and mean annual PDSI on the x-xis. 
TAB_pdsi %>% ggplot() + geom_point(aes(mean_annual_PDSI, TAB))

What do you notice about the relationship?

Let’s see if seasonal drought severity might have a stronger relationship with total area burned. We need to calculate summer PDSI. We first will filter the data for June (month = 6), July (month = 7), and August (month = 8), group by year, and calculate mean PDSI. We will then join summer PDSI to the other dataframe to create a new dataframe called TAB_annual_summer_pdsi.

Code
summer_pdsi <- pdsi %>%
  filter(month == 6 | month == 7 | month == 8) %>% 
  group_by(year) %>%
  summarise(mean_summer_PDSI = mean(pdsi, na.rm = TRUE), .groups = "drop")

# join the data
TAB_annual_summer_pdsi <- TAB_pdsi %>% full_join(summer_pdsi, by = "year")

Now, plot total area burned against summer PDSI.

Code
# This plot will show total area burned (TAB) on the y-axis and mean summer PDSI on the x-xis.
TAB_annual_summer_pdsi %>% ggplot(aes(mean_summer_PDSI, TAB)) + geom_point()

What do you make of this relationship?

One thing we might try is to fit quantile regression through the data. Quantile regression is an approach that allows you to fit linear models through different quantiles of the data. In other words, we can fit a model where the 90th (or other) quantile of response variable for different levels of the predictor variable. This can be useful when upper bounds of a relationship between a response and a predictor exists. See figure (below) and paper by Cade and Noon (2013) for an overview of the approach.

Two scatter plots illustrating the concept of quantile regression in ecology. The top panel shows an ideal linear relationship where a single measured variable explains most of the variation in an ecological response, with a median regression line fitting through the center of tightly clustered points. The bottom panel shows the same relationship when many unmeasured factors limit the response at different sites, producing a triangular spread of points below the upper boundary. The 90th percentile quantile regression line in the bottom panel captures the upper boundary of the relationship, estimating the effect of the measured variable when other limiting factors are minimized.Figure inspired by Cade & Noon 2003, Frontiers in Ecology and the Environment 1(8):412–420. https://doi.org/10.1890/1540-9295(2003)001[0412:AGITQR]2.0.CO;2

Let’s try fitting quantile regression through the relationship between TAB and summer PDSI. We can easily do this in ggplot using geom_quantile where we set the quantiles we want to investigate (i.e., 0.1, 0.5, and 0.9 for the 10th quantile, median, and 90th quantile).

Code
# This plot will show total area burned (TAB) on the y-axis and mean summer PDSI on the x-xis with 3 linear models shown from the quantile regression.
TAB_annual_summer_pdsi %>% ggplot(aes(mean_summer_PDSI, TAB)) + geom_point() +
  geom_quantile(quantiles = c(0.1, 0.5, 0.9))    

What do you make of this relationship? Let’s look at the relationship one more way.

We know that there are some really big fire years and some smaller fire years. This skewed distribution might warrant investigating the relationship between drought and total area burned after we log-transform TAB. Let’s try that. We can easily do that by “logging” TAB right in the ggplot. Let’s ignore the years with no fire using filter(TAB > 0). Let’s also include a linear model fit to the scatter plot using geom_smooth(method = "lm").

Code
# This plot will show log-tranformed total area burned (TAB) on the y-axis and mean annual PDSI on the x-xis.A linear model with confidence intervals shows a general negative relationship.
TAB_annual_summer_pdsi %>% filter(TAB > 0) %>% 
  ggplot(aes(mean_summer_PDSI, log(TAB))) + geom_point() +
  geom_smooth(method = "lm")

TASK 1.

Choose one approach to analyzing the relationship between total area burned and drought (annual or summer). Add nicer labels (hint: use ylab("Total area burned (acres)")) and customize at least one other part of the figure (change the theme, size, color, etc.) and write a thorough “stand alone” caption that describes the hypothesis, methods, results, and conclusion.

Fire size distribution and Pareto principle

Next, we will investigate the statistical distribution of fire sizes. Fire sizes are often described as ‘highly skewed’ data that can either be characterized by a log-normal distribution or even a power-law distribution. Compared to a common distribution like the normal distribution, these skewed distributions are characterized by many observations of low values and few very large observations. For sizes of fires, this means that most fires are small and a few are really large. Let’s look to see if this pattern holds for fires in the Crown of the Continent.

We can use our fire data from above to easily explore these patterns. We will first plot a histogram of total area burned (BurnBndAc, which are burned area in acres).

Code
# Histogram of area burned
# The plot shows a highly skewed distribution of area burned. 
hist(fires$BurnBndAc)

Let’s log-transform acres burned to see if the data resemble a log-normal distribution (i.e., log-transforming log-normal data results in a normal distribution).

Code
# The plot shows log-transformed area burned that is more normally distributed. 
hist(log(fires$BurnBndAc))

Do those data look normally distributed now?

Let’s plot acres burned for each fire after we rank them from largest to smallest. This is a rank size plot (if these were species, we would call this a rank-abundance plot). We make this using barplot of the data after sorting and telling R to sort in a decreasing way.

Code
# This will show a rank order plot of fire sizes showing that a few fires are really large, but most are small.
barplot(sort(fires$BurnBndAc, decreasing = TRUE), 
        xlab = "Rank order of area burned by fires", 
        ylab = "Fire size (acres)",
        col = "black")

This is another way of investigating fire sizes similar to “Pareto plots”. I find the Pareto Principle, which colloquially has been called the 80/20 rule, fascinating. There are many phenomena where an important few (top 20% of instances) have a disproportionate (i.e., 80%) effect on an outcome. This has been applied to business (20% of customers generate 80% of revenues), our daily lives (we wear 20% of our clothes 80% of the time), to ecosystems (20% of the species contribute 80% of the biomass). Check out this video on Zipf’s law for a fun summary of some of these patterns.

These patterns have led fire scientists to study “power law distributions” with respect to fire sizes and how distributions of fire sizes reveal self-organized criticality. We don’t need to go there here, but let’s look to see if the “80/20 rule” for fire size distributions occurs in Montana. We have already sorted fires from largest to smallest. Next we’ll calculate the cumulative area burned starting with the largest fire, then the second largest fire, etc. Finally, we’ll calculate how each of these fires contribute to the total area burned. We’ll then create a Pareto plot and calculate some summary statistics.

We will do this one step at a time.

Code
# Let's remove the geometry from our fire data. We're not going to focus on the
# spatial aspects of fires here, so we don't need the geometry. 
fires %>% st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>%  # select the fire name and acres burned
  head(15)
                                        Incid_Name BurnBndAc
1                                   CHARLOTTE PEAK      5221
2                                       GAME RANGE      5123
3                                   FREEZEOUT LAKE      9793
4                                         MCDONALD      1174
5                                         ANACONDA     11452
6                      BERGSICKER COMPLEX (CANNON)      1445
7                  BERGSICKER COMPLEX (BERGSICKER)      5993
8                                            MOOSE     73210
9                                       BIGGS FLAT      7303
10                                     CABIN CREEK      1989
11                                            BIRK      8188
12                                    WEDGE CANYON     51987
13                             LITTLE SALMON CREEK     33044
14                                          ROBERT     54500
15 LITTLE SALMON CREEK WILDLAND FIRE COMPLEX (MID)     10052
Code
# Sort by descending burned area
fires %>%  st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>% 
  arrange(desc(BurnBndAc)) %>% 
  head(15)
                   Incid_Name BurnBndAc
1                  RICE RIDGE    171473
2                CANYON CREEK    167875
3                CHIPPY CREEK     95656
4                       MOOSE     73210
5                  BEAR CREEK     60710
6                      ROBERT     54500
7                  FOOL CREEK     53912
8                WEDGE CANYON     51987
9         FAMILY PEAK COMPLEX     49769
10                      AHORN     45633
11                 GATES PARK     42493
12                    SKYLAND     41237
13 LINCOLN COMPLEX (SNOWBANK)     36987
14                JOCKO LAKES     35759
15                  RED BENCH     33845

What is the name of the largest fire?

Code
# Now add the rank (larges fire gets a 1, second largest fire gets a 2, etc.)
fires %>%  st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>% 
  arrange(desc(BurnBndAc)) %>%
  mutate(rank = row_number()) %>% 
  head(15)
                   Incid_Name BurnBndAc rank
1                  RICE RIDGE    171473    1
2                CANYON CREEK    167875    2
3                CHIPPY CREEK     95656    3
4                       MOOSE     73210    4
5                  BEAR CREEK     60710    5
6                      ROBERT     54500    6
7                  FOOL CREEK     53912    7
8                WEDGE CANYON     51987    8
9         FAMILY PEAK COMPLEX     49769    9
10                      AHORN     45633   10
11                 GATES PARK     42493   11
12                    SKYLAND     41237   12
13 LINCOLN COMPLEX (SNOWBANK)     36987   13
14                JOCKO LAKES     35759   14
15                  RED BENCH     33845   15
Code
# Add cumulative total area burned
fires %>%  st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>% 
  arrange(desc(BurnBndAc)) %>%
  mutate(rank = row_number()) %>%
  mutate(cum_area = cumsum(BurnBndAc)) %>% 
  head(15)
                   Incid_Name BurnBndAc rank cum_area
1                  RICE RIDGE    171473    1   171473
2                CANYON CREEK    167875    2   339348
3                CHIPPY CREEK     95656    3   435004
4                       MOOSE     73210    4   508214
5                  BEAR CREEK     60710    5   568924
6                      ROBERT     54500    6   623424
7                  FOOL CREEK     53912    7   677336
8                WEDGE CANYON     51987    8   729323
9         FAMILY PEAK COMPLEX     49769    9   779092
10                      AHORN     45633   10   824725
11                 GATES PARK     42493   11   867218
12                    SKYLAND     41237   12   908455
13 LINCOLN COMPLEX (SNOWBANK)     36987   13   945442
14                JOCKO LAKES     35759   14   981201
15                  RED BENCH     33845   15  1015046
Code
# Add the running percentage of area burned
fires %>% st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>%
  arrange(desc(BurnBndAc)) %>%
  mutate(rank = row_number()) %>%
  mutate(cum_area    = cumsum(BurnBndAc),
         cum_percent = cum_area / sum(BurnBndAc) * 100) %>% 
  head(15)
                   Incid_Name BurnBndAc rank cum_area cum_percent
1                  RICE RIDGE    171473    1   171473    7.584938
2                CANYON CREEK    167875    2   339348   15.010722
3                CHIPPY CREEK     95656    3   435004   19.241971
4                       MOOSE     73210    4   508214   22.480342
5                  BEAR CREEK     60710    5   568924   25.165789
6                      ROBERT     54500    6   623424   27.576543
7                  FOOL CREEK     53912    7   677336   29.961286
8                WEDGE CANYON     51987    8   729323   32.260880
9         FAMILY PEAK COMPLEX     49769    9   779092   34.462362
10                      AHORN     45633   10   824725   36.480893
11                 GATES PARK     42493   11   867218   38.360528
12                    SKYLAND     41237   12   908455   40.184606
13 LINCOLN COMPLEX (SNOWBANK)     36987   13   945442   41.820689
14                JOCKO LAKES     35759   14   981201   43.402453
15                  RED BENCH     33845   15  1015046   44.899553
Code
# Add the percent of total NUMBER of fires as a cumulative total
fires %>%
  st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>%
  arrange(desc(BurnBndAc)) %>%
  mutate(rank = row_number()) %>%
  mutate(
    cum_area     = cumsum(BurnBndAc),
    cum_percent  = cum_area / sum(BurnBndAc) * 100,
    cum_fire_pct = rank / n() * 100) %>% 
  head(30)
                            Incid_Name BurnBndAc rank cum_area cum_percent
1                           RICE RIDGE    171473    1   171473    7.584938
2                         CANYON CREEK    167875    2   339348   15.010722
3                         CHIPPY CREEK     95656    3   435004   19.241971
4                                MOOSE     73210    4   508214   22.480342
5                           BEAR CREEK     60710    5   568924   25.165789
6                               ROBERT     54500    6   623424   27.576543
7                           FOOL CREEK     53912    7   677336   29.961286
8                         WEDGE CANYON     51987    8   729323   32.260880
9                  FAMILY PEAK COMPLEX     49769    9   779092   34.462362
10                               AHORN     45633   10   824725   36.480893
11                          GATES PARK     42493   11   867218   38.360528
12                             SKYLAND     41237   12   908455   40.184606
13          LINCOLN COMPLEX (SNOWBANK)     36987   13   945442   41.820689
14                         JOCKO LAKES     35759   14   981201   43.402453
15                           RED BENCH     33845   15  1015046   44.899553
16                 LITTLE SALMON CREEK     33044   16  1048090   46.361222
17                           RED EAGLE     32563   17  1080653   47.801614
18                         BRUSH CREEK     30166   18  1110819   49.135977
19                         ALICE CREEK     29971   19  1140790   50.461715
20                  ELBOW PASS COMPLEX     28989   20  1169779   51.744014
21                             LIBERTY     27731   21  1197510   52.970668
22                   BARTLETT MOUNTAIN     27614   22  1225124   54.192145
23 RAMPAGE COMPLEX (DOUBLE MOUNTAIN 2)     23680   23  1248804   55.239607
24                        CONGER CREEK     22936   24  1271740   56.254158
25      MONTURE-SPREAD RIDGE (MONTURE)     22493   25  1294233   57.249114
26                         TRAIL CREEK     22338   26  1316571   58.237213
27                                ELMO     22148   27  1338719   59.216908
28   MINERAL-PRIMM (MINERAL AND PRIMM)     20888   28  1359607   60.140868
29                             NIARADA     20686   29  1380293   61.055892
30                               SCALP     20309   30  1400602   61.954241
   cum_fire_pct
1     0.5291005
2     1.0582011
3     1.5873016
4     2.1164021
5     2.6455026
6     3.1746032
7     3.7037037
8     4.2328042
9     4.7619048
10    5.2910053
11    5.8201058
12    6.3492063
13    6.8783069
14    7.4074074
15    7.9365079
16    8.4656085
17    8.9947090
18    9.5238095
19   10.0529101
20   10.5820106
21   11.1111111
22   11.6402116
23   12.1693122
24   12.6984127
25   13.2275132
26   13.7566138
27   14.2857143
28   14.8148148
29   15.3439153
30   15.8730159
Code
# plot this as a Pareto chart
# This will show burned area on the y-axis for fires rank largest to smallest with a cumulative area curve that rises quickly and levels off.
fires %>%
  st_drop_geometry() %>%
  dplyr::select(Incid_Name, BurnBndAc) %>%
  arrange(desc(BurnBndAc)) %>%
  mutate(rank = row_number()) %>%
  mutate(
    cum_area     = cumsum(BurnBndAc),
    cum_percent  = cum_area / sum(BurnBndAc) * 100,
    cum_fire_pct = rank / n() * 100) %>% 
  ggplot(aes(x = rank)) +
  geom_col(aes(y = BurnBndAc), fill = "grey") +
  geom_line(aes(y = cum_percent * max(BurnBndAc) / 100),
            color = "steelblue", size = 1) +
  scale_y_continuous(
    name = "Burned Area (acres)",
    sec.axis = sec_axis(~ . / max(fires$BurnBndAc) * 100,
                        name = "Cumulative %")) + 
  labs(x = "Fire Rank (largest to smallest)", y = "Burned Area (acres)") +
  theme_minimal()

TASK 2.

Look at the plot and use View() to look at the data to see what percentage of fires burned what percentage of total area burned. Do fires in the Crown of the Continent follow the 80/20 rule? Consider these patterns in light of a quote I once heard from a fire manager: “there are fires we put out, and there are fires we get out of the way of.” Consider the causes and consequences of these patterns for ecosystems and people, interpret the results, and write an abstract in the format of Landscape Ecology.

What drives fire severity? It depends.

We know that many complex and interacting factors govern the spatial patterns and severity of disturbances, especially fires. In the next exercise, we will explore how topography (heat load index and elevation) and vegetation (greenness of vegetation before a fire) affects the severity of a fire and whether these patterns vary depending on the climate and fire conditions for the year. We will be looking at two estimate of fire severity: the classification of the Monitoring Trends in Burn Severity (MTBS) and the continuous composite burn index of Parks et al. (2025).

First, let’s consider the landscape patterns among fires that burned between 1985 and 2022. Plot fires that we brought in earlier, pan around the Crown of the Continent and consider where fires occur, when, and how they interact with each other and the landscape.

Code
# This will open an interactive plot of fires in the Crown of the Continent.
# mapview::mapview(fires, zcol = "year", col.regions = c("seagreen", "khaki", "darkred"))
if (knitr::is_html_output()) {
  mapview::mapview(fires, zcol = "year", col.regions = c("seagreen", "khaki", "darkred"))
} else {
  ggplot(fires) +
    geom_sf(aes(fill = year)) +
    scale_fill_gradientn(colors = c("seagreen", "khaki", "darkred")) +
    theme_bw() +
    labs(fill = "Year")
}

Now, let’s consider how patterns of severity within fires might be influenced by topography, pre-fire vegetation conditions, and other factors. I have prepared several datasets for you to explore the factors that might predict fire severity. Bring this in and stack them using c().

Code
# fire_name
fires_name    <- rast("data/Lab5/fires_name.tif")

# fire_ID
fires_ID    <- rast("data/Lab5/fires_ID.tif")

# fire count (number of overlapping fires in the dataset
fires_count <- rast("data/Lab5/fires_count.tif")

# year of fire
fires_year  <- rast("data/Lab5/fires_year.tif")

# heat load index calculated from a DEM using spatialEco::hli
hli         <- rast("data/Lab5/hli.tif")

# Monitoring Trends in Burn Severity classified data
mtbs        <- rast("data/Lab5/mtbs.tif")

# Normalized Difference Vegetation Index (NDVI) before fire
ndvi        <- rast("data/Lab5/ndvi.tif")

# Sean Parks and colleagues composite burn index
cbi         <- rast("data/Lab5/cbi.tif")

# Digital elevation model
elev        <- rast("data/Lab5/elev.tif")

# stack the data up
crown_stack <- c(fires_name, fires_ID, fires_count, fires_year, hli, mtbs, ndvi, cbi, elev)

# Let's make a classified version of Sean Parks' CBI data. 
# We can do this by creating a matrix and then using the "classify" function
CBIclassses <- matrix(c(
  -Inf,  1.25, 1,   # Anything less than 1.25 is assigned 1 (low severity)
  1.25, 2.25, 2,   # 1.25 to 2.25 is assigned 2 (moderate severity)
  2.25,  Inf, 3    # greater than 2.25 is assigned 3 (high severity)
), ncol = 3, byrow = TRUE)

# Look at the matrix we just created
CBIclassses
     [,1] [,2] [,3]
[1,] -Inf 1.25    1
[2,] 1.25 2.25    2
[3,] 2.25  Inf    3
Code
# Apply that matrix to create a ordinal severity raster using CBI
crown_stack$cbi_classes <- crown_stack$cbi %>% classify(CBIclassses)

# Look at Sean Park et al's burn severity classified map
# This will show fire severity for fires in the Crown of the Continent.
plot(crown_stack$cbi_classes, col = c("seagreen2", "yellow", "red"))

Code
# look at the arrangement of fires AMONG fires
# how do you think fires interact across a landscape?

Select a fire based on its name and look at the landscape patterns of burn severity based on MTBS’s classification. Here we will use the Rice Ridge fire that burned in 2017 just outside of Seeley Lake, MT.

Code
# now, let's look at the patterns of burn severity WITHIN fires
# st_transform is analogous to "project" with a raster.  
firesPRJ <- st_transform(fires, crs(crown_stack))

# We can now use dplyr's "filter" to subset one fire
rice_ridge <- firesPRJ %>% filter(Incid_Name == "RICE RIDGE")

# This will show 9 maps of the Rice Ridge fire, one for each variable in the data.
plot(rice_ridge) # look at the perimeter of Rice Ridge

Code
# Use the Rice Ridge fire perimeter to "clip" out data from the raster stack
rice_ridgeData <- crown_stack %>% crop(rice_ridge) %>% mask(rice_ridge) 

# plot the MTBS data for Rice Ridge
# This plot will show the fire severity of the Rice Ridge fire. 
plot(rice_ridgeData$mtbs, axes = F)

Look at the map of fire severity for the Rice Ridge fire and consider the patterns of burn severity? Consider the sizes and distributions of high severity patches. Consider the sizes and distributions of unburned and low severity patches. What do you think drove these patterns? What do you think the consequences of these patterns could be for wildlife habitat and ecological functions.

Heat load index and composite burn severity

In a previous lab, we used a digital elevation model to estimate ‘heat load index’ (hli) (McCune and Keon 2002). Heat load index is based on how much incoming solar radiation a slope receives. Steep southwest-facing slopes tend to be hotter and drier than steep northeast-facing slopes. How might heat load index influence patterns of fire severity?

Let’s plot the relationship and fit some simple models to investigate how heat load index might be related to fire severity. First, we will speed things up by taking a random sample of 5000 locations, ignoring NAs, and turning the sample into a dataframe. We will focus on using the composite burn index (CBI) from Sean Parks and colleagues (2025). Parks and his colleagues used field data and regression models with remotely sensed data to develop CBI, which better captures fire severity in relation to tree mortality and other effects of fire (e.g., consumption of litter and duff). See figure 1 from Parks et al. (2025) below illustrates CBI in relation to tree mortality and changes to vegetation and the forest floor.

Parks et al. 2025 Figure showing three panels illustrating fire severity concepts. Panel (a) shows a pre-fire forest with a diverse mix of conifer trees of varying heights and a green understory. Panel (b) shows the same forest during active fire with flames across the forest floor, smoke billowing through the canopy, and trees beginning to char. Panel (c) shows post-fire outcomes: the left half shows surviving green trees with some fire-scarred trunks representing low- and moderate-severity fire (CBI less than 2.25), while the right half shows dead standing snags with bare branches representing high-severity or stand-replacing fire (CBI greater than or equal to 2.25). From Parks et al. 2025, Global Change Biology, CC-BY-NC-ND 4.0 From Parks et al. 2025, Global Change Biology 31(8):e70429. https://doi.org/10.1111/gcb.70429. CC-BY-NC-ND 4.0.

While we will focus on investigating relationships between heat load index, elevation, and other factors on CBI, we also brought in the MTBS fire severity classes. We will use these to color-code observations.

Code
# take 5000 samples and turn it into a dataframe
crown_stackDF <- spatSample(crown_stack, size = 5000, method = "random", na.rm = TRUE, as.df = TRUE)

# look to see that all variables are in the dataframe
names(crown_stackDF)
 [1] "Incid_Name"  "fires_ID"    "fires_count" "fires_year"  "hli"        
 [6] "mtbs"        "ndvi"        "cbi"         "elev"        "cbi_classes"
Code
# Let's start out keeping things simple by plotting CBI against HLI
crown_stackDF %>% ggplot(aes(x = hli, y = cbi)) + 
geom_point(alpha = 0.2)

Code
# let's color code the samples by their MTBS fire severity
mtbs_colors <- c(
  "Unburned/Low"        = rgb(  0, 100,   0, maxColorValue = 255),  
  "Low"                 = rgb(127, 255, 212, maxColorValue = 255),  
  "Moderate"            = rgb(255, 255,   0, maxColorValue = 255),  
  "High"                = rgb(255,   0,   0, maxColorValue = 255),  
  "Increased greenness" = rgb(127, 255,   0, maxColorValue = 255),  
  "Non-processing"      = rgb(255, 255, 255, maxColorValue = 255))

# The mtbs column currently holds raw numeric severity codes (1-6).
# We convert it to a labeled factor matching mtbs_colors so ggplot
# treats it as a discrete category rather than a continuous number.
crown_stackDF$mtbs <- factor(crown_stackDF$mtbs, levels = 1:6, labels = names(mtbs_colors))

# Let's start out keeping things simple by plotting CBI against HLI
# This will show a scatter plot of composite burn index on the y-axis and heat load index on the x-axis. There does not appear to be a relationship between the variables.
crown_stackDF %>% ggplot(aes(x = hli, y = cbi)) + 
geom_point(aes(col = mtbs), alpha = 0.2) + 
  scale_color_manual(values = mtbs_colors) + 
  theme_bw()

It doesn’t look like there’s much of a relationship between heat load index and composite burn index. Let’s see whether this relationship changes depending on other variables. This is conceptually the same as investigating statistical interactions. When we consider statistical interactions, we’re asking how does the effect of one variable on another change with a third variable. In some cases, the effect of x on y depends on another variable. Strong statistical interactions can conceal simple relationships between two variables. While we will not statistically test for interactions here, these kinds of plots can be helpful to explore potential interactions and visualize interactions detecting in model selection.

Code
# let's "bin" elevation and heat load index to create an ordinal variable 
# that can make investigating interactions easier 
crown_stackDF$elevBin <- crown_stackDF$elev %>% ntile(3) 
crown_stackDF$hliBin <- crown_stackDF$hli %>% ntile(3)

# Let's see if this relationship might change among elevation classes
# This will show 3 scatter plots for 3 elevation ranges of composite burn index on the y-axis and heat load index on the x-axis with symbols color coded by fire severity from MTBS. 
crown_stackDF %>% ggplot(aes(x = hli, y = cbi)) + 
geom_point(aes(color = mtbs), alpha = 0.2) +
facet_wrap(~elevBin) +
scale_color_manual(values = mtbs_colors) + 
theme_bw()

There still doesn’t seem to be much of a relationship between heat load index and fire severity.

Let’s include another ordinal variable based on the total area burned in a year. It could be that topography (heat load index) influences fire severity only during certain conditions. During “small fire years” perhaps topography exerts a stronger control on patterns of fire severity than big years when dry fuels or high winds overwhelm topographic influences on severity. Let’s explore this possibility by looking at how the relationship between heat load index and fire severity might change with elevation and with small, medium, and big fire years. We will use our data on total area burned (TAB) from above, classify the data into 3 equal-sized bins, join the data to our dataframe, and plot the results.

Code
# Let's take advantage of our TAB data from above and make a new variable
# of small, medium, and large fire years
TAB$fire_bins <- ntile(TAB$TAB, 3)

# join those data to our stack dataframe based on year
crown_stackDF2 <- crown_stackDF %>% left_join(TAB, by = c("fires_year" = "year"))

# This will show 9 scatter plots for 3 elevation ranges and 3 bins of "fire years" of composite burn index on the y-axis and heat load index on the x-axis with symbols color coded by fire severity from MTBS. Smoothed regression models with confidence intervals show variability in the relationships.
crown_stackDF2 %>% ggplot(aes(x = hli, y = cbi)) + 
  geom_point(aes(color = mtbs), alpha = 0.5) +
  facet_grid(fire_bins~elevBin, 
             labeller = labeller(
    fire_bins = c(`1` = "Low TAB", `2` = "Mid TAB", `3` = "High TAB"),
    elevBin   = c(`1` = "Low elevation", `2` = "Mid elevation", 
                  `3` = "High elevation"))) +
  geom_smooth(method = "gam", color = "black") +
  scale_color_manual(values = mtbs_colors) +
  xlab("Heat load index") + ylab("Composite burn index") +
  theme_bw()

This can get complex fast, but what do you notice about the relationship between heat load and composite burn index. Do you think there’s compelling evidence to suggest that topography (via elevation and heat load index) govern fire severity? In which cases? Are the relationships what you would expect? Why?

What else could be influencing the patterns of burn severity?

Parks and colleagues provided data on normalized difference vegetation index (NDVI) before fire. NDVI is essentially an estimate of a pixel’s greenness. Let’s make an assumption that high NDVI values are associated with high fuel loads (i.e., more green pixels have high tree canopy density and more fuels). How might fuel loading influence fire severity? For now, let’s conclude that heat load index has little effect on CBI. Let’s test the hypothesis that high NDVI (a proxy for canopy fuel loads) will influence composite burn index.

Code
# Let's plot CBI on the y axis and NDVI on the x
# This will show a scatter plot of composite burn index on the y-axis and pre-fire NDVI on the x-axis with symbols color coded by fire severity from MTBS. A smoothed regression model with confidence intervals show a possible "hump-shaped" relationship.

crown_stackDF2 %>% ggplot(aes(x = ndvi, y = cbi)) + 
  geom_point(aes(color = mtbs), alpha = 0.5) +
  geom_smooth(method = "gam", color = "black") +
  scale_color_manual(values = mtbs_colors) +
  xlab("Pre-fire NDVI") + ylab("Composite Burn Index") +
  theme_bw()

What do you notice about the relationship between pre-fire NDVI and CBI?

TASK 3.

Use facet_wrap or facet_grid to explore whether the relationship between pre-fire NDVI and composite burn index depend on another variable (i.e., does the relationship change with another variable like elevation, total area burned, or heat load index?). Present your figure and an abstract written in the format of Landscape Ecology.

Data source(s)

Fire perimeters (Crown_fires84_24.shp) and MTBS-classified burn severity (mtbs.tif): Monitoring Trends in Burn Severity (MTBS).

Composite Burn Index (cbi.tif): Sean Parks and colleagues (2025).

Palmer Drought Severity Index (PDISdata.csv): NOAA National Centers for Environmental Information.

Digital elevation model (elev.tif): LANDFIRE (same source used in Labs 1 and 3; not separately linked in this lab’s text).

Heat load index (hli.tif) was calculated from the DEM using the method of McCune and Keon (2002), not downloaded as a standalone dataset.

Fire name/ID/count/year rasters (fires_name.tif, fires_ID.tif, fires_count.tif, fires_year.tif) and pre-fire NDVI (ndvi.tif) were derived from the MTBS and Parks et al. data above.