Figure 1. Country fertility rate by life expectancy. Image by George Taniwaki

by George Taniwaki

Time series data are hard to display in a way that shows other relationships. That’s because one generally uses a static 2-dimensional chart. The x-axis is used to display time, leaving only one other axis to show another variable. The display can be greatly enhanced by using animation. Time can flow while the x and y axes can display relationship data or geographic data. This can aid in understanding how relationships vary over time.

Last week, Google announced the release of Google Public Data Explorer. This web-based data visualization tool (because all Google tools are web-based) takes time series data from public sources and provides a way to create animations. Data Explorer allows you to create line charts, bar charts, maps and scatterplots from web data. It has a pretty clear interface to change the axes. For scatterplots you can also change the color and size of the data points.

Google’s animated trend charts are based on technology called Trendalyzer it acquired in 2006 from Gapminder, a nonprofit foundation in Sweden. I mentioned Gapminder in a 2008 blog post that has been accidentally deleted.

Fertility rate by life expectancy

Figure 1 (at top of this blog entry) is an example scatterplot I created using World Bank data for fertility rate by life expectancy worldwide by country. The data covers 1960 to 2007. First note that in 1960, there was a strong correlation between high fertility rate and low life expectancy. Also note the strong correlation between high income and high life expectancy. Many researchers have shown that women are likely to have more children if they fear that some of the children will not grow to adulthood. Note the one outlier among the high income countries that in 1960 had low life expectancy (54 years) and high fertility (5.7). That country is South Korea. If you play the animation, you can see Korea move down and to the right over time.

I’ve marked a few countries that display unusual behavior over time. China is an interesting outlier because in 1960 it was poor with a low life expectancy, but also with a low fertility rate. But if you play the animation, you see that this may have been a statistical anomaly because in 1962, the fertility rate jumps to 7.5. The fertility rate rapidly falls to under 3 as the one-child policy takes effect and continues to fall below the 2.1 replacement level in the 1990s. Rwanda, Timor-Leste, and Cambodia show short, horrifying drops in both life expectancy and fertility during genocide campaigns. Guinea-Bissau shows large fluctuations in fertility rate without a corresponding change in life expectancy. I can’t explain it. The country is very poor and perhaps its health statistics are unreliable, though this is true for many other countries. Lesotho and Zimbabwe are poor countries with high levels of HIV infection and AIDS that are causing both fertility rates and life expectancy to fall. The AIDS epidemic is taking a toll even on wealthier countries like South Africa.

Population by income

Figure 2 shows a scatterplot I created showing population by income in the U.S. by state. I would have liked to have shown income by education, city/rural ratio, or some other correlated variable, but no such variable was available in the dataset. I use log scale for population since there is such a large range in state size. I also use a log range for income because the data is not adjusted for inflation and I want the data range to show the change in income dispersion over time.

Figure 2. State population by income. Image by George Taniwaki

One of the most surprising things about the chart is that over the 40 years the rankings of state incomes doesn’t vary much. In 1969 the poorest state was Mississippi, and all the poorest states were in the southeast census region. If you play the animation, you’ll see some horizontal reordering, but not much. Even fast growing states like Nevada and Arizona don’t change order. They shoot up, but their income ranking doesn’t move much. Same with states with falling populations like Michigan and Ohio. The only exceptions are small states and districts like Hawaii, Alaska, and Washington DC. They zip around like flies. And maybe that explains why the data doesn’t move much. State level data is too coarse and it would be better to see data for the 100 largest cities or some other finer geographic region.

Maps using FlowingData

About a year ago, my friend Steve Duenser pointed me to a couple of nice animations by FlowingData that shows the growth of Target and Wal-Mart. The animations use Modest Maps, a Flash-based mapping tool.

By an odd coincidence, the three biggest discount store chains, Wal-Mart, Target, and Kmart, all started in 1962 which makes a time series comparison of store openings easier. Target is headquartered in Minneapolis and slowly began to expand throughout the U.S., jumping to large metropolitan areas. Wal-Mart grew much more quickly, but was invisible to most people because it concentrated on rural areas near its headquarters in Bentonville. It blanketed the southeastern U.S. before its steady expansion to the rest of the country. The videos showing geographic distribution make the different growth strategies more easy to observe than a tabular list would. It would be even more obvious if the two animations were combined to show overlays.

Figure 3a and 3b. Target vs Wal-Mart. Images from FlowingData

Twitter firehose

Finally, my friend Carol Borthwick pointed out an interesting way of visualizing Twitter feeds across both time and space. An interactive map was shown in The New York Times after the Super Bowl last year. It’s a fun chart and makes you realize that there’s a lot of data on the web that’s just waiting to be mined. Unfortunately, there is no story indicating how the data was collected and organized, what tools were used, or how you can make your own Twitter charts.

Figure 4. Map of Popular Twitter comments in real-time. Image from New York Times

* * * *

[Update: I added a paragraph stating that Google’s animated trend charts are based on technology it acquired from Gapminder.]

FleetwoodMacOnMac

by George Taniwaki

Google has an interesting new search feature. If you run a query on a band name, the top result is a sample of a few songs. I ran a search for “Fleetwood Mac” using IE on Windows and got the image you see at the top of this blog entry, 4 songs from their 2 best-selling albums in the 1970s with a button to play the sample from Lala.com.

However, when I run the same query using Safari on my Mac, I get different results from iLike.com, see 2nd image above.

Why do the results on different platforms use music from different sources? And now that Apple bought Lala, will it become the music provider when users run queries on Macs too?

A more interesting question is, what album are these songs from? The tag says “Greatest Hits – 2009”, but these songs are all live versions that I’ve never heard before. Fleetwood Mac is on tour this year, but they don’t have a new live album out (that I know of). And these songs feature the voice of Christine McVie who retired from the band ten years ago, so I’m guessing they must be recordings from the 1990s. If you click on the link to the iLike website, it takes you to a download page for the album versions of these songs, not the live versions you just listened to.

If anyone knows how I can get these songs, please post a comment.

* * * *

[Update: I confirmed that using Safari on Windows gives same results as using IE, the sample songs are from Lala.com.]

My own blog post shows up as the top result when I run a search on the topic. Screenshot from Google

by Geoerge Taniwaki

I wanted to add a few additional citations to my recent blog post on my split renogram. So I ran a search using the phrase “split renogram ct scan”. Guess what comes up as the top result in Google?

For some reason, my blog post is the top item. Perhaps it is due to its newness and will move down over time. People pay lots of money to have consultants manipulate their web pages so that they appear at the top of search engine results, a process called search engine optimization.

Compare the above list to the results using Bing. Notice that there is only one item that is common between the lists from these two search engines. That’s why it’s a good idea to use multiple search engines when doing research.

Running the same search in Bing does not display my blog post anywhere in the results. Screenshot from Bing

* * * *

[Update: Both Google and Bing now feature my blog as the top result for a query of “split renogram ct scan”. Pretty cool.]