If you’ve been following the Japanese earthquake you might have seen the “before and after” photo technique popularized by the New York Times. I always thought this technique would be a great way to compare choropleth maps. So, I was excited when I came across this jquery plugin that mimics the technique. Here is the map that I made out of some Maricopa County voting maps.
Your browser does not support iframes.
The map is pretty easy to put together. First you need to produce your choropleth maps. You can do this with some open source GIS programs like QGIS and uDIG. I used ESRI’s ArcMap and exported two images as jpegs. The key here is that the images need to be the same size. Save one image as before.jpg and the other as after.jpg.


Make a folder that will contain your images, html and javascript.
Using a text editor make the html file. Here is the code:
<html>
<head>
#DECLARE JAVACRIPT
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery.beforeafter.js"></script>
#DECLARE OPTIONS
<script type="text/javascript">
$(function(){
$('#container').beforeAfter({
animateIntro : true,
introDelay : 500,
introDuration : 500,
showFullLinks : false
});
});
</script>
</head>
<body>
#MAKE IMAGE DIVS
<div id="container">
<div><img alt="before" src="before.jpg" width="500" height="300" /></div>
<div><img alt="after" src="after.jpg" width="500" height="600" /></div>
</div>
</body>
</html>
The first part of this code calls jquery and the plugin. Make sure you put the plugin javascript in your folder. The next sections defines the function. The plugin has some options that you can declare. In the body, we declare two divs. These will hold the images. To make the map bigger or smaller change these divs to match your image sizes. Once you have the html, javascript and images together, place the folder on a server. Here is a zip file of my folder.
EDIT: Apparently this plugin has a “No commercial” creative commons licence.
This is the meat of a lightning talk I gave at the IRE CAR conference a couple of weeks ago called, “Beyond Mapping: Spatial Analysis on the Cheap.” Download a PDF.
TEXTBOOK
Geospatial Analysis: A Comprehensive Guide to Principles, Techniques and Software Tools
SOFTWARE
OpenGeoDa
STARS (Space-Time Analysis of Regional Systems)
GeoViz Toolkit
SAGA (System for Automated Geoscientific Analysis)
PASSaGE (Pattern Analysis, Spatial Statistics and Geographic Exegesis)
CrimeStat III
Qgis with ftools, manageR
R
There is a Spatial Cran Task View that will load up all the R Spatial modules. These include:
Classes, reading, writing, handling spatial data
Point pattern analysis
Areal data analysisSpatial regression.
In R (case sensitive) type this code:
install.packages(“ctv”)
library(“ctv”)
install.views(“Spatial”)
Two useful packages are:
PYTHON
PySal is a Python library for spatial analysis functions.
Episode 3 of the Penn State’s “Geospatial Revolution”
We’ve started a new forum for journalists interested in discussing GIS software, methods and data. The forum will obviously be a work in progress as we develop the appropriate categories for discussions. We hope to form a community to help promote geographical storytelling. I know the audience is small at the moment, but please take time to post a question or observation.
The forum is at: http://journalismGIS.com/forum
Last year we submitted a proposal to the fifth annual Knight News Challenge, a contest funding innovative ideas that help to transform community news. This year we learned that our proposal was selected to move on to the second round of the contest. The project will provide a rich set of free spatial analysis tools designed for journalists. The open source tools will be available to use for free online. We have until Jan. 31 to submit our expanded proposal. JournalismGIS.com will be the homebase of the project. If you have any tools that you would like to see developed or would like to help sponsor the project, please contact us.