Published
Edited
May 4, 2020
Insert cell
md`# wrangle lido csv `
Insert cell
Insert cell
dataCsv
Insert cell
test = dataCsv[5]
Insert cell
Insert cell
searchResults = Object.keys(test).filter(k => k.indexOf(search) > -1).map(k => ({value: test[k], key: k}))
Insert cell
table(searchResults)
Insert cell
largeSearch = dataCsv.slice(0,100).map(d => Object.keys(d).filter(k => k.indexOf(search) > -1).map(k => ({id: d["lido.lidoRecID"], value: d[k], key: k}))).flat()
Insert cell
table(largeSearch)
Insert cell
Insert cell
Insert cell
data.find(d => d.id === "DE-MUS-018719/1788499")
Insert cell
DOM.download(serializeCsv(data), "ang-data.csv", "Download CSV")
Insert cell
Insert cell
Insert cell
import { table } from "@gampleman/table"
Insert cell
import {text} from "@jashkenas/inputs"
Insert cell
function serializeCsv (data) {
let parser = new json2csv.Parser();
let csv = parser.parse(data);
return new Blob([csv], {type: "text/csv"})
}
Insert cell
Insert cell
import {fileInput} from "@mbostock/file-input"
Insert cell
d3 = require("d3@5")
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