Public
Edited
Apr 16
Fork of apteka
Insert cell
Insert cell
war_civil = (await FileAttachment("war_civil.csv").csv())
.map((d) => {
return {
...d,
date: new Date(d.date),
value_ma3: +d.value_ma3
// name: d.name.replace(".png", "")
};
})
.filter((d) => d.value_ma3 > 0 && d.date > new Date("2021-10-01"))
Insert cell
Insert cell
Insert cell
source1 = html`
<div style="text-align: left;padding-top:10px;font-size:12px;color:grey">Джерело: Держстат. Дані сезонно скориговані, плаваюча середня за три місяці. За базу взятий грудень 2021 року=100%</div>
`
Insert cell
prom_top = (await FileAttachment("prom_top@3.csv").csv())
.map((d) => {
return {
...d,
date: new Date(d.date),
value: +d.value,
value_ma3: +d.value_ma3
// name: d.name.replace(".png", "")
};
})
.filter((d) => d.value_ma3 > 0 && d.date > new Date("2021-01-01"))
Insert cell
Insert cell
Insert cell
source2 = html`
<div style="text-align: left;padding-top:10px;font-size:12px;color:grey">Джерело: Держстат. *Дані сезонно скориговані, плаваюча середня за три місяці</div>
`
Insert cell
// keys = Array.from(
// d3.union(prom_top.sort((a, b) => b.value - a.value).map((d) => d.name))
// )
Insert cell
// new Map(keys.map((key, i) => [key, i]))
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