Published
Edited
Jan 10, 2022
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = {
mutable progress = 0
const base64s = await Promise.all(rawdata.map(d=>toBase64(cors_proxy?cors_proxy+d[imagesKey]:d[imagesKey])))
return rawdata.map((d,i)=>({...d,base64:base64s[i]}))
}
Insert cell
Insert cell
Insert cell
Insert cell
toBase64 = url => fetch(url)
.then(response => {
return response.blob()
})
.then(blob => new Promise((resolve, reject) => {
const reader = new FileReader()
reader.onloadend = () => {
mutable progress++;
return resolve(reader.result)
}
reader.onerror = reject // TODO: handle rejection cases
reader.readAsDataURL(blob)
}))
.catch(err => { console.warn(err) });
Insert cell
import {select, checkbox, radio} from "@jashkenas/inputs"
Insert cell
import {emojiiProgressBar} from "@iosonosempreio/emojii-progress-bar"
Insert cell
rawdata.map(d=>cors_proxy?cors_proxy+d[imagesKey]:d[imagesKey])
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