# tobiasraucher/milieubeleid-checker architecture

> Architecture diagram of the GitHub repository tobiasraucher/milieubeleid-checker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tobiasraucher/milieubeleid-checker
- Repository: https://github.com/tobiasraucher/milieubeleid-checker

## Overview

MilieuRadar is a public-facing dashboard for tracking Dutch environmental and climate policy in Parliament. Its user workflow is to browse themed bills, motions, amendments, votes, debate summaries and upcoming milestones; the static site presents curated JSON alongside automatically collected Tweede Kamer data. The data workflow fetches and classifies parliamentary records, enriches them with document text and Eerste Kamer publications, then exposes them to the site and an iCalendar feed. README documentation also describes human-assisted summaries and milestone updates. Some UI and pipeline modules are unsampled, so edges show only relationships established by excerpts or README statements.

Main entry points: [`pipeline/fetch_tk.py`](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/fetch_tk.py) (Parliament fetcher), [`index.html`](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/index.html) (Static policy site), [`assets/app.js`](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/app.js) (Browser application), [`data/tk`](https://github.com/tobiasraucher/milieubeleid-checker/tree/main/data/tk) (Parliament records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_fetch["Parliament fetcher<br/>[fetch_tk.py]"]
  node_source["Source access<br/>[bron.py]"]
  node_sector["Sector selection<br/>[selectie.py]"]
  node_case["Case numbering<br/>[kamerstuk.py]"]
  node_first["Senate records<br/>[eerstekamer.py]"]
  node_text["Motion text<br/>[teksten.py]"]
end

subgraph group_curation["Curation and outputs"]
  node_records[("Parliament records")]
  node_summaries["Debate summaries<br/>[debatten.json]"]
  node_milestones["Milestones<br/>[agenda.json]"]
  node_themes["Theme mapping"]
  node_theme_review["Theme review<br/>[themas_review.js]"]
  node_calendar["Calendar export<br/>[maak_ics.js]"]
  node_feed["iCalendar feed<br/>[agenda.ics]"]
end

subgraph group_web["Website experience"]
  node_site["Static policy site<br/>[index.html]"]
  node_app["Browser application<br/>[app.js]"]
  node_themes_ui["Theme browsing<br/>[themas.js]"]
  node_search["Search<br/>[zoek.js]"]
  node_agenda_ui["Agenda view<br/>[agenda.js]"]
  node_votes["Voting view<br/>[regels.js]"]
  node_documents["Document view<br/>[document.js]"]
end

subgraph group_operations["Data monitoring"]
  node_monitor["Data checks<br/>[controle.py]"]
end

node_reader(("Policy reader"))
node_tk[("Tweede Kamer data")]
node_ob[("Official publications")]
node_cbs[("CBS emissions data")]

node_tk -->|"provides records"| node_fetch
node_ob -->|"provides publications"| node_fetch
node_fetch -->|"fetches through"| node_source
node_fetch -->|"classifies with"| node_sector
node_fetch -->|"uses numbering"| node_case
node_fetch -->|"collects Senate data"| node_first
node_fetch -->|"updates text"| node_text
node_fetch -->|"writes records"| node_records
node_reader -->|"browses"| node_site
node_site -->|"loads scripts"| node_app
node_app -.->|"uses themes"| node_themes_ui
node_app -.->|"offers search"| node_search
node_app -.->|"shows agenda"| node_agenda_ui
node_app -.->|"shows votes"| node_votes
node_app -.->|"shows documents"| node_documents
node_records -->|"supplies data"| node_site
node_summaries -->|"supplies summaries"| node_site
node_milestones -->|"supplies milestones"| node_site
node_themes -->|"supplies themes"| node_site
node_records -->|"provides activities"| node_calendar
node_summaries -->|"provides summaries"| node_calendar
node_milestones -->|"provides milestones"| node_calendar
node_calendar -->|"writes feed"| node_feed
node_records -->|"supplies items"| node_theme_review
node_theme_review -->|"imports reviewed mapping"| node_themes
node_records -->|"checks freshness"| node_monitor
node_summaries -->|"checks coverage"| node_monitor
node_milestones -->|"checks dates"| node_monitor
node_cbs -->|"supplies emissions"| node_site

click node_fetch "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/fetch_tk.py"
click node_source "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/bron.py"
click node_sector "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/selectie.py"
click node_case "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/kamerstuk.py"
click node_first "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/eerstekamer.py"
click node_text "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/teksten.py"
click node_records "https://github.com/tobiasraucher/milieubeleid-checker/tree/main/data/tk"
click node_summaries "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/debatten.json"
click node_milestones "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/agenda.json"
click node_themes "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/themas-mapping.json"
click node_theme_review "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/themas_review.js"
click node_calendar "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/maak_ics.js"
click node_feed "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/agenda.ics"
click node_site "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/index.html"
click node_app "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/app.js"
click node_themes_ui "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/themas.js"
click node_search "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/zoek.js"
click node_agenda_ui "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/agenda.js"
click node_votes "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/regels.js"
click node_documents "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/document.js"
click node_monitor "https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/controle.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fetch,node_source,node_sector,node_case,node_first,node_text toneBlue
class node_records,node_summaries,node_milestones,node_themes,node_theme_review,node_calendar,node_feed,node_tk,node_ob,node_cbs toneAmber
class node_site,node_app,node_themes_ui,node_search,node_agenda_ui,node_votes,node_documents toneMint
class node_monitor toneRose
class node_reader toneIndigo
```

## Components

### Data collection

- [Parliament fetcher](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/fetch_tk.py): `pipeline/fetch_tk.py`
- [Source access](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/bron.py): `pipeline/bron.py`
- [Sector selection](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/selectie.py): `pipeline/selectie.py`
- [Case numbering](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/kamerstuk.py): `pipeline/kamerstuk.py`
- [Senate records](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/eerstekamer.py): `pipeline/eerstekamer.py`
- [Motion text](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/teksten.py): `pipeline/teksten.py`

### Curation and outputs

- [Parliament records](https://github.com/tobiasraucher/milieubeleid-checker/tree/main/data/tk): `data/tk`
- [Debate summaries](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/debatten.json): `data/debatten.json`
- [Milestones](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/agenda.json): `data/agenda.json`
- [Theme mapping](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/themas-mapping.json): `data/themas-mapping.json`
- [Theme review](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/themas_review.js): `pipeline/themas_review.js`
- [Calendar export](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/maak_ics.js): `pipeline/maak_ics.js`
- [iCalendar feed](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/data/agenda.ics): `data/agenda.ics`

### Website experience

- [Static policy site](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/index.html): `index.html`
- [Browser application](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/app.js): `assets/app.js`
- [Theme browsing](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/themas.js): `assets/themas.js`
- [Search](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/zoek.js): `assets/zoek.js`
- [Agenda view](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/agenda.js): `assets/agenda.js`
- [Voting view](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/regels.js): `assets/regels.js`
- [Document view](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/assets/document.js): `assets/document.js`

### Data monitoring

- [Data checks](https://github.com/tobiasraucher/milieubeleid-checker/blob/main/pipeline/controle.py): `pipeline/controle.py`

### Other components

- **Policy reader**
- **Tweede Kamer data**
- **Official publications**
- **CBS emissions data**

## Connections

- Tweede Kamer data → Parliament fetcher: provides records (evidence: `README.md`)
- Official publications → Parliament fetcher: provides publications (evidence: `README.md`)
- Parliament fetcher → Source access: fetches through (evidence: `pipeline/fetch_tk.py`)
- Parliament fetcher → Sector selection: classifies with (evidence: `pipeline/fetch_tk.py`)
- Parliament fetcher → Case numbering: uses numbering (evidence: `pipeline/fetch_tk.py`)
- Parliament fetcher → Senate records: collects Senate data (evidence: `pipeline/fetch_tk.py`)
- Parliament fetcher → Motion text: updates text (evidence: `pipeline/fetch_tk.py`)
- Parliament fetcher → Parliament records: writes records (evidence: `README.md`)
- Policy reader → Static policy site: browses (evidence: `README.md`)
- Static policy site → Browser application: loads scripts (evidence: `README.md`)
- Browser application → Theme browsing: uses themes
- Browser application → Search: offers search
- Browser application → Agenda view: shows agenda
- Browser application → Voting view: shows votes
- Browser application → Document view: shows documents
- Parliament records → Static policy site: supplies data (evidence: `README.md`)
- Debate summaries → Static policy site: supplies summaries (evidence: `README.md`)
- Milestones → Static policy site: supplies milestones (evidence: `README.md`)
- Theme mapping → Static policy site: supplies themes (evidence: `README.md`)
- Parliament records → Calendar export: provides activities (evidence: `pipeline/maak_ics.js`)
- Debate summaries → Calendar export: provides summaries (evidence: `pipeline/maak_ics.js`)
- Milestones → Calendar export: provides milestones (evidence: `pipeline/maak_ics.js`)
- Calendar export → iCalendar feed: writes feed (evidence: `pipeline/maak_ics.js`)
- Parliament records → Theme review: supplies items (evidence: `pipeline/themas_review.js`)
- Theme review → Theme mapping: imports reviewed mapping (evidence: `pipeline/themas_review.js`)
- Parliament records → Data checks: checks freshness (evidence: `pipeline/controle.py`)
- Debate summaries → Data checks: checks coverage (evidence: `pipeline/controle.py`)
- Milestones → Data checks: checks dates (evidence: `pipeline/controle.py`)
- CBS emissions data → Static policy site: supplies emissions (evidence: `README.md`)
