Public
Edited
Apr 7
1 fork
Insert cell
Insert cell
title = new URLSearchParams(document.location.search).get("title") ??
"Die stärksten Fraktionen in den EU-Ländern"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
parliament_options = election_select != "2024-2029"
? new Map([
["konstituierende Sitzung", "constitutive"],
["scheidendes Parlament", "outgoing"]
])
: new Map([["konstituierende Sitzung", "constitutive"]])
Insert cell
format_seat
SELECT *,
(CASE WHEN country_id = 'de' and election IN ('1979-1984', '1984-1989', '1989-1994') THEN 'ddr' ELSE country_id END) AS id
FROM format_seat
WHERE election = ${election_select}
AND parliament = ${parliament}
Insert cell
seats_position = seats_election
.map((d) => ({
...d,
group_id: d.group_policy.concat("#" + d.id)
}))
.filter((d) => d.rank_group == rank_select)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
seats_election
SELECT group_policy, color_group FROM seats_election
GROUP BY 1, 2
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
stand = stand_eu.date != ""
? `Stand: ${new Date(stand_eu.date).getDate()}.${
new Date(stand_eu.date).getMonth() + 1
}.${new Date(stand_eu.date).getFullYear()} um ${stand_eu.time} Uhr`
: `${stand_eu.status} ${stand_eu.election}`
Insert cell
stand_eu = max_date.filter(
(d) => d.time == d3.max(max_date.map((d) => +d.time))
)[0]
Insert cell
max_date = seats_election
.map((d) => ({
date: d.date,
time: d.time,
status: d.status,
election: d.election
}))
.filter((d) => d.date == d3.max(seats_election.map((d) => d.date)))
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