Last active
December 10, 2017 15:29
-
-
Save jbowles/f0e76a166755c4c41085c4fd907fd283 to your computer and use it in GitHub Desktop.
From the fslabbasic template get world bank data (updated version of the fslab.org getting started 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
#load "../packages/FsLab/FsLab.fsx" | |
(* My Environment | |
visual studio code 2017 Version 1.18.1 | |
mono --version ‹2.4.1› | |
Mono JIT compiler version 5.4.1.7 (2017-06/e66d9abbb27 Wed Oct 25 12:10:41 EDT 2017) | |
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com | |
TLS: normal | |
SIGSEGV: altstack | |
Notification: kqueue | |
Architecture: amd64 | |
Disabled: none | |
Misc: softdebug | |
LLVM: yes(3.6.0svn-mono-master/8b1520c8aae) | |
GC: sgen (concurrent by default) | |
forge --version ‹2.4.1› | |
2.1.0 | |
*) | |
open XPlot.GoogleCharts | |
open Deedle | |
open FSharp.Data | |
let wb = WorldBankData.GetDataContext() | |
let cz = wb.Countries.``Czech Republic``.Indicators | |
let eu = wb.Countries.``European Union``.Indicators | |
let czschool = series cz.``School enrollment, tertiary, female (% gross)`` | |
let euschool = series eu.``School enrollment, tertiary, female (% gross)`` | |
abs (czschool - euschool) | |
|> Series.sort | |
|> Series.rev | |
|> Series.take 5 | |
let schoolDataCZ = [for y in 1985 .. 2012 -> string y, cz.``School enrollment, tertiary, female (% gross)``.[y] ] | |
let schoolDataEU = [for y in 1985 .. 2012 -> string y, eu.``School enrollment, tertiary, female (% gross)``.[y] ] | |
let options = | |
Options (title = "CZ and EU Tertiary Femail Gross % Enrollment") | |
[schoolDataCZ; schoolDataEU] | |
|> Chart.Line | |
|> Chart.WithOptions options | |
|> Chart.WithLabels ["CZ";"EU"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment