Public
Edited
Feb 12, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
homecidesByYear = FileAttachment("homicide-clearance-rate.csv").csv()
Insert cell
homicide-clearance-rate.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
import {BarChart} from "@d3/bar-chart"
Insert cell
Insert cell
chart = BarChart(homecidesByYear, {
x: d => d.Year,
y: d => d["Same Year Clear"] / d.Homicides,
xDomain: d3.groupSort(homecidesByYear, ([d]) => -d["Same Year Clear"] / d.Homicides, d => d.Year), // sort by descending rate
yFormat: "%",
yLabel: "Homicide Clearance Rtae",
width,
height: 500,
color: "steelblue"
})
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