Published
Edited
Jan 9, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
histogram(gunStatsForHisto, 600, 300, 'Actual Distribution', 30)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Math.max(...simulatedDist)
Insert cell
Math.max(...gunStatsCrossCheck)
Insert cell
gunStatsCrossCheck = {
let msgArry = [];

let sumFunction = async function(b) {
return b[1]; // grab only second field in array *******IMPORTANT
};

// recentGunStats.all.msg.forEach(async function(msg) {
recentGunStats.all[gunStatsFieldIn].forEach(async function(msg) {
msgArry.push(await sumFunction(msg));
histogram1.recordValue(await sumFunction(msg));
return msg[0];
});
return msgArry;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`# Code Details in no special order`
Insert cell
histogram1.totalCount
Insert cell
gunStatsField = recentGunStats.all[gunStatsFieldIn]
Insert cell
Insert cell
d3format = require("d3-format@1")
Insert cell
Insert cell
import { button } from "@jashkenas/inputs"
Insert cell
import {select} from "@jashkenas/inputs"

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
HDRando(1234, 0)
Insert cell
import { histogram } from '@jonhelfman/histogram'
Insert cell
JSHistogram = require('https://bundle.run/hdr-histogram-js@2.0.1')
Insert cell
import { metalog, HDRando } from '@i001962/correlated-metalog-using-copulas'
Insert cell
import {slider} from "@jashkenas/inputs"

Insert cell
Plotly = require("https://cdn.plot.ly/plotly-latest.min.js")
Insert cell
// d3 = require("d3", "d3-array@^2.2")
d3 = require("d3@6", "d3-array@^2.2")
Insert cell
import { kde, epanechnikov } from "@d3/kernel-density-estimation"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable startValue = 20
Insert cell
x = jStat.seq(0.01, 100, trials)
Insert cell
trials = 100
Insert cell
statsCollection = new Object()
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