Published
Edited
Feb 15, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function tableData () {
const ipfsFlows = ipfsData[ipfsData.length - 1]?.transitions
const prevIpfsFlows = ipfsData[ipfsData.length - 2]?.transitions
const filFlows = filecoinData[filecoinData.length - 1]?.transitions
const prevFilFlows = filecoinData[filecoinData.length - 2]?.transitions
const res = Object.keys(ipfsFlows).map((flow, i) => {
let id = i + 1 // todo: dont rely on object key order
if (id >= 11) {
// we do not and cannot track "all who have never used PL-ware"
id++
}
const fil = filFlows[flow]
const ipfs = ipfsFlows[flow]
const total = fil + ipfs
const prevTotal = prevFilFlows[flow] + prevIpfsFlows[flow]
const growthRate = Math.round(((total - prevTotal) / prevTotal) * 100)
return {id, flow, fil, ipfs, total, prevTotal, growthRate }
})
return res
}
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