Public
Edited
Nov 4, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {addColumn} from "@observablehq/excel-add-columns"
Insert cell
optimjs = require('optimization-js@1.5.0/dist/optimization.js')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data_high = ebaydata.filter(d => d.ReservePriceFrac > reserve_threshold)
Insert cell
Insert cell
Insert cell
y = Array.from(d3.map(data, d => d.NBidders))
Insert cell
y_high = Array.from(d3.map(data_high, d => d.NBidders))
Insert cell
mle = d3.mean(y)
Insert cell
mle_high = d3.mean(y_high)
Insert cell
Insert cell
regdata = ebaydata.map(d => ({y: d.NBidders, x: d.ReservePriceFrac}))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function geomean_like(data, param){
const probs = data.map(x => (Math.exp(-param)*param**x)/mathjs.factorial(x));
const logprobs = probs.map(d => Math.log(d))
return Math.exp(mathjs.mean(logprobs))
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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