Published unlisted
Edited
Apr 10, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
legendRadii = [10, 500, 2000, 10000]
Insert cell
map.update(index)
Insert cell
w = Math.min(width, 700)
Insert cell
h = Math.round(w * 1.2)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
colorScale = d3
.scaleSqrt()
.domain([0, maxCases])
.range([`hsla(57, 100%, 50%, 0.36)`, `hsla(7, 100%, 50%, 0.57)`])
Insert cell
delay = 250
Insert cell
maxCases = d3.max(raw_data.map(d => +d.confirmed))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
provinces = topojson.feature(brasil, brasil.objects.estados)
Insert cell
Insert cell
Insert cell
path = d3.geoPath().projection(projection)
Insert cell
projection = d3.geoMercator()
.fitSize([width, 600], provinces)
.translate([w+250, h/4])
Insert cell
brasil = d3.json("https://gist.githubusercontent.com/ruliana/1ccaaab05ea113b0dff3b22be3b4d637/raw/196c0332d38cb935cfca227d28f7cecfa70b412e/br-states.json")
Insert cell
Insert cell
Insert cell
Insert cell
d3array = require("d3-array@^2.4")
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