Life expectancy data for countries, obtained from Wikipedia and plotted with pigshell on an orthographic projection. The template is based on Rotate the world by Jason Davies. Colors by Cynthia Brewer
ycat http://en.wikipedia.org/wiki/List_of_countries_by_life_expectancy | hgrep -r 0 table.wikitable | table2js foo country data | iframe -o proj=orthographic -g /usr/template/d3-worldmap1
Running through the pipeline step by step:
ycatuses YQL to retrieve the contents of the Wikipedia page. We useycatto jump the same-origin barrier.hgrepselects HTML elements using a jQuery/CSS-like expression.table2jsconverts the table contents into plain Javascript objects, the contents of the first three ""s of a row corresponding to thefoo,countryanddataproperties of the object.iframesupplies the objects to an HTML template rendered in a sandboxed iframe.
You can rotate and zoom the globe using mouse or touch.