Read-only mirror of https://github.com/swiss/govtech_hackathon_vote_participation_leaderboard — Bundeskanzlei. Issues & pull requests at the source.
  • JavaScript 76.2%
  • CSS 14.2%
  • Python 5.6%
  • HTML 4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-02 23:11:21 +02:00
assets/cantons Move files from frontend to root folder 2026-05-29 11:08:59 +02:00
js Introduce modular JavaScript architecture with constants, services, and UI components. Add slider controls, charts, and SPARQL integration. 2026-06-02 23:11:21 +02:00
pitch Remove unused SVG assets for cantons and other files. Refactored index.html and script.js 2026-06-01 22:25:15 +02:00
TTS updated index minus emoji 2026-05-29 13:52:39 +02:00
.gitignore feat(tts): add Gemini 3.1 TTS script and input text, update gitignore 2026-05-29 10:42:09 +02:00
data.json Move files from frontend to root folder 2026-05-29 11:08:59 +02:00
index.html Deprecate script.js in favor of the new modular architecture, update documentation and references, and enhance chart clipping and layout styles. 2026-06-02 23:10:15 +02:00
LICENSE Initial commit 2026-05-28 14:27:40 +02:00
README.md Deprecate script.js in favor of the new modular architecture, update documentation and references, and enhance chart clipping and layout styles. 2026-06-02 23:10:15 +02:00
script.js Deprecate script.js in favor of the new modular architecture, update documentation and references, and enhance chart clipping and layout styles. 2026-06-02 23:10:15 +02:00
style.css Deprecate script.js in favor of the new modular architecture, update documentation and references, and enhance chart clipping and layout styles. 2026-06-02 23:10:15 +02:00

govtech_hackathon_vote_participation_leaderboard

Architektur Update (Modularisierung)

Das Projekt wurde auf eine modulare Architektur umgestellt, um die Wartbarkeit und Testbarkeit zu verbessern.

  • Einstiegspunkt: js/main.js (wird in index.html als type="module" geladen).
  • Module: Alle Logiken für Charts, Daten-Services und State-Management befinden sich im Verzeichnis js/.
  • Legacy: Die Datei script.js ist deprecated (veraltet) und dient nur noch als Referenz. Sie sollte für neue Features nicht mehr verwendet werden.

Data Fetching

A script fetch_data.js is provided to fetch live voter participation data from ld.admin.ch/query and transform it into the format required by the frontend.

To run it:

node fetch_data.js

This will create data/query_results.json (raw) and data/transformed_data.json (formatted).

The frontends have also been updated to fetch this data dynamically.