Public
Edited
May 26
1 fork
1 star
Insert cell
Insert cell
viewof triggerFile = Inputs.button("choose directory")
Insert cell
files = {
triggerFile;
return Array.fromAsync((await window.showDirectoryPicker()).entries());
}
Insert cell
Insert cell
Insert cell
Insert cell
Inputs.table(
await Promise.all(
files.map(async ([name, handle]) => {
const file = await handle.getFile();
const text = await file.text();
return {
name,
content: text.slice(0, 100)
};
})
)
)
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