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

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