Public
Edited
Feb 7
2 forks
Importers
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
xaxis = d3.axisBottom(x).tickFormat(d => '$'+d.toLocaleString())
Insert cell
yaxis = d3.axisLeft(y)
Insert cell
line = d3.line().x(d => x(d.health)).y(d => y(d.life))
Insert cell
Insert cell
height = 500-margin.top-margin.bottom
Insert cell
width = window.innerWidth*.9-margin.left-margin.right
Insert cell
x = d3.scaleLinear().domain(d3.extent(dataRaw, d => parseFloat(d[health]))).range([0, width])
Insert cell
y = d3.scaleLinear().domain([60,d3.max(dataRaw, d => parseFloat(d[life]))]).range([height, 0])
Insert cell
Insert cell
Insert cell
exclude = [
'North America'
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require('d3@v5')
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