Public
Edited
Oct 29, 2024
Fork of grafo
Insert cell
Insert cell
Insert cell
data = await d3.tsv("https://aaizemberg.github.io/datos/itba/votos_2c2024.tsv")
Insert cell
Insert cell
nodos_from_votos = [
...d3.union(
data.map((d) => d.source),
data.map((d) => d["1"]),
data.map((d) => d["2"]),
data.map((d) => d["3"])
)
].map((d) => ({ id: +d, label: d }))
Insert cell
Insert cell
links
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
{
const nodes = new vis.DataSet(nodos);
const edges = new vis.DataSet(links);
const container = document.getElementById("mynetwork");
const data = {
nodes: nodes,
edges: edges
};
const options = {};
const network = new vis.Network(container, data, options);
}
Insert cell
Insert cell
Insert cell
Plot.plot({
marginLeft: 60,
marks: [
Plot.barX(
links,
Plot.groupY(
{ x: "sum" },
{ x: "width", y: "to", sort: { y: "x", reverse: true } }
)
),
Plot.ruleX([0])
]
})
Insert cell
data
-- autovoto
select source, "1" as uno, "2" as dos, "3" as tres from data
where
source = uno or
source = dos or
source = tres
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