MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Can anyone help?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109510] Re: Can anyone help?
  • From: Mark McClure <mcmcclur at unca.edu>
  • Date: Mon, 3 May 2010 06:09:52 -0400 (EDT)

On Fri, Apr 30, 2010 at 5:48 AM, Zairex <zairex.email at 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


  • Prev by Date: Re: how to solve for all integer solutions, linear programming
  • Next by Date: Re: Function construction and also symmetric matrices
  • Previous by thread: Re: how to solve for all integer solutions, linear
  • Next by thread: Re: Function construction and also symmetric matrices