Git Product home page Git Product logo

ea-drought-burn's Introduction

ea-drought-burn

DOI

This repository contains code for evaluating the effect of vegetation mortality on burn severity during the Woolsey Fire. It was developed as part of the CU Boulder Earth Data Analytics Certificate Program.

Background

The Woolsey Fire burned nearly 100,000 acres near Malibu, CA in November 2018. A four-year drought preceded the fire, resulting in widespread dieback of grass, shrubs, and trees in and around the area that burned. This project seeks to understand how the dieback affected the severity of the fire. Did areas where more vegetation die burn more severely during the fire? Can satellite-based estimates of dieback be used to inform planning for future wildfires?

In this repository, I've used the random-forest machine-learning algorithm to try to evaluate these questions.

Installation

The following software is required to install this package using the instructions below:

Once you have Git and Miniconda installed, open the command line and run the following commands to set up the environment needed to run this package:

git clone https://github.com/adamancer/ea-drought-burn
cd ea-drought-burn
conda env create --file environment.yml
conda activate ea-drought-burn

Then install the ea-drought-burn scripts using:

pip install -e .

Usage

The data required for this project is not currently available for download. Some data was prepared by other researchers, and I do not have permission to share it. To run the notebooks in this repository, please contact me to obtain a copy of the data as a zip file, then extract it to ~/earth-analytics/data/woolsey-fire.

The package includes the following directories:

  • ea_drought_burn contains a set of utility functions used by the notebooks to read, process, and plot raster data.

  • notebooks contains a set of Jupyter Notebooks used to explore and model climate, vegetation, and burn severity data related to the Woolsey Fire.

  • reports contains documents summarizing the results of the project.

Notebooks

Notebooks include:

  • 0-run-all-notebooks.ipynb runs all notebooks in the notebooks directory

  • 1-load-data.ipynb loads and provides reference info for the data used in this project. The full list of references is below.

  • 2-data-exploration.ipynb includes plots and descriptions of the data used in the burn-severity model.

  • 3-random-forest.ipynb runs a random-forest model that predicts burn severity for the Woolsey Fire based on pre-fire conditions. Variables, sampling strategies, and the area of interest are all adjustable. By default, individual runs are saved to ~/earth-analytics/data/woolsey-fire/outputs/models.

  • 4-view-model-results.ipynb allow you to view and compare results of previous models.

  • 5-project-report.ipynb generates an HTML blog post summarizing some results of this project for a general audience.

Once you have a copy of the data in the right place, you can run the notebooks using the Jupyter Notebook interface:

conda activate ea-drought-burn
cd path/to/ea-drought-burn
jupyter notebook

Open and run 0-run-all-notebooks.ipynb in the Jupyter Notebook interface to run all notebooks at once and recreate the HTML report in the reports directory.

Utility functions

The utility functions defined in ea_drought_burn can be accessed directly. For example, the plot_bands function simplifies plotting an xarray.DataArray using the earthpy library:

import rioxarray as rxr

from ea_drought_burn.utils import plot_bands


xda = rxr.open_rasterio("path/to/raster.tif", masked=True)
plot_bands(xda)

Citation

Please see the Zenodo record for this repository for a version-specific citation.

References

Data and publications used in this repository include:

ea-drought-burn's People

Contributors

adamancer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.