Custom Alaska Fire Dashboard

July 2017 ยท 2 minute read

Fire season in Alaska moves fast. When temperatures reach the 70s during the endless summer days, the spruce trees in the boreal forest are ready to light up when thunderstorms strike. I’ve always kept up with fires for work at KYUK in Bethel and out of sheer interest.

The Alaska Fire Service does a super job of publishing data in a timely manner for the managers who are dispatching millions of dollars of aircraft across the state and the broader group of homeowners, ecologists, land owners and other.

They even publish detailed reports every morning at 6:00 a.m. Their map interface packs in a lot of information.

fire dashboard

The rich web app is powerful and allows for great exploration, but I wanted a dashboard that at a glance tells me where the fires are, how many acres have burned, and what the biggest and most costly firest are. And I wanted it automated.

I ultimately experimental fire data analysis and visualization using R, javascript, Leaftlet, and Plotly. You can see it in action here. Code is in this github repo.

Here are couple of the my visualizations that build of the Plotly charting library:

fire2

And with a bit of historical context:

fire1

The page utilizes ESRI ArcGIS image services from the Alaska Fire Service in custom Leaflet maps that use the excellent MapBox baselayers.

fire4

I particularly enjoy text-based reporting

fire3

The fire_script.R file scrapes fire websites every hour (you must configure with a local cron job) and pareses the Excel and CSV data (fire_history.csv, query.xlsx) to output several data in a “exportJSON.JSON” file.

Scripts within index.html format the JSON into the final output form. The script cleans up a bit of what I belive are human fat finger errors in data entry.

#fixed the bad thign???***here
fireHistory <- filter(fireHistory, Month >5)
fireHistory$SitReportDate <- gsub("2107-06-12","2017-06-12", fireHistory$SitReportDate)