Public
Edited
Mar 8, 2024
Insert cell
ratData = FileAttachment("rat (1).csv").csv({typed: true});
Insert cell
ratData2 = FileAttachment("Rats_LocationGroup.csv").csv({typed: true});
Insert cell
Plot.plot({
marks: [
Plot.barY(ratData2, Plot.groupX({y: "count"}, {x: "Borough", fill: "Borough"}))
],
color: {legend: true}
});
Insert cell
Plot.plot({
marks: [
Plot.barY(ratData2, Plot.groupX({y: "count"}, {x: "Borough", fill:"Location Type"}))
],
y: {grid: true},
color: {scheme: "Set3",legend: true}
});
Insert cell
mutable selected_year = null
Insert cell
boroughs = ['MANHATTAN', 'BROOKLYN', 'QUEENS', 'BRONX', 'STATEN ISLAND'];
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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