The following table is the summary of area burned by wildfires:
if (nrow(params$reportList$fire2) > 0) { knitr::kable( params$reportList$fire2 ) } else { cat('\n') cat('No data found for selection.') cat('\n') cat('\n') }
Fire history in the period 1919 - 2018 is shown in the following chart:
if (!is.null(params$reportList$fire) & nrow(params$reportList$fire) > 0) { chart_bar_faceted( data = params$reportList$fire, x_var = year, y_var = proportion.burn, facet_chart = TRUE, facet_vars = herd_bounds, facet_ncol = 1, xlab = "Year", ylab = "Proportion of area burned", scale_x_continuous_limits = c(1919, 2025), scale_x_continuous_breaks = seq(1925, 2025, by = 75) ) } else { cat('\n') cat('No data found for selection.') cat('\n') cat('\n') }
The following chart shows 40-year cumulative area burned:
if (!is.null(params$reportList$fire) & nrow(params$reportList$fire) > 0) { data <- params$reportList$fire ##Calculating cummulative area burned over a 40 year moving window for each herd across each habitat type Years <- 1919:2018 window_size <- 40 Fire_cummulative <- data.frame (matrix (ncol = 3, nrow = 0)) colnames (Fire_cummulative) <- c ("herd_bounds", "cummulative.area.burned", "year") for (i in 1:(length(Years) - window_size)) { fire.summary <- data %>% filter(year >= Years[i] & year <= (Years[i] + window_size)) %>% group_by (herd_bounds) %>% summarize(cummulative.area.burned = sum(proportion.burn)) fire.summary$year <- Years[i] + window_size Fire_cummulative <- rbind(Fire_cummulative, as.data.frame(fire.summary)) } chart_bar_faceted( data = Fire_cummulative, x_var = year, y_var = cummulative.area.burned, facet_chart = TRUE, facet_vars = herd_bounds, facet_ncol = 1, xlab = "Year", ylab = "Cummulative proportion of area burned < 40 years", scale_x_continuous_limits = c(1959, 2020), scale_x_continuous_breaks = seq(1960, 2020, by = 30) ) } else { cat('\n') cat('No data found for selection.') cat('\n') cat('\n') }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.