Last active
October 28, 2019 03:07
-
-
Save kunjee17/48b191951311fd2fc828e7ca0e290c95 to your computer and use it in GitHub Desktop.
Famous World Bank Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "../../../bin/lib/net45/FSharp.Data.dll" | |
#load "../../../packages/test/FSharp.Charting/FSharp.Charting.fsx" | |
open FSharp.Data | |
open FSharp.Charting | |
type WorldBank = WorldBankDataProvider<"World Development Indicators", Asynchronous=true> | |
let wb = WorldBank.GetDataContext() | |
let countries = | |
[| wb.Countries.``Arab World`` | |
wb.Countries.``European Union`` | |
wb.Countries.Australia | |
wb.Countries.Brazil | |
wb.Countries.Canada | |
wb.Countries.Chile | |
wb.Countries.``Czech Republic`` | |
wb.Countries.Denmark | |
wb.Countries.France | |
wb.Countries.Greece | |
wb.Countries.``Low income`` | |
wb.Countries.``High income`` | |
wb.Countries.``United Kingdom`` | |
wb.Countries.``United States`` |] | |
[ for c in countries -> | |
c.Indicators.``Gross capital formation (% of GDP)`` ] | |
|> Async.Parallel | |
|> Async.RunSynchronously | |
|> Array.map Chart.Line | |
|> Chart.Combine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment