This article has two sections. The first exposes you to resources that help make data visual. The second is an exercise that walks you through using one of those tools: a Google motion chart.
Gapminder/Google motion charts: Making data come alive
Gathering valid, reliable data is difficult and expensive, and we discuss some of this in our article Infant mortality rate: Understanding a vital statistic. However, even when data is reliable, it can be difficult to make it understandable, real...in short, alive to those who are not data geeks – a group that includes many policy makers.
Hans Rosling and his team worked to address this problem. They developed software to convert data into graphs that help with visualizing changes over time in a way not possible before their work began. The purpose behind their Trendanalyzer software can be seen in the name they gave it: Gapminder. If data is easily comprehended, we can better mind (or monitor and therefore address) global gaps in health and well-being. This video helps to substantiate this claim. Watch it and see if you agree.
In 2007, Google purchased the rights to Trendanalyzer, and they make it generally available through Google documents. Gapminder Foundation maintains Gapminder World, a database of global health, economic, education, poverty and infrastructure indicators. These can be accessed using the web or downloaded for use offline.
This exercise is a tutorial on using Gapminder World and Google motion charts to help make your data easily understood – to make data come alive.1
Gapminder World's data and motion charts can be viewed online. They have data on about 500 indicators, all of which are available for download as well as for use in the World motion charts. Gapminder is picky about its data and uses only reliable datasets with at least five years of observations. They post the metadata along with each indicator, including how the data was gathered and by whom. Any of theses indicators can be used on either the X- or Y-axis of their graphs (motion charts).
The Gapminder website has a number of short, simple explanations of how to use the motion chart, including a one-page guide in .pdf format and a video (3:44 minutes) on YouTube. Using the motion charts is pretty straight forward, and their explanations are clear, so rather that repeating what they have, we will walk you through use of the chart with a couple of indicators.
After taking a look at the guide and watching the video, go to Gapminder World. It opens to a motion chart that uses Life expectancy at birth (in years) as the Y-axis and the log of Gross domestic product (GDP) per person in inflation-adjusted US dollars as the X-axis. Countries appear as bubbles. The size of the bubble is determined by the size of the country's population. The color of the bubble is the region in which the country is found (See the map in the upper right hand corner of the chart). Country bubbles appear with the first year of data available for X and Y. Clicking the Play button in the lower left corner of the chart starts the motion. The speed with which the chart progresses is controlled by the small scale next to the Play button. You can add trails to the bubbles by checking the country name in the “Select” box and checking the “Trails” box just below. The wrench in the lower right corner opens features that allow you to zoom in on a portion of the graph and to set the level of opacity for bubbles (countries) not selected. Holding your cursor over a region of the map in the upper right corner makes the bubbles representing the countries of that region flash.
To see how the graph is supposed to work, go ahead and click the play button in Gapminder World's default graph. Now change your X and Y indicators to new ones. This is done by clicking the triangle at the end of the box with the name of the indicator. Try using the indicator “Aid received per person (US$, inflation-adjusted)” as your X-axis indicator. This indicator is under the category Economy in the list that pops up when the triangle is clicked. The sub-category for this indicator is Aid received. The relationship between these indicators will be more apparent if the data are converted to their log. To do this, select “log” in the box right next to the indicator. Leave your Y-axis as Life expectancy (“lin,” or linear). Now click Play. What kind of relationship do you see? This time, bubbles do not take a defined (linear) shape at any point but are always a cloud, aren't they? There is no statistical relationship. Since countries with no data do not appear, countries that receive no aid are not in the chart. This chart includes only countries receiving aid.
Gapminder has a number of preset graphs you can browse if you click “Open graph menu” (see also their downloads) in addition checking out your own combination of relationships among the indicators in their list.
Gapminder World can also be downloaded as Gapminder Desktop to a Mac or a PC for use offline. It works in the same way as the online version. You cannot load your own data into the desktop version of Gapminder World, but you create a motion chart with your data in a Google document spreadsheet.
Before explaining how to create a motion chart of your own, we offer this example of one we created. (To see the motion chart, you must have Adobe flash payer installed on your computer. There is no charge to download the program. Also, be aware that it takes a while for the motion chart to load.)
To activate our chart, switch the "lin" button to "log" for both indicators, and click play. To change the indicators, click the down arrow in the box with the indicator name, and select another indicator.
To build your own motion chart, you must open an account with Google documents. Google has no charge for this service. Next, create a spreadsheet in your Google documents account. This can be accomplished either by populating a spreadsheet in Google docs with your data or by uploading a spreadsheet into Google docs. To build a motion chart, when uploading your spreadsheet into Google docs, you must click the box labeled “Convert documents, presentations, spreadsheets, and drawings to the corresponding Google Docs formats.”
The columns of your data need to be ordered as follows: 1) Country name (or observation identifier); 2) Year (formatted according to their instructions below); 3) X-axis indicator; 4) Y-axis indicator; 5) Region (or group) name; and 6) Population (or size). As you may have noticed when playing with Gapminder World, you can easily change your X and Y indicators. If, however, you want one pair as your default, these must be placed in the column order just described. After these first six columns come any other indicators you wish to include. The rows are for each observation of X and Y.
You may view our spreadsheet with data by signing into our Google doc account, account name nyumph, with the password of nyumph12. The document name is “wb imr pop gdppc gapminder,” and the sheet name is “Gapminder data.”
Our default indicators are the World Bank's infant mortality rate and their gross domestic product (GDP) per capita. The exact names for the World Bank variables used in this table are as follows:
|GDP per capita (constant 2000 US$)|
|Mortality rate, infant (per 1,000 live births)|
|Literacy rate, adult total (% of people ages 15 and above)|
|Mortality rate, female child (per 1,000 female children age one)|
|Mortality rate, male child (per 1,000 male children age one)|
|Physicians (per 1,000 people)|
|Lifetime risk of maternal death (1 in: rate varies by country)|
|Maternal mortality ratio (modeled estimate, per 100,000 live births)|
|Mortality rate, adult, female (per 1,000 female adults)|
|Mortality rate, adult, female (per 1,000 male adults)|
|Survival to age 65, female (% of cohort)|
|Survival to age 65, male (% of cohort)|
|Life expectancy at birth, female (years)|
|Life expectancy at birth, male (years)||Life expectancy at birth, total (years)|
The data in this spreadsheet was accessed on 10 October 2010 and 7 February 2010 from http://databank.worldbank.org/ddp/home.do. If you wish to download data from the World dataBank so that it is formatted for use in a motion chart, format your report so that Page=Country, Row=Time, and Column=Series. Export the data into a format that is useful to you. We used Excel. The meta data may also be exported into an Excel document. The exported document came down with an .exe suffix, and we could not open this file. Changing the suffix to .xlsx (.xls) allowed us to open the document.
This process gets data to create a motion chart, but two steps are necessary before building the chart. The first is rather tedious: assigning a region (or group) name to each country. We first assigned each country according to the World Bank regions. Which country is in which region can be seen in the World dataBank under the variable tab “Country” and by clicking on the box “Classification.” We also created regions of our own, and these are the ones used in our spreadsheet and motion chart. While this work is tedious, we share the results with you in the Google document wb imr pop gdppc gapminder, spreadsheet World countries/regions. This sheet includes the country names, World Bank regions and our regions. Feel free to download a copy of the sheet for your use. (Even though our Google doc is accessible to you as "view only, " the data can be downloaded as an Excel spreadsheet.)
The motion chart assigns colors to each group name. We changed our region names around so that regions close to each geographically other would have colors that were more similar in hue (e.g., South America became Americas, South so that it would have a color similar to those of North and Central America rather than to Sub-Saharan Africa).
The second step is to make sure that your columns are formatted correctly. Country and region names must be text (or string). Numbers must be formatted as numbers. And the dates must be formatted according to their instructions. These are Gapminder's:
The Time-value can be in different formats:
Year – Example: 2008
Month, day and year – Example: 08152008
Week number – Example: '2008W03'
Quarter – Example: '2008Q3'
Here is the link to Google's instructions on formatting the date.
The next step is to create the motion chart itself. This link has Gapminder's step-by-step instructions. This link has Google's. Basically, you select the columns (or cells) you want in your motion chart, click insert, select gadget, and select motion chart. If you have not already created the spreadsheets for youself, feel free to download our spreadsheet and then upload it into your own account to try out the motion chart tool.
The motion chart will take a while to load, so be patient. That said, we could never really get it to work using this method. However, when we selected our columns and chose instead Insert, then Chart, Google offered suggestions for appropriate charts, one of which was the motion chart, which we selected. Using this approach worked slowly but smoothly. The chart will appear in the same worksheet as the data, but if you click the triangle in the upper left corner of the chart, you can move it its own sheet. This is what we did. The result can be seen in the sheet named “Gapminder motion chart” and above.
The purpose of a motion chart is to help others visualize your data, which means sharing the chart with others. It does not appear that you can download the motion chart to you desktop, nor as explained above, can you load your own data into the desktop version of Gapminder World. If you have internet access when making a presentation, you can toggle between your motion chart in Google and your presentation materials (see Prof Rosling’s suggestion in his video) or add a hyperlink to your presentation that opens the window in Google docs.
A motion chart can be added to a website, as we did above. There are two ways to get the code you need to post a motion chart on your website. One is by clicking the “Publish chart” button on the page with your chart in Google docs. You can also add it to a private sight by going to “Google Gadgets For Your Web Page.” Clicking the button “Add to your webpage” takes you here, where you can specify which gadget you wish to publish and how it will display. The “Data source url” they request is the URL for your motion chart in Google docs. However, this will display only if you are signed into your Google doc account. If you want to be permanently available on a website, you must use the code created through the “Publish chart” button.
Now that you have tried these samples, try using this tool to examine the relationship between other indicators over time. We offer these suggestions:
- Maternal mortality rates and the number of health workers in a region (The World Health Organization is a potential source for this data);
- The proportion living on less that US$1.25 per day and the proportion of children that show evidence of prolonged, historical hunger (those who are stunted, or short for their age) (The World dataBank is one source for this data);
- The value assigned to a country in the United Nation’s Development Programme’s (UNDP) Gender Equality Index (not the rank but the value) and the country's maternal mortality rate;
- The quality of governance and the level of income inequality (The World Bank’s Worldwide Governance Indicators and Transparency International are a good sources for data on governance and perceptions of corruption. The World dataBank has records of their estimations of the GINI coefficient as a measure of changes to income inequality over time.)
For advanced programmers interested in doing more with their motion charts, Goggle Chart Tools offers instructions on their Interactive charts (Visualization API) page.