Public
Edited
Jan 19, 2024
Insert cell
Insert cell
import { aq, op } from '@uwdata/arquero'
Insert cell
embed = require("vega-embed@5")
Insert cell
vegalite = require("@observablehq/vega-lite@0.1")
Insert cell
Insert cell
viewof accidents_de_voiture_chicago = aq // viewof shows the table view, but assigns the table value
.fromCSV(await FileAttachment('car_crashes_chicago@7.csv').text())
.view({ height: 240 })
Insert cell
Insert cell
Insert cell
embed({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
width: 500,
height: 500,
data: {url: "https://mjlobo.github.io/teaching/mde/data/chicagosideswithid.json",
format: {type: "topojson", feature: "chicago_sides"} // on doit indiquer quels objets on va dessiner
},
projection: {type :"mercator" },
mark: {
type: "geoshape"
}
})
Insert cell
Insert cell
Insert cell
viewof car_crashes = aq
.fromCSV(await FileAttachment('join_layer.csv').text())
.view({ height: 240 })
Insert cell
Insert cell
viewof centroids = aq
.fromCSV(await FileAttachment('centroids.csv').text())
.view({ height: 240 })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dashb_data_bycond = car_crashes.groupby('conditions_atmospheriques', 'conditions_luminosite', 'vitesse', 'id').count().reify()
Insert cell
dashb_data_bycond.view()
Insert cell
Insert cell
Insert cell
max_speed = dashb_data_bycond.rollup({ max_speed: d => op.max(d.vitesse) }).objects()[0].max_speed
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
zoom = FileAttachment("zoom.png").image()
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