Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let main () =
- let data = WorldBank.GetDataContext()
- // Pull out some countries from the WorldBank...
- let countries = [|
- data.Countries.``United Kingdom``
- data.Countries.``United States``
- data.Countries.France
- data.Countries.Italy
- data.Countries.``Russian Federation``
- data.Countries.Norway
- data.Countries.China
- |]
- // For each of the countries selected...
- countries |> Array.iter (fun c ->
- async {
- // Asynchronously pull out the percentage of income
- // held by the highest 10% of earners...
- let! indicator = c.Indicators.``Income share held by highest 10%``
- let incomeShare = indicator |> Seq.last |> snd
- // Append some text to the "results" div...
- jq?results.append(jq ("<p>" + c.Name + " : " + incomeShare.ToString() + "%</p>")) |> ignore
- } |> Async.StartImmediate
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement