Using PowerShell and World Data (now a public API) with Microsoft’s NetMap free graphing libraries

September 5, 2008

in NetMap,PowerShell,World Bank

The World Bank’s first API offers 114 indicators from key data sources and 12,000 development photos. We are releasing this API because we believe this information can be mapped, visualized and mashed up in an unlimited number of ways that will help develop a better understanding of trends and patterns around key development issues.

HERE

Visualize the Data with PowerShell and NetMap

I posted on Microsoft Research .NetMap and PowerShell. This script visualizes countries by Income Level, Lending Types and Regions.

param($category="incomeLevel")

. .\Show-NetMap

$wc = New-Object net.webclient
$url="http://open.worldbank.org/rest.php?
method=wb.countries.get&per_page=250&api_key=<your api key>"

([xml]$wc.DownloadString($url)).rsp.countries.country |
  % {
   if($_.iso2code -and $_.name) {
    new-object psobject |
     add-member -pass noteproperty source ($_.$category.'#text') |
     add-member -pass noteproperty target ($_.name)
    }
  } | Show-NetMap -w 250 -l F

Income Level

image

 

image

 

 

Lending Type

image

 

 

image

 

Region

image 

 

image

{ 1 trackback }

PowerShell Team Blog : OMG - Check This Out (Data Visualization with PowerShell)
09.06.08 at 10:37 am

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contrat Creative Commons

© 2007-2013, Doug Finke