Published
Edited
Jul 16, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof num_draw = new View(5)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof lower_than_inclusive_small = new View(89)
Insert cell
viewof lower_than_inclusive_big = new View(39)
Insert cell
viewof small_prize = new View(5)
Insert cell
viewof big_prize = new View(50)
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
small_win_prob = _.find(data2, d => d["score"] == lower_than_inclusive_small)["cumsum"] * 2
Insert cell
big_win_prob = _.find(data2, d => d["score"] == lower_than_inclusive_big)["cumsum"] * 2
Insert cell
expected_prize_small = small_win_prob * small_prize
Insert cell
expected_prize_big = big_win_prob * big_prize
Insert cell
total_expected_prize = expected_prize_small + expected_prize_big
Insert cell
_ = require("lodash")
Insert cell
vg = require("vega-embed")
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
import {inline_input} from "1add11a49a452e70"
Insert cell
import {bind, View} from "@mbostock/inline-inputs"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more