The MTBS module provides access to burn severity data from the Monitoring Trends in Burn Severity program. MTBS maps the burn severity and perimeters of large fires across the United States.
# Count recordsn = MTBS.count(:fire_occurrence)n = MTBS.count(:burn_boundaries)# Count with filtern = MTBS.count(:fire_occurrence, where="acres > 5000")# Get field informationfields = MTBS.fields(:fire_occurrence)
Convenience Functions
# Query fire occurrence with filtersdata = MTBS.fires(year=2020, limit=100)data = MTBS.fires(min_acres=50000, fire_type="Wildfire", limit=100)# Query burn boundaries with filtersdata = MTBS.boundaries(year=2020, limit=50)data = MTBS.boundaries(min_acres=100000, limit=50)# Get largest fires (sorted client-side)largest = MTBS.largest_fires(10)largest = MTBS.largest_fires(10, year=2020)
Saving and Loading Files
# Download and save to local filepath = MTBS.download_file(:fire_occurrence, limit=100)# Load previously downloaded filedata = MTBS.load_file(:fire_occurrence)
Working with Results
data = MTBS.download(:fire_occurrence, limit=5)# Iterate directly over the FeatureCollectionfor feature in dataprintln("$(feature.fire_name): $(feature.acres) acres")end
Direct Downloads
MTBS also provides direct download links for full shapefiles and geodatabases:
# List available downloadsMTBS.available_downloads()# Download a shapefile or geodatabasepath = MTBS.download_shapefile(:fire_occurrence_shp)path = MTBS.download_shapefile(:burn_boundaries_gdb)