Public
Edited
Apr 24, 2022
1 fork
Insert cell
Insert cell
<svg width="500" height="200">
<g id="layer1"></g> <!-- one at a time -->
<g id="layer2" transform="translate(300,0)"></g> <!-- all together -->
</svg>
Insert cell
Insert cell
viewof track = Inputs.range([0, 4], {label: "Track", step: 1, value: 0})
Insert cell
data = FileAttachment("trackFeatures_sample.csv").csv()
Insert cell
fields = ["danceability","energy","speechiness","liveness","valence"]
Insert cell
onetrack = [data[track]] // just one record out of the set. "track" index chosen from range slider above
Insert cell
radarElem = d3.select(svgContainer).select("#layer1") // the svg element to put the radar in
Insert cell
radar = dvRadar(radarElem2,data,fields,200,options)
Insert cell
options = ({
maxValue: 1,
idField: "id",
transitionMS: 1000,
axisLabelShow: true
})
Insert cell
radarElem2 = d3.select(svgContainer).select("#layer2") // the svg element to put the radar in
Insert cell
radar2 = dvRadar(radarElem,onetrack,fields,200,options)
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