Public
Edited
Oct 13, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
raw = (await FileAttachment("songs_normalize.csv").csv({typed: true})).map(d => ({
...d,
song: String(d.song)
}))
Insert cell
Insert cell
prep = t.tidy(
raw,
// define for all-caps or all-lowercase
t.mutate({song2: d => d.song.replace(/-.*$/g, "")}),
t.mutate({song2: d => d.song2.replace(/\(.*\)/g, "")}),
t.mutate({allOne: d => d.song2.match(/^[ a-z,/']+$|^[A-Z,/']+$/)})
)
Insert cell
Inputs.table(prep)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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