Hearth of July
July 4, 2025
How many forest fires are started by fireworks each year?
Around 20 to 30. Most years have around 1,000 total fires. So that puts the percentage of fires caused by fireworks at about 2 to 3%.
What are most fires caused by?
Lightning! But if you group all the human causes together, then it's people.
Notes:
First, since the fire data only includes Oregon, I wanted a map of Oregon for the background of the plot. This took a little while to find. The first few maps I found were very low resolution and I wanted a nice sharp coast line. I also wanted to show the counties within the state, but counties extend out into the ocean, which again ruined the coastline. Fortunately, Open Street Maps provides detailed geojson files of the counties and can filter for only the land mass.
The next problem was nothing showing up when I tried to plot the geojson with D3. This was due to the winding order of the polygons. The geojson spec is defined in one direction and D3 expects the opposite direction. This seems like a defect to me, but D3 apparently has its reasons. I found an online tool to fix the file ahead of time. Then I used the Albers projection, scaled and rotated to fit Oregon nicely in the center of the plot.
Clipping the text. Those multicolored labels in the third plot? Fucking fuck, that took longer than it should have. The little gotcha breaking the whole thing was after you assign the clip path to text or whatever, it takes on all the transformations of the thing getting clipped. And because (0, 0) on the svg is the top left corner, the axis that the labels are attached to has to get shifted down almost the full height of the plot. So then the clipPath
definition, which is just a duplicate of the bars, got shifted down below the whole plot, clipping nothing. Many what-the-fucks were uttered.
Now with all these notes I never have to refigure that shit out again.
Disclaimer:
It wouldn't be a mockup without a disclaimer. That part at the top of the plot where it says "Acres Burned per Week"? That's wrong. I'm counting the total acreage of a fire on the date it was reported, then binning all that by week for each year. In reality some of these fires burns for a few weeks. If I hadn't wasted a couple hours fucking around with clipping text, I might have fixed it.
Sources:
- ODF Fire History
- https://data.oregon.gov/Natural-Resources/ODF_Fire_2000-2022_Map/5j2w-xym2
- Open Street Maps
- https://osm-boundaries.com/map
- Rewinding Tool
- https://observablehq.com/@saneef/fix-geojson