Someone on Twitter creates nifty radar charts for Premier League soccer players. The radars indicate pass direction and frequency via
longer and brighter areas. I wish I could link to an example, but the technique can be adapted for other spatial analyses. Namely,
a simplified alternative to heatmaps and chloropleths.
The Camp Fire in Paradise affected many friends and family. I’ve drawn blogging inspiration from this tragedy before,
but now with a more incisive, albeit similar spatial question: if I live in Paradise, from which direction are fires most commonly reported?
North? East? Southwest? Code and radar charts below.
Second, I subset and transform the fires from Butte County:
Third, I needed a way to partition a circle into “pizza slices”. I asked on StackOverflow and Barry Rowlingson came to my rescue with
some trig. His solution was
two functions, one to create a single wedge given a centre, radius, start angle, width, and number of sections in the arc part, and another to
create separate wedges with different start angles. Clever!
Now, fourth, I create, project, and total the fires by wedge:
Here’s what we have:
Note that the slices have been somewhat distorted from the projection. But it looks like most fires are from the southeast zone. But has that always been the case? Our data only goes to 2015, but let’s
check 10 years.
And because donut charts are more pleasing to the eye, let’s hollow out the center:
At this point I started fiddling with maps using ggplot2, leaflet, and tmap. tmap won out, but I needed to get each year into
a separate column. Look away, tidyversers–it is a for loop:
And the final viz:
Downtown Paradise is at the center of each radar chart. And the southeast holds–most fires from that zone.
A heatmap would admittedly be more precise (and possibly easier to make), but I like the generalized simplicity for the zones. I think
it’s more effective at a glance and indicates change over time quicker.
This may be bundled into a package at a later date.