From: Zairex on
I am currently using the trial version of Mathematica (no save/
export). I want to take the graph on this website:
http://www.wolframalpha.com/input/?i=GDP+per+capita,+life+expectancy
(you can get the Mathematica notebook file by clicking "DOWNLOAD AS:
Live Mathematica")

Could someone export this graph as an excel file so I could see all of
the data in rows and columns with the annotated country names. Thank
you so much.

From: Mark McClure on
On Fri, Apr 30, 2010 at 5:48 AM, Zairex <zairex.email(a)gmail.com> wrote:
> I want to take the graph on this website:
> http://www.wolframalpha.com/input/?i=GDP+per+capita,+life+expectancy
> (you can get the Mathematica notebook file by clicking "DOWNLOAD AS:
> Live Mathematica")
>
> Could someone export this graph as an excel file so I could see all of
> the data in rows and columns with the annotated country names.

It's quite easy to use Mathematica directly to format the information
the way you request. For example:

data = {CountryData["Countries", "Name"],
CountryData["Countries", "GDPPerCapita"],
CountryData["Countries", "LifeExpectancy"]};
data = Transpose[data];
Grid[data]

Note that the page you link to contains a "Mathematica form" button,
that indicates how to get some of this information. The graph on that
page, with tooltips indicating country name, can be generated as
follows:

toLabeledPoint[{name_, gdp_, le_}] := Tooltip[
Point[{gdp, le}], name];
Graphics[toLabeledPoint /@
Select[data, NumericQ[#[[2]]] && NumericQ[#[[3]]] &],
AspectRatio -> 1, Axes -> True]

Mark McClure