Thursday, June 10, 2010

[1990-2008] LAC and OECD’s PCs and Mobile subscriptions through the light of the moving bubbles


I am a big fan of Swedish professor Hans Rosling and his work at the Gapminder Foundation, fighting against what he calls the most chronic disorder re
ported: DbHd (data base hugging disorder). Prof. Hans is noted for his groundbreaking work with compiling and transforming development data into moving bubble diagrams and flowing curves that make global trends clear. Indeed as he usually says in his talks: Power Pointer presentations look like stuffed animals when you compare them with live interactive graphs and maps.

I recently started playing with Google Motion chart to visualize ICT trends and dynamics over time. There are plenty people mastering this king of graph and creating very interesting visualizations and mash-ups. If you are not familiar with this work, I highly recommend that you have a look at the Google Charts Tools, in particular the motion chart. It's a dynamic chart to explore several indicators over time. The chart is rendered within the browser using Flash.

So, here is the final product.

Overall, the following interactive graph shows LAC countries' performance lagging behind OECD countries regarding Personal Computers (PCs) per 100 inhabitants, while Mobile Telephone Subscriptions really took off in the region and grew from 9.9 to 81.6 from 2000 to 2008, respectively.

Notes: Mexico is included in LAC and not in OECD. Countries are coded as OECD regardless of when they became OECD members (i.e., the Slovak Republic joined the OECD in December 2000, but the country is coded as OECD from 1990-2008).

Sources: Prepared by the IDB's Science and Technology Division based on the data from ITU Statistics online database and World Telecommunication / ICT Indicators Database 2009.



Reference: The Imperative of Innovation: Creating Prosperity in Latin America and the Caribbean (LAC)

You can find some more visualizations such as this one, using World Bank's Open Data and on the Gapminder website.

Now, if you are wondering how to extract the data from a Microsoft Excel (tm) spreadsheet and translate it into a Motion Chart, here's a tip: you can use an excellent Python package called xlrd, which works on any platform (including Mac!) and allows you to programmatically make these transformations (too boring and time-consuming to do it by hand). Note that this is a library target to software developer and it is not an end-user tool. I will discuss this in more detail in a future post. The source code looks like this - note that the code snippet is not complete.


import xlrd # Import the package

book = xlrd.open_workbook("yourfile.xls") # Open an .xls file

sheet = book.sheet_by_index(0) # Get the first sheet

regs = sheet.nrows

while rowNumber <= MAX_NUM_YEARS:

currentYear = str(sheet.cell_value(rowx=rowNumber, colx=2))

for counter in range(regs):
country = sheet.cell_value(rowx=counter, colx=0)
year = str(sheet.cell_value(rowx=counter, colx=2))
pcs = str(sheet.cell_value(rowx=counter, colx=5))
mobiles = str(sheet.cell_value(rowx=counter, colx=6))
region = sheet.cell_value(rowx=counter, colx=1)

if (year == currentYear):
print "['",country.rstrip(),"'",
print ",new Date (",year,
print ",0,1)",
print ",",pcs,
print ",",mobiles,
print ",'",region.rstrip(),"'],"

elif (year == "NEXT"):
rowNumber += 1
break


Acknowledgement and thanks:
Alison Cathles (Research Fellow at the IDB's Science and Technology Division)



Enhanced by Zemanta

No comments:

Post a Comment