Public
Edited
Sep 28, 2021
Insert cell
Insert cell
Insert cell
dataOneLineJson = await FileAttachment("data.json").json()
Insert cell
dataOneLineCsv = d3.csvParse(await FileAttachment("data.csv").text())
Insert cell
Insert cell
dataObjectJson = {
return await FileAttachment("data.json").json();
}
Insert cell
dataObjectCsv = {
return d3.csvParse(await FileAttachment("data.csv").text());
}
Insert cell
Insert cell
dataCleanJson = {
const dataRaw = await FileAttachment("data.json").json();
var data = [];
dataRaw.forEach((d) => data.push({ category: d.category, num: +d.num }));
return data;
}
Insert cell
dataCleanCsv = {
const dataRaw = d3.csvParse(await FileAttachment("data.csv").text());
var data = [];
dataRaw.forEach((d) => data.push({ category: d.category, num: +d.num }));
return data;
}
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