How annamashish/esg-incident-intelligence works
The product is an offline ESG and safety incident intelligence dashboard. Users inspect portfolio summaries, incident registers, recurring patterns and evaluation metrics, or submit a narrative for classification, risk tagging, retrieval evidence, summarization and preventive recommendations. The API owns requests and delegates to a shared incident engine; the frontend is served by that API application. Pipeline internals are grouped by responsibility. The README documents capabilities beyond the sampled excerpts; data-loading links are left unverified where the excerpts do not show the read.
Main entry points: pipeline.py Incident engine · app.py HTTP API · index.html Web dashboard · incidents_extended.csv Extended incidents
Components 17
Dashboard and API
- Web dashboard
frontend/index.html - HTTP API
backend/app.py
Incident analysis
- Incident engine
backend/pipeline.py - Text cleaning
backend/pipeline.py - Type and severity
backend/pipeline.py - Severity floor
backend/pipeline.py - Risk tagging
backend/pipeline.py - Similar incidents
backend/pipeline.py - Preventive actions
backend/pipeline.py
Portfolio insights
- Narrative summaries
backend/pipeline.py - Portfolio summary
backend/pipeline.py - Pattern trends
backend/pipeline.py - Incident register
backend/pipeline.py - Model evaluation
backend/pipeline.py
Incident data
- Bundled incidents
- Extended incidents
data/incidents_extended.csv
Other components
- Dashboard user
Connections 21
- Dashboard user → Web dashboard: uses
README.md - Dashboard user → HTTP API: requests
README.md - HTTP API → Web dashboard: serves
backend/app.py - HTTP API → Incident engine: delegates
backend/app.py - Incident engine → Text cleaning: cleans text
backend/pipeline.py - Incident engine → Type and severity: predicts labels
README.md - Incident engine → Severity floor: guards severity
backend/pipeline.py - Incident engine → Risk tagging: tags risks
backend/pipeline.py - Incident engine → Similar incidents: retrieves evidence
README.md - Incident engine → Preventive actions: recommends actions
README.md - Incident engine → Narrative summaries: summarizes
README.md - HTTP API → Portfolio summary: returns summary
backend/app.py - HTTP API → Pattern trends: returns patterns
backend/app.py - HTTP API → Incident register: returns incidents
backend/app.py - HTTP API → Model evaluation: returns metrics
backend/app.py - Incident engine → Portfolio summary: aggregates
backend/pipeline.py - Incident engine → Pattern trends: detects trends
backend/pipeline.py - Incident engine → Incident register: formats register
backend/pipeline.py - Incident engine → Model evaluation: evaluates models
backend/pipeline.py - Bundled incidents → Incident engine: loaded as input
- Extended incidents → Incident engine: loaded as input