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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more