Public
Edited
Jan 24, 2023
Paused
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
totalwidth = Math.min(Math.max(width, 400), 1200)
Insert cell
totalheight = Math.min(Math.max(totalwidth / 2, 300), 400)
Insert cell
Insert cell
Insert cell
Insert cell
xlabel = "Date of Sample"
Insert cell
ylabel = "Quantity of RNA, normalized"
Insert cell
Insert cell
timeframes = ({'Last 4 weeks': 4,
'Last 6 weeks': 6,
'Last 12 weeks': 12,
'Since Dec 3, 2021 (start of tracking Omicron)': weeksSince("2021-12-03"),
'Since July 29, 2021 (beginning of tracking)': weeksSince("2021-07-29")
})
Insert cell
weeksSince = function(datestring){
return (d3.timeDay.count(d3.timeParse("%Y-%m-%d")(datestring), new Date()) - 1) / 7
}
Insert cell
mainTitle = "SARS-CoV-2 genes (N, S), and variant-specific (ie. BA.4+BA.5 Omicron)"
Insert cell
metricsAvailable = ["N_PMMoV","S_PMMoV","Del_143145_PMMoV", "BA_2_LPPA24S_PMMoV", "BA_4_ORF1a_Del_141143_PMMoV","HV_6970_Del_PMMoV", "BA_2_75_S_147E_S_152R_PMMoV", "XBB_bkpt_PMMoV", ]

Insert cell
codigaOnly = rawdata.filter(d => d.Plant == "CODIGA")
Insert cell
[...new Set(rawdata.map(d => d.Plant))]
Insert cell
rawdata
Insert cell
import {d3, plotOverview, credit, rawdata, metricsMeta} with {xlabel, ylabel, totalheight, totalwidth, num_weeks, mainTitle, metrics} from "6c55536820c54786"
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