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
General workflow progressed as follows:
- Project rasters to NAD_1983_Yukon_Albers using something like BatchProjectandClip.ipynb
- Put NBAC polygons into folders by wildfire name
- 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
- Put input datasets into named input folders
- Extract all ERA5-L bands using something like Clip&ExtractBands.ipynb
- Calculate dNBR using LandTrendR NBR composites for each fire with WhiteBoxTools or batch_dNBR.ipynb
- 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
- Run Retreive.py to clip all rasters, put them in correct folders and rename them
- Run Compiler.py to convert all the rasters in each folder to a single csv per fire
- 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.
- It is recommended to check the DataFrame at this point for issues
- Based on the results of Remove_Correlation.py, the script deletor.py can be used to drop the correlated columns
- Now, it is recommended to check for outliers manually or using Remove_Outliers.py
- Run test_other_models.R to find the optimal algorithm. This project was designed for xgboost as this one was found to be optimal
- Find the optimal hyperparameters for xgboost using Select_Hyperparameters.py
- Input these parameters into Run_Optimal_Model.py to get performance metrics and save the optimal model
- Create graphs and diagnostic plots
Additional scripts for feature reduction/elimination are present for testing but not used.