Published
Edited
Feb 7, 2021
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
md`*Group data* using \`d3\` functionality`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
summaryArray = d3.rollups(rdkTrials,
v => d3.mean(v, d => d.response),
d => d.signedCoherence)
.sort((a,b) => a[0]-b[0])
Insert cell
md`*Prepend header*`
Insert cell
summaryArray.unshift(['signed coherence', 'p(reported right)'])
Insert cell
md`## Helper code

which we can move to the back to the notebook`
Insert cell
md`*Step one:* Require \`d3-dsv\` to parse the raw text. \`d3-array\` for grouping and rollups`
Insert cell
d3 = require('d3-dsv', 'd3-array', 'd3-format')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`## References

- https://observablehq.com/@manzt/requiring-a-local-file
- https://observablehq.com/@d3/d3-group

`
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