Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
From the fslabbasic template get world bank data (updated version of the getting started example)
#load "../packages/FsLab/FsLab.fsx"
(* My Environment
visual studio code 2017 Version 1.18.1
mono --version ‹2.4.1›
Mono JIT compiler version (2017-06/e66d9abbb27 Wed Oct 25 12:10:41 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
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›
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