Skip to contents

Access the Western Wildfire Resilience Index from R without downloading the full dataset.

firex connects to 82 wildfire resilience raster layers hosted as Cloud-Optimized GeoTIFFs (COGs) on the Knowledge Network for Biocomplexity (KNB). Users can browse the catalog, inspect layer metadata, and retrieve spatial subsets by bounding box or polygon boundary — no local storage of the full archive (~25 GB) required.

Installation

install.packages("remotes")
remotes::install_github("ignitR-package/firex")

Quick start

library(firex)
library(terra)

# Browse all 82 available layers
wri_overview()

# Get metadata for a specific layer
layer_info("WRI_score")

# Retrieve the WRI composite score for Santa Barbara County, CA
wri <- get_layer("WRI_score",
                  aoi     = c(-120.7, 34.4, -119.4, 35.1),
                  aoi_crs = "EPSG:4326")

plot(wri, col = hcl.colors(100, "YlOrRd", rev = TRUE))

Core functions

Function Description
wri_overview() Print a structured summary of all 82 layers
wri_overview_df() Return the catalog as a data frame for filtering
layer_info(id) Retrieve full metadata for a single layer
get_layer(id, aoi, aoi_crs) Download a spatial subset of a layer

get_layer() accepts numeric bounding boxes, shapefile or GeoJSON file paths, sf objects, SpatVector, SpatRaster, and SpatExtent as aoi. For inputs without an embedded CRS (numeric vectors and SpatExtent), supply aoi_crs.

Repository structure

firex/
├── R/                    # Package functions
├── man/                  # Auto-generated documentation (do not edit)
├── inst/
│   ├── stac/             # Bundled STAC catalog, collection, and item JSONs
│   └── demos/            # Demo data and example scripts
├── tests/testthat/       # Unit tests
├── DESCRIPTION           # Package metadata and dependencies
├── NAMESPACE             # Exported functions (auto-generated)
└── README.md

man/ and inst/ follow standard R package conventions and are required by the build system. man/ is generated by roxygen2 and should not be edited directly.

Data

The WWRI dataset is produced by NCEAS and funded by the Gordon and Betty Moore Foundation. The COG archive is hosted on KNB at https://knb.ecoinformatics.org/data/wri-data-processing/cogs/. A persistent DOI will be assigned following formal publication of the underlying dataset.

For dataset documentation, methodology, and an interactive dashboard, visit the official Western Wildfire Resilience Index site.

Tests

Authors

Ixel Medrano, Emily Miller, Hylaea Miller, Kaiju Morquecho
Bren School of Environmental Science and Management, UC Santa Barbara

Client: Dr. Caitlin Fong (NCEAS)
Faculty Advisors: Dr. Max Czapanskiy
Capstone Instructor: Dr. Carmen Galaz-García

License

MIT