Public
Edited
Jul 20, 2024
2 forks
Insert cell
Insert cell
csv_parsed = {
let params = new URL(location).searchParams;
if ( params.has("API") ) {
return ( d3.csv( params.get("API") ));
} else {
return d3.csvParse(csv_data);
}
}
Insert cell
vz(csv_parsed)
.bar()
.x('simParPer_gBarP', 'q', { "bin": true, "title": "gbar_P (%)" }) // count shortcut
.y(true, 'q', { "title": "Frequency"})
.width(800)
.title("Histogram of simulated persistent sodium conductance")
.plot()
Insert cell
vz(csv_parsed)
.mark("point")
.x('simParPer_gBarh', 'q', { "title": "gbar_h (%)" })
.y('spkFreq_L', 'q', { "title": "left side mean cycle period (s)" })
.width(600)
.title("Scatter plot of the relation between H current and period")
.plot()
Insert cell
md` # line graph example`
Insert cell
gbarh_vs_period_fam0=`id,gbarh,period
35575,0,12.15532
199415,25,10.8346
363255,50,10.04671
527095,75,9.292481
690935,100,9.031319
854775,125,8.341978
1018615,150,8.116189
1182455,175,7.8969`
Insert cell
vz(d3.csvParse(gbarh_vs_period_fam0))
.mark("line")
.x("gbarh", 'q', { "title": "gbar_h (%)" })
.y("period", 'q', { "title": "mean cycle period (s)" })
.width(600)
.title("Relation between H current and period within one family")
.plot()
Insert cell
Insert cell
csv_data = FileAttachment("AnalySim@1.csv").text()
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