Public
Edited
Mar 23, 2024
1 star
Insert cell
Insert cell
map
Insert cell
Insert cell
{
const circles = d3.select(map).selectAll("circle")
.attr("stroke", "red") // SVG "stroke" attribute (other colors work too, e.g., "#ff000")
.attr("stroke-width", 0.5) // SVG "stroke-width"
.attr("fill-opacity", 0.2) // SVG "fill-opacity"
.attr("r", d => d.datum.properties.mag) // Data-dependent styling of the circle radius
return md`There are ${circles.nodes().length} earthquakes displayed on the map.`
}
Insert cell
Insert cell
import {map} from "@pbogden/earthquakes"
Insert cell
Insert cell
d3 = require("d3-selection")
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