American Migration Visualization

Close to 40 million Americans move from one home to another every year. Jon Bruner’s updated “American Migration” visualization, demonstrates how “Americans are enormously mobile: 37.5 million people moved from one house to another last year, with 4.3 million of them moving between states.”

The interactive map lets you click on a specific county and see the immigration and emigration data for that location. Bruner explains on his blog some of the more technical specifics on the creation and workings of the visualization:

When you visit the page, JavaScript code renders a county map of the United States and prepares it for interaction. When you roll over a county, an event listener fires, displaying a callout with the name of the county and turning the county’s edges red. When you click on a county, your browser downloads a corresponding file that includes a list of other counties to which and from which people migrated, along with relevant stats (income per capita of migrants) and the figures that are shown above the map (year-by-year migration, population). Your browser fills out the stats at the top of the screen, draws a graph (or animates a change from the previous graph, if you’ve already clicked on a county), and loops over the counties in the file, filling them with some shade of red or blue to indicate net inward or outward migration.

My JavaScript code deals with two big datasets: one—the migration data—is downloaded and rendered on the fly every time you click on a county. The other consists of the contours of the map itself: the locations of the boundaries that define the 3,143 counties in the United States.

For details on how he used open source tools to create the visualization, check How To Build an Interactive Map with Open-Source Tools.

(Via O’Reilly Radar)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.