Published
Edited
Jun 22, 2021
1 fork
Insert cell
Insert cell
dataTable = JSONstat(await FileAttachment("hibeta.json").json()).toTable()
Insert cell
tidyData = {
let fields = dataTable[0];
let result = [];
for (let i = 1; i < dataTable.length; i++) {
let tableRow = dataTable[i];
let outputRow = {};
tableRow.forEach((d, i) => (outputRow[fields[i]] = d));
result.push(outputRow);
}
return result;
}
Insert cell
table(tidyData, { sortable: true })
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