Skip to content

DanGeospatial/Driver_Analysis_of_Wildfire_Severity_in_Yukon

Repository files navigation

Driver Analysis of Wildfire Severity in Yukon

This repository is the code used for the manuscript titled "Driver Analysis of Wildfires Severity in the Central Yukon". README is currently a work in progress

Instructions

General workflow progressed as follows:

  1. Project rasters to NAD_1983_Yukon_Albers using something like BatchProjectandClip.ipynb
  2. Put NBAC polygons into folders by wildfire name
  3. Check alignment of input datasets as they are all from different sources. This can be done in GIS software like QGIS or ArcGIS Pro with automated functions: https://www.arcgis.com/home/item.html?id=4f5e9d4e3b974890991d33e7e5251231
  4. Put input datasets into named input folders
  5. Extract all ERA5-L bands using something like Clip&ExtractBands.ipynb
  6. Calculate dNBR using LandTrendR NBR composites for each fire with WhiteBoxTools or batch_dNBR.ipynb
  7. Resample all datasets not at a spatial resolution of 30 meters by calling functions inside of Scaler.py or by folder with resample_folder.py
  8. Run Retreive.py to clip all rasters, put them in correct folders and rename them
  9. Run Compiler.py to convert all the rasters in each folder to a single csv per fire
  10. Concat_and_Drop.py can then be used to combine the per fire csv files into a single DataFrame. Then drop unwanted columns and rows.
  11. It is recommended to check the DataFrame at this point for issues
  12. Based on the results of Remove_Correlation.py, the script deletor.py can be used to drop the correlated columns
  13. Now, it is recommended to check for outliers manually or using Remove_Outliers.py
  14. Run test_other_models.R to find the optimal algorithm. This project was designed for xgboost as this one was found to be optimal
  15. Find the optimal hyperparameters for xgboost using Select_Hyperparameters.py
  16. Input these parameters into Run_Optimal_Model.py to get performance metrics and save the optimal model
  17. Create graphs and diagnostic plots

Additional scripts for feature reduction/elimination are present for testing but not used.