Public
Edited
Nov 24, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Wrangler(data)
Insert cell
data_final = aq
.from(data)
.derive({ UP_LLA: (d) => d["UNION POR LA PATRIA"] + d["LA LIBERTAD AVANZA"] })
.derive({ UP_p: (d) => 100.0 * (d["UNION POR LA PATRIA"] / d["UP_LLA"]) })
.derive({ LLA_p: (d) => 100 * (d["LA LIBERTAD AVANZA"] / d["UP_LLA"]) })
.objects()
Insert cell
Plot.plot({
marginLeft: 89,
marks: [
Plot.dot(data, {
x: "UNION POR LA PATRIA",
y: "LA LIBERTAD AVANZA",
tip: true,
title: (d) => d.provincia + ", " + d.departamento,
fill: "provincia"
})
]
})
Insert cell
Plot.plot({
marginLeft: 200,
marks: [
Plot.tickX(data_final, {
x: "LLA_p",
y: "provincia",
tip: true,
title: (d) =>
d.provincia + ", " + d.departamento + ": " + d.LLA_p.toFixed(1) + "%"
})
]
})
Insert cell
Plot.plot({
marginLeft: 200,
marks: [
Plot.tickX(data_final, {
x: "UP_p",
y: "provincia",
tip: true,
title: (d) =>
d.provincia + ", " + d.departamento + ": " + d.UP_p.toFixed(1) + "%"
})
]
})
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