Taking a page from my friends at MAGIC and the Connecticut State Data Center, I’ve put together a simple dual-map Google Map mash-up of the recently released Massachusetts 2010 census data using the Google Map V3 API (see their example here). The release of the 2010 Massachusetts census did have its problems, but now the correct data are available for download. The census data are displayed using a dual-map approach. The top map displays the 2010 town-by-town population count while the bottom map displays the percent change between the 2000 and 2010 census.
Click here to visit the interactive maps.
Being a dual-map the zoom and pan controls are mimicked on each map. For example, if the user zooms or pans on the top map, the bottom map reacts accordingly. The user can also click on a polygon and a small info window will open that displays some basic census data. Over the past ten years population in Massachusetts has grown slowly, with increases in the towns of central Massachusetts. However, population has declined in many western Massachusetts towns.
The code for this page can be easily replicated and used for any number of other states, counties or towns. The user would have to create their own kmz or kml file and modify the javascript and html for their own needs. Unfortunately, Massachusetts is a tough fit for a webpage due to its shape. In this example much of the screen is dedicated to either ocean or other states.
*Update – I changed some of the code to position the maps and the legends so that they look better when the user shrinks the screen. The KMLs may also load slowly, depending on your connection speed.
Happy mapping!