Thematic Maps With Google Maps
A thematic map is "used to emphasize the spatial pattern of one or more geographic attributes or variables, such as population density, family income, and daily temperature maximums" (Slocum et al 2009).
Google Maps and Google Fusion Tables can be used to create simple thematic maps that allow you to visualize data and share those visualizations.
World Bank Data
For this example, we will use country-level data from the World Bank.
If you go to data.worldbank.org there are a number of indicators describing characteristics of different countries around the world. This is not necessarily data that the World Bank collected itself, but they aggregate data from a number of different sources.
For this example, we will use infant mortality. This is the number of children per one-thousand live births that did not make it to their first birthday. High levels of infant mortality are usually associated with poverty, poor medical care, poor nutrition, and in some cases with war.
- Download the EXCEL data for the indicator and open it in a spreadsheet program
- Select the Data worksheet
- Delete the top three rows of metadata on the worksheet so the top row is the column names
- If you do not need historical data, you might also consider deleting some of the columns for older years to make the data less confusing
- Save the worksheet as a CSV file
Creating a Graduated Bubble Map From a CSV File
A graduated bubble map places bubbles in locations that vary in size based on a quantitative variable.
- Go to drive.google.com and log into Google Drive using your gmail account login. If you do not have a Google account, you can create one for free
- To create a new map, click the New button, More, and Google My Maps
- If Google My Maps does not appear as an option, select Connect More Apps and search for Google My Maps
- Import a new layer by uploading your CSV file of data
- Use country name column to position the placemarks
- Use the variable column to title your markers
- Style the points by your variable column
- Group by ranges so that different ranges of values display with different icons
- Configure the icons that will be displayed for each of the ranges. While Google Maps does not directly supporte graduated bubble maps, bubble icons you can use with a map are given below. Right click on the icon, copy the icon image URL, and copy that URL as a custom icon
- Give your map a meaningful name
- Include some kind of citation for your data
- Share the map publicly
- Copy the shared link to give to anyone you want to share the map with
- Optionally, if you want to embed the map on a website, select Embed on my site to get HTML iframe code
This map shows a pattern of high infant mortality where it might be suspected - in Sub-Saharan Africa, the Caribbean, and some parts of Asia. However, for this type of data, a choropleth gives clearer results.
Creating a Choropleth From a CSV File
A choropleth is a map where area are colored or shaded based on characteristics of those areas represented by different attributes.
A common type of choropleth seen during US presidential election years is the red-state / blue-state map, where red states are won by a Republican and blue states are won by a Democrat:
Unfortunately, Google Maps does not have a does not have a facility for geocoding country names to polygons of political boundaries. To create a choropleth, you will need to use Google Fusion Tables to load a file of country polygon boundaries, and then join the attribute data downloaded from the World Bank with the country boundary polygons. Google Fusion tables calls this operation a merge.
- In Google Drive, create a New, Google Fusion Tables using the CSV file of your data
- Download this KML file of country boundaries to your hard drive
- Create a new fusion table using that KML file
- From the File menu, select Merge to merge the KML file with the data from your CSV
- To merge the two tables, you need a field that is common between the tables that tells fusion tables which polygon goes with which row of data. The ISO column contains international-standard country codes that match the Country Code column used by the World Bank
- Choose the columns you want to include in the output data
- The merge operation will create a new table
- Change feature styles to polygon Gradient
- Select the column with the attribute you want to map and select use this range to distribute the gradient across the range
- You may want to change the shades of colors used. In this case, since infant mortality is generally considered to be undesirable, shades of red are used in this example, with darker shades used for higher (worse) values
- Change the name to something meaningful
The choropleth map created above tells the story you would expect. North America and Europe have low infant mortality, while Sub-Saharan Africa, Afghanistan, Pakistan all have myriad social and economic challenges that contribute to high infant mortality rates.
To indicate what those rates are, you will want a legend.
Under Change feature styles, select Automatic legend and Show polygon fill legend.
To share the map with others:
- Click the Share button
- Change the sharing to Public on the web
- Copy the Link to share and send it to whoever you want to share with
If you want to embed the map on a web page, select Tools, Publish, and copy the HTML iframe code.
Cleanup and Reopening
Google Fusion Tables are stored in your Google Drive account.
Since all the data from the original file is in the merged table, you may want to get rid of the original imported files to avoid confusion and clutter.
To reopen the file for viewing or updating, double click on it in Google Drive.