Insert cell
Insert cell
data = FileAttachment("investors@3.json").json()
Insert cell
data_investments = data.flatMap((d) => {
return d.investments.map((investment) => ({
...investment,
investorName: d.name,
investorType: d.type,
investorHqCountry: d.hqCountry,
numInvestments: d.numInvestments,
totalInvested: d.totalInvested,
investorId: d._id,
solutionSegments: d.solutionSegments,
marketSegments: d.marketSegments
}));
})
Insert cell
data_investments2 = aq
.from(data_investments)
.select(
"investorId",
"investorName",
"investorType",
"investorHqCountry",
"entityName",
"entity",
"roundSizeUsd",
"round"
)
.orderby(aq.desc("roundSizeUsd"))
.filter((d) => d.roundSizeUsd < 1400000000)
.objects()
Insert cell
investment_entities = aq
.from(data_investments2)
.groupby("entityName")
.rollup({
sum: (d) => op.sum(d.roundSizeUsd),
count: op.count()
})
.orderby(aq.desc("sum"))
.objects()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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