DougFinke

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

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.

Visualize the Data with PowerShell and NetMap

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

Lending Type

Region

This entry was posted on Friday, September 5th, 2008 at 7:14 pm and is filed under PowerShell, NetMap, World Bank.

Exit mobile version