Public
Edited
Jan 15, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Feb = fetch(`https://api.oireachtas.ie/v1/questions?date_start=${year.year}-02-01&date_end=${year.year}-02-28&limit=9999&qtype=oral,written`).then((response) => response.json())
Insert cell
Insert cell
leapData = leap.results.filter(d => d.contextDate == `${leapYearDateCheck}`)
Insert cell
leapYearDateCheck = year.value + "-02-29"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//Without headings filter
filteredPQs = rolledWithConstituencyMemberCode.filter(d => d.name != null)
Insert cell
Insert cell
Insert cell
import {Treemap} from "@d3/treemap"
Insert cell
import {treemapPQs}
with {data3 as data}
from "05e1988c11cde88e"
Insert cell
constituencyFile = FileAttachment("Constituency_Boundaries_-_Generalised_20m_-_National_Electoral_Boundaries_-_2017_no_seat_numbers.geojson").json()
Insert cell
constituencyMap = new Map(constituencyFile.features.map(d => [(d.properties.CON_SEAT_), d]))
Insert cell
circle = d3.geoCircle().center([-8, 53.4]).radius(1.9)()
Insert cell
Insert cell
Insert cell
Insert cell
choroplethdata = FileAttachment("choroplethData.json").json()
Insert cell
sankeyData = Array.from(d3.flatRollup(filteredPQs, v => v.length, d => d.constituency, d => d.party),
([source, target, value]) => ({source, target, value}))
Insert cell
sankeyData1 = Array.from(d3.flatRollup(filteredPQs, v => v.length, d => d.party, d => d.questionType),
([source, target, value]) => ({source, target, value}))
Insert cell
sankeyData2 = Array.from(d3.flatRollup(filteredPQs, v => v.length, d => d.questionType, d => d.department),
([source, target, value]) => ({source, target, value}))
Insert cell
combinedSankeyData = [...sankeyData, ...sankeyData1, ...sankeyData2]
Insert cell
import {chart as sankey}
with { combinedSankeyData as combinedSankey}
from "9f320b74ac22ef74"
Insert cell
import {joinedPQs as year2024} from "4efe2674f4022ce8"
Insert cell
year2024
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