With the Mapbox Datasets API, you can create data-based maps that continuously update. As new data arrives, you can push incremental changes to your datasets, then update connected tilesets or use the data directly in a map.

U.S. wildfires have been in the news this summer, as they are every summer, so I set out to create an automatically updating wildfire map.

Uploading and editing data with Mapbox tools

InciWeb is an interagency government website that publishes real-time information about wildfires. It hosts an RSS feed that is updated multiple times a day with reports from agencies managing active fires.

I wrote a script that grabs the latest RSS data from InciWeb and creates a GeoJSON point for each item. The point ties a wildfire’s geographic coordinates to a list of snippets from recent reports about the fire (provided by incident-specific RSS feeds).

I was also intrigued by the perimeter shapes that I saw on InciWeb detail pages. I found this data on a REST API provided by the Geospatial Multi-Agency Coordination. Supplementing the points I derived from InciWeb’s feed with fire perimeters from GeoMAC made for a more compelling and informative visualization.

Once the data was retrieved, transformed to GeoJSON, and cross-referenced, I used the Mapbox Datasets API to upload it all into a collection of datasets.

Throughout the process of writing and testing my scripts, I used the new Mapbox Studio dataset editor to review and edit updates. The ability to see and search my uploaded data in a map-based editor proved vital while I checked that my code was working as intended.

Map of U.S. wildfires

When I was confident that the scripts were functioning correctly, I scheduled them to run regularly via AWS Lambda.

Adding style and interactions to showcase the data

Using data-driven-styling in Mapbox GL JS, I made the radius of each dot correspond to that wildfire’s largest known perimeter.

U.S. wildfire map with points

Click a dot to view the latest news about the fire and get a closer look at its area.

For fires larger than 10,000 acres, use the timeline to see how the fires’ areas have changed over time.

As with any feed-based dataset, this one will become more detailed and useful as time goes by and the information accumulates.