LATITUDE + LONGITUDE + OVERPLOTTING FIX = MAPS
Decision Science News is always learning stuff from colleague, physicist, mathlete, and all-around computer whiz Jake Hofman.
Today, it was a quick and clean way to make nice maps in R without using any map packages: just plot the latitude and longitude of your data points (e.g. web site visitors) along with the “alpha” parameter to allow for layering of coincident points. It’s duh in hindsight.
Above we see a how it looks with a little data. Below is the result with more data and a lower alpha:
In the words of James Taylor, all you have to do is call:
To get the Decision-Science-News-approved framing and aspect ratio for the USA:
opts(aspect.ratio = 3.5/5)
As we are certain that there are readers who will want to show that there are much nicer ways to do this, we say: download the data and show us.