# HSEQ Intelligence Dashboard — Scraper Bronnenlijst & Architectuur v2.0 **Auteur**: Kas (Director of Operations) **Datum**: 2 april 2026 **Status**: Plan van Aanpak — Fase 1 **Versie**: v2.0 (uitgebreid met Jorick's bronnenlijst + Gemini technische tips) --- ## 1. Doellijst Scraper — URLs & Bronnen ### 1.1 Wetgeving & Overheid (API's & Data) | ID | Bron | URL | Type | Frequentie | Prioriteit | |----|------|-----|------|------------|------------| | B01 | KOOP API — Wetten & Bekendmakingen | overheid.nl/open-data | **API (SRU/XML/JSON)** | Dagelijks | Kritiek | | B02 | Rijksoverheid Documenten | rijksoverheid.nl/documenten | RSS + URL filters | Dagelijks | Hoog | | B03 | Arboportaal | arboportaal.nl | Web/API | Dagelijks | Hoog | | B04 | Wetten.nl | wetten.overheid.nl | API | Dagelijks | Kritiek | ### 1.2 Seveso, Milieu & Toezicht | ID | Bron | URL | Type | Frequentie | Prioriteit | |----|------|-----|------|------------|------------| | B05 | IPLO (Omgevingswet & Seveso) | iplo.nl | Web/API | Dagelijks | Kritiek | | B06 | Arbeidsinspectie (NLA) | nlarbeidsinspectie.nl/documenten | Web | Dagelijks | Kritiek | | B07 | Inspectie Leefomgeving (ILT) | ilent.nl/documenten | Web/API | Dagelijks | Hoog | | B08 | SodM | sodm.nl/documenten | Web | Dagelijks | Kritiek | | B09 | Inspectie SZW | inspectieszv.nl | Web | Dagelijks | Kritiek | | B10 | RIVM — BRZO | rivm.nl/brzo | Web | Wekelijks | Kritiek | ### 1.3 Gevaarlijke Stoffen & Richtlijnen | ID | Bron | URL | Type | Frequentie | Prioriteit | |----|------|-----|------|------------|------------| | B11 | PGS Richtlijnen | publicatiereeksgevaarlijkestoffen.nl | **PDF downloads** | Wekelijks | Kritiek | | B12 | RIVM — ZZS-lijst | rvs.rivm.nl/zeer-zorgwekkende-stoffen | CSV/Excel | Wekelijks | Hoog | | B13 | ECHA (REACH/CLP) | echa.europa.eu/nl/information-on-chemicals | **CSV/Excel downloads** | Wekelijks | Hoog | ### 1.4 Kennisinstanties & Branche | ID | Bron | URL | Type | Frequentie | Prioriteit | |----|------|-----|------|------------|------------| | B14 | TNO Veiligheid | tno.nl | Web | Wekelijks | Medium | | B15 | EU-OSHA | osha.europa.eu/nl | Web | Wekelijks | Medium | | B16 | NEN Normeringen | nen.nl | Web | Maandelijks | Hoog | | B17 | NOGEPA / Element NL | nogepa.org | Web | Wekelijks | Hoog | | B18 | Dutch Gas Association | dutchgassociation.com | Web | Maandelijks | Medium | | B19 | EPSC | epsc.be | Web | Maandelijks | Medium | | B20 | CCPS | aiche.org/ccps | Web | Maandelijks | Laag | | B21 | NVVK | nvvk.nl | Web | Maandelijks | Laag | | B22 | SER | ser.nl | Web | Maandelijks | Laag | | B23 | Omgevingswet | rijksoverheid.nl/onderwerpen/omgevingswet | Web | Wekelijks | Hoog | ### 1.5 Externe Bronnen | ID | Bron | URL | Type | Frequentie | Prioriteit | |----|------|-----|------|------------|------------| | B24 | ArboUnie Kennisbank | arbounie.nl/kennisbank | Web | Wekelijks | Hoog | | B25 | PAO | paotm.nl | Web | Maandelijks | Laag | --- ## 2. Technische Architectuur — Tips van Gemini ### 2.1 API's boven HTML-parsing **Regel**: Altijd eerst zoeken naar API, RSS-feed of gestructureerde data (XML/JSON/CSV). | Bron | API/RSS Beschikbaar? | Opmerking | |------|---------------------|-----------| | KOOP (Overheid.nl) | JA — SRU zoekdienst (XML/JSON) | Niet HTML scrapen | | Rijksoverheid Documenten | JA — RSS feeds | Filter via URL parameters | | ECHA | JA — CSV/Excel downloads | Specifieke downloadsecties | | RIVM ZZS-lijst | JA — CSV/Excel | Downloadbare datasets | | PGS | JA — PDF downloads | Structured download links | | SodM | Nee — Web scraping | Nieuwe URL: sodm.nl/documenten | | ILT | Gedeeltelijk | Combinatie API + scraping | | IPLO | Gedeeltelijk | Omgevingswet API beschikbaar | ### 2.2 PDF's naar Markdown Conversie HSEQ-data bestaat voor ~80% uit PDF's (PGS, inspectiekaders, wetgeving). **Pipeline**: PDF download -> PyMuPDF/pdfplumber -> Tekst extractie -> Markdown -> Opslag **Tools**: PyMuPDF (fitz), pdfplumber, Docling (OCR), Marker (PDF->Markdown) **Waarom Markdown**: LLM's begrijpen Markdown perfect (koppen, tabellen, opsommingen). Structuur blijft behouden. ### 2.3 Semantic Chunking **Niet**: Knippen op 1000 tekens (verliest juridische context) **Wel**: Splitsen op hoofdstuk, artikel, lid, paragraaf | Documenttype | Chunk strategie | |-------------|----------------| | Wetgeving | Per artikel (Art. 3.1, Art. 3.2) | | PGS Richtlijn | Per hoofdstuk + subsectie | | Inspectiekader | Per thema + criteria | | Beleidsdocument | Per paragraaf | | Onderzoeksrapport | Per sectie + samenvatting | ### 2.4 Metadata Schema Per document: - id, title, source, source_type (api/rss/web_scrape/pdf_download) - url, publication_date, status (Geldend/Vervallen/Concept) - category, subcategories, tags - file_hash (MD5), file_path, markdown_path, chunks_count - scraped_at, last_modified, relevance_score ### 2.5 Politeness & Rate Limiting - Min 2-5 seconden tussen requests (random) - User-Agent rotatie (5+ varianten) - Respecteer robots.txt - Max 15 requests/minuut per domein - Bij 403/429: backoff (2x multiplier, max 60s) - Geen parallelle requests naar zelfde domein ### 2.6 Delta-Updates - Check Last-Modified header (HTTP) - Check ETag - Check Content-Length - Fallback: MD5 hash vergelijking - Alleen nieuwe/gewijzigde documenten verwerken --- ## 3. Technische Stack | Component | Keuze | Reden | |-----------|-------|-------| | Frontend | HTML/CSS/JS (vanilla) | Licht, snel, geen build step | | Backend | Python Flask | Beste PDF support | | Database | SQLite + FTS5 | Full-text search, lokaal | | AI Analyse | OpenRouter API (GLM-5) | Bestaande setup | | Scraping | requests + BeautifulSoup (API-first) | Licht | | PDF Scraping | Playwright (indien nodig) | Alleen als geen API | | Scheduling | APScheduler (in-app) | Geen cron dependency | | Hosting | Nginx + PM2 | Bestaande infra | --- ## 4. Fases ### Fase 1: Kennisbank Indexer (1-2 dagen) - Indexeer 91 PDF's uit /root/Documents/HSEQ_kennis/ - PDF -> Markdown conversie - Full-text search (SQLite FTS5) - Web UI: zoeken, browsen, samenvattingen ### Fase 2: Scraper Core (2-3 dagen) - API-connecties (KOOP, Rijksoverheid RSS, ECHA) - Web scraping (SodM, ILT, IPLO, NLA) - Delta-update mechanisme - Rate limiting + politeness - PDF download -> Markdown pipeline ### Fase 3: AI Analyse & Dashboard (2-3 dagen) - Automatische relevantie-scoring - Ideeën & kansen generator - Dagelijks bulletin - Dashboard met actiepunten - Export (PDF, deelbare link) ### Fase 4: Integratie & Optimalisatie (1-2 dagen) - RAG integration voor Kas - Semantic chunking optimalisatie - Monitoring & alerting --- ## 5. Huidige HSEQ Kennisbank /root/Documents/HSEQ_kennis/ (314MB, 102 bestanden) - 84 PDF's in root (AI-xx series, wetgeving, procedures) - 2 RTF bestanden (VG-plannen) - Interne_Procedures/hitte/ (13 bestanden) - Interne_Procedures/ (5 bestanden: asbest, stof, format training) - Scraped_Data/ (2 PDF's) - documents/, procedures/, regulations/, templates/ — LEEG Actie nodig: 84 PDF's in root sorteren naar juiste submappen. --- *v2.0 — 2 april 2026 — Kas* *Bronnen: Jorick (doellijst) + Gemini (technische tips)*