Public
Edited
Feb 18, 2023
Insert cell
Insert cell
infection_interval = 4;
Insert cell
start_state = ({
dark_factor: 2,
infected: 1488,
susceptible: 200000,
growth: Math.pow(1.1,3/7)
});
Insert cell
growth_on_full_pop = Math.pow(start_state.growth,infection_interval)*2.1e6/start_state.dark_factor/start_state.susceptible;
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
Plot.dot(ens_data, {x: "infected_from_start", y: "growth"}).plot({grid: true, y:{type: "linear"}, x: {type: "linear"}})
Insert cell
Insert cell
evolve_full(start_state)
Insert cell
Insert cell
data_daily[365]
Insert cell
Insert cell
function compute_growth(arr, i, prop, off = 7) {
const avg = 7;
const off2 = Math.round(off/2);
const x0 = compute_avg(arr,prop,i-off2,avg);
const x1 = compute_avg(arr,prop,i+off-off2,avg);
return x0 ? Math.pow(x1/x0, infection_interval/off) : null;
}

Insert cell
Insert cell
si_data.slice(-5)
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
isNum = a => a===0 || a;
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