Read-only mirror of https://github.com/StatistikStadtZuerich/kali-tool — Stadt Zürich. Issues & pull requests at the source.
  • R 91.3%
  • JavaScript 7.4%
  • Dockerfile 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Aline Laura Metzler (sszmea) eaebbd25a9 Merge branch 'feature-anonym' into 'main'
new package data updated snapshot tests

See merge request OE-7035/ssz-da/produkte-methoden-gefaesse/gefaesse/applikationen/kali-golem!23
2026-10-07 12:54:09 +00:00
data-raw changes for review 2026-01-22 09:52:03 +01:00
dev add styler to dev to it can be snapshotted in renv 2026-01-22 08:57:11 +01:00
inst minimal adjustments to new layout (no sidebar) 2026-04-14 17:30:41 +02:00
man make details module static 2024-09-02 16:48:52 +02:00
R new package data updated snapshot tests 2026-10-07 08:50:59 +02:00
renv r profile 2026-10-07 09:55:54 +02:00
scss add stylesheet by scss import 2024-09-04 10:01:37 +02:00
srcjs fix tooltip by adding dummy parameter 2024-09-25 11:28:26 +02:00
tests snapshot-test update kandidierendenliste 2026-10-07 11:45:46 +02:00
.gitignore use packer 2024-09-03 15:20:32 +02:00
.gitlab-ci.yml update pipeline to new template 2025-11-17 16:28:17 +00:00
.lintr add option for linting line length 2024-08-08 10:11:19 +02:00
.Rbuildignore add MIT license 2026-04-15 14:46:06 +02:00
.Rprofile r profile 2026-10-07 09:55:54 +02:00
app.R create app file for shinyapps.io 2024-08-08 11:06:42 +02:00
DESCRIPTION add persons to DESCRIPTION file 2026-04-15 14:51:56 +02:00
Dockerfile use different test reporter 2026-06-22 11:06:21 +02:00
kali-golem.Rproj set up project, renv and golem 2024-08-06 10:44:03 +02:00
LICENSE add MIT license 2026-04-15 14:46:06 +02:00
LICENSE.md add MIT license 2026-04-15 14:46:06 +02:00
NAMESPACE improve function for data-download, add tests 2024-08-20 11:20:38 +02:00
package-lock.json add stylesheet by scss import 2024-09-04 10:01:37 +02:00
package.json add stylesheet by scss import 2024-09-04 10:01:37 +02:00
README.md add comment on js dependencies in readme 2024-09-04 10:10:02 +02:00
renv.lock r profile 2026-10-07 09:55:54 +02:00
webpack.common.js use packer 2024-09-03 15:20:32 +02:00
webpack.dev.js use packer 2024-09-03 15:20:32 +02:00
webpack.prod.js use packer 2024-09-03 15:20:32 +02:00

Kandidierndenlisten Gemeinderatswahlen (KALI)

Shiny app for KALI Tool, created as a golem app

The KALI application on the Website of Statistik Stadt Zürich shows the results of all elections for the municipal council of Zurich since 2010.

The data is obtained from the Open Data portal of the city of Zurich and is available here.

Architektur

There are several modules:

  • an input module, which contains all the input widgets, and returns data filtered according to those inputs, as well as some current inputs (the latter for properly naming the downloads)
  • a results module, which takes the filtered data and shows a reactable
  • a details module, which is nested within the results module, which shows the second table and the graph
    • this takes only static inputs, as it is only called when a row is clicked
    • it is only shown based on the row-click value with a conditional panel
  • a download module
    • inputs for it come from the results module plus some (filename, excel arguments) are prepared in the main server
    • inputs are static
    • it also takes a function and an argument to it for the excel download

Different views on this architecture are shown below.

flow diagram with flow package

flow

Module view

flowchart LR;
  input-module-- filtered_data, has_changed -->results-module
  input-module-- current_inputs -->main-server
  main-server-- fn_no_ext, fct_create_excel, excel_args -->download-module
  subgraph results-module
  details-module
  end
  input-module-- df_details_prefiltered -->details-module
  input-module-- filtered_data -->download-module

everything goes through the main server, but it is mentioned separately as some of the inputs for the download module are prepared there

JS dependencies

these are handled with packer (which uses webpack)