Published
Edited
Jun 24, 2020
2 forks
6 stars
Insert cell
Insert cell
Insert cell
data = {
const text = await FileAttachment("mmda_topviolations2016.csv").text();
return d3.csvParse(text, ({violation, number_of_apprehensions}) => ({
violation: violation,
number_of_apprehensions: parseFloat(number_of_apprehensions.replace(/,/g, ''))
}));
}
Insert cell
Insert cell
Insert cell
viewof arbitrary_threshold = html`<input type="range" min="0" max="55000" value="50000"></input>`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
color = "#ea5f94"
Insert cell
highlight_color = "#ffd700"
Insert cell
d3 = require("d3@5")
Insert cell
margin = ({top: 30, right: 20, bottom: 30, left: 40})
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