About a year ago, I added the USGS’s RSS feed for earthquakes of magnitude 2.5 or greater. It provided me a great deal of interest—from seeing where the earthquakes generally occurred to finding out about the earthquakes before the media picked up on them. I even managed to add it in time to see the foreshocks of the big earthquake in Hawai'i last year.
I kept running into a problem, though: the subject of each entry describes the location, and I don’t have the best grasp of geography. Sure, I have a decent idea where they mean when they say “central California” or “Colorado”, but when my feedreader excitedly informs me that there have been a few medium-to-large earthquakes in the Solomon Islands, I have to look at a map to figure out where that is.
That’s what I did for quite a while: I’d see something like “Papua New Guinea” (whose location I still can’t remember unless I’m looking at a point on a map) and have to look it up, thus spending valuable time that could have been spent looking at cut-and-paste webcomics.
So I came up with a solution: what if someone were to combine the composite images of the earth taken by NASA, the USGS’s earthquake feed, and combined them via some programming magic to make a computer-generated, updated image of the earthquakes across the globe? It would be wonderful—sort of like what the USGS has now, but with the actual geography instead of national boundaries on a line-drawn map.
So it happened: I was in the library one weekend helping out a friend who was writing a paper for an English class, and half of the time he didn’t really need me for anything, so I started working on projects of my own. The result was the subject of this page, so without further ado, I give you Earthquake Map.
Earthquake Map generates an image from a scaled-down image of the earth from NASA (7.5 pixels to one degree longitude or latitude) and from the USGS’s frequently updated text feeds. It displays the earthquakes of the last week with magnitudes greater than or equal to 2.5, marked for magnitude, depth, and age.
Above is an example from 5 March 2008: the transparency shows age, from fully opaque (within the last hour) to almost entirely transparent (7 days old).
The script is highly customizable if you’re interested; the specifications I list below are only for the default version of the script. In fact, if you use it, you probably want to change the eq-map file to reflect the directory you put it into and the location you’d like it to put the generated image.
The default settings are to draw a dot, 3 pixels in radius, over the spot that an earthquake occurred. It will draw rim of one color around a center of another. By default, the rim represents the depth of the earthquake, from green (shallow) to red(deep). The center, on the other hand, represents the magnitude of the earthquake, from green (2.5) to yellow (5.3) to red (8.0). Anything above an 8.0 will be displayed as magenta on the screen so as to be more easily visible.
Earthquake map is currently not available for Windows, unless you’re of a mind to install Cairo and Python 2.5 on your Windows system (if you are, more power to you!). However, it does run on Mac OS 10.5.2 (i.e., OS X Leopard) and on a Linux machine with both Cairo and Python ≥ 2.5 installed.
There currently isn't an incredibly easy way to install this, and for that I apologize. The essence of the reason I haven't done such is that I haven’t really prepared it for general consumption at the moment; for now, it’s a nerd toy to be used by nerds. When I’ve got a lot of spare time in the future, I’ll figure out a way to write a nice install script so that everyone can use it to their heart’s content.
The installation consists of downloading and unpacking one of the tarballs below:
After you unpack these to the directory of your choice, I suggest poking around at the files inside a little to customize them to the way
you want them. My current set-up is having eq-update (another small python script, also included with the install) run
every five minutes or so as a cron job. If there has been a recent quake, it’ll update the image. If there hasn’t, it’ll stop there and wait
until the next time it’s run.