Binary or Conservative Model

elev_binary <- elev > 1300
elev_map <- tm_shape(elev_binary) +
tm_raster(style = "cat")

lc_binary <- (lc > 40 & lc < 50) 
lc_map <- tm_shape(lc_binary) +
tm_raster(style = "cat")

slp_binary <- slope > 10 
slp_map <- tm_shape(slp_binary) + 
tm_raster(style = "cat")

blank <- elev
blank[] <- NA
streams_pts <- rasterToPoints(streams, spatial = TRUE)
streams.d <- distanceFromPoints(blank, streams_pts)

strm_binary <- streams.d < 1000
stream_b <- tm_shape(strm_binary)+
tm_raster(style="cat")+
tm_layout(main.title="Stream Buffer")

c_model <- elev_binary*lc_binary*slp_binary*strm_binary

tm_shape(c_model) +
tm_raster(style = "cat", palette = c("white", "darkblue"), title = "Habitat Suitability", labels = c("Not Suitable (0)", "Suitable (1)")) + 
tm_compass(position = c("right", "bottom"))+
tm_scale_bar(position = c("right", "bottom"))+
tm_layout(main.title = "Tree Species Habitat Location", main.title.size = 1.15, main.title.position = "center")

This first model is known as a conservative or binary model. Each cell is coded as either 1, which in this cases means suitable for habitat, or 0, which means not suitable for habitat. Four different layers, elevation, land cover, slope, and streams, are used to create a binary model to predict where a specific tree species may grow. For this model, environmental favorability for suitability include elevations greater than 1300 meters, land cover of evergreen or mixed forest, slopes greater than 10 degrees, and within 1000 meters within a stream. If the cell satisfies these parameters which are marked as predictors for the tree species, then the cell will be designated as a 1 as opposed to 0 if it does not satisfy it. Once all four layers have be created into binary layers defined by the parameters, they are multiplied together so that only suitable cells for all 4 environmental attributes are considered suitable in the final model. If there is a zero at any cell for any four of the layers then that cell will be marked as zero/unsuitable overall. Therefore, the cells marked as 1 are all above 1300 meters, have land cover of evergreen or mixed forest, slopes greater than 10 degrees, and are within 1000 meters of a stream.

Liberal or Weighted Overlay Model

# High Elevation
elev_min <- cellStats(elev, stat=min)
elev_max <- cellStats(elev, stat=max)

elev_score <- ((elev - elev_min)/(elev_max - elev_min))
escore_map <- tm_shape(elev_score) + 
tm_raster(style = "cont" ,  title = "Normalized Score") + 
tm_layout(main.title = "Elevation", main.title.size = 1, legend.outside = TRUE)


# Land Cover Types - Not Forest(0), 41-Decid(0.5), 42-Evergreen(1), 43-Mixed(0.8)
lc_m <- c(0, 40, 0, 40, 41, 0.5, 42, 43, 0.8, 41, 42, 1, 43, 100, 0) 
lc_m <- matrix(lc_m, ncol = 3, byrow = TRUE)
lc_reclass <- reclassify(lc, lc_m, right = TRUE)

lc_map <- tm_shape(lc_reclass) + 
tm_raster(style = "cat", title = "Normalized Score", labels = c("Not Forest (0)", "Deciduous Forest (.5)", "Mixed Forest (.8)", "Evergreen Forest (1)"), palette = c("gray", "darkolivegreen", "lightgreen", "darkgreen")) + 
tm_layout(main.title = "Landcover", main.title.size = 1, legend.outside = TRUE)


# Steep Slopes
slop_min <- cellStats(slope, stat=min)
slop_max <- cellStats(slope, stat=max)
slop_score <- ((slope - slop_min)/(slop_max - slop_min))

slop_map <- tm_shape(slop_score) + 
tm_raster(style = "cont",  title = "Normalized Score") + 
tm_layout(main.title = "Slope", main.title.size = 1 ,  legend.outside = TRUE)


# Close to Streams 
strm_min <- cellStats(streams.d, stat=min)
strm_max <- cellStats(streams.d, stat=max)
strm_score <- 1 - (((streams.d - strm_min)/(strm_max - strm_min)))

strm_map <- tm_shape(strm_score) + 
tm_raster(style = "cont",  title = "Normalized Score") + 
tm_layout(main.title = "Streams", main.title.size = 1 , legend.outside = TRUE)

tmap_arrange(escore_map, lc_map, slop_map, strm_map) 



# Weighted Overlay Model 
wo_model <- (elev_score*0.3) + (lc_reclass*0.2) + (slop_score*0.2) + (strm_score*0.3)

tm_shape(wo_model) + 
tm_raster(style = "cont", palette = c("YlGn"), title = "Suitability (High: 1, Low: 0)")  + 
tm_layout(legend.outside = TRUE, main.title = "Liberal Model for Tree Species Habitat Location", main.title.size = 1)

The second model, known as a Liberal or Weighted Overlay Model, can be considered a bit more complex than the binary model as you are not only working with 1s and 0s but an entire range of values defined by reclassification methods. For this model, the tree species of interest is more likely to be found growing and/or be able to grow in areas which are at higher elevations, forested landcover types, steeper slopes, and close to streams. I first normalized all four variables to scales of 0 to 1 with 1 being more suitable and 0 representing less suitable. To standardize them to the 0-1 scale, the min and max of each attribute was obtained and included in the equation which divided the attribute value minus its min by the attribute value’s range to gain high values associated with higher scores. Land cover types were reclassified to a value of 0 for non-forest types, 0.5 for deciduous, 0.8 for mixed forests, and 1 for evergreen forests. For closer distance to streams, however, the equation was subtracted from 1 in order to get lower distances associated with higher scores. Once normalized/re-scaled, weights are attached to the four layers depending on their importance by multiplying by a set of decimals then adding them all together to produce a map which has a range of suitability scores from 0 to 1 where closer to 1 means a cell more probable to have or grow the specific tree species.