Public
Edited
Oct 25, 2022
Insert cell
Insert cell
data = d3.tsvParse(
`n value
1 22
2 20.33
3 21.83
4 19.5
5 25
6 22.5
7 0
8 19.5
9 17.33
10 20.5
11 13.5
12 19.5
13 20.83
14 19.83
15 19
16 20.5
17 17.67
18 21.33
19 24.67
20 23
21 21.5
22 20.17
23 14.83
24 22
25 21.33
26 16.5
27 20.33
28 0
29 25
30 0
31 22
32 19.83
33 20
34 17
35 23.33
36 19.83
37 16.83
38 19.5
39 19.83
40 20
41 21.33
42 18.5
99 26`,
d3.autoType
)
Insert cell
nota = d3.scaleLinear().domain([13, 26]).range([4, 10])
Insert cell
nota(20)
Insert cell
20 / 26
Insert cell
data.map((d) => ({ id: d.n, nota: nota(d.value).toFixed(1) }))
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