Published
Edited
Feb 17, 2020
Insert cell
md`# Grouping Csv`
Insert cell
viewof data = csvInput({
crossOrigin: "anonymous",
initialUrl: ""
})
Insert cell
data
Insert cell
grouped = d3.group(data, d => {
var split = d.id.split("_")
if(split.length === 4) split.pop() // removes the last elem
return split.join("_")
})
Insert cell
import {fileInput} from "@mbostock/file-input"
Insert cell
Insert cell
d3 = require("d3", "d3-array@^2.2")
Insert cell
//d3 = require("d3-array@^2.2")
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