How sandeepklr12345-gif/ai_scada works
This repository combines two analytics products—600 MW power-output forecasting and HAI 23.05 ICS anomaly detection—with Python integration code and a React thermal-plant dashboard. The documented data-to-result workflow runs from cleaned data through feature preparation and inference; available API routes expose forecast, anomaly, and decision results. The dashboard polls API health/model metadata and presents a plant visualization and panels. The README describes several workflows at a high level; unsampled implementations and unshown runtime connections are represented only where documented, or omitted.
Main entry points: main.py HTTP API · dataset_creation Feature preparation · cleaning Data cleaning · forecasting_600mw.py 600 MW forecasting
Components 18
Analytics pipelines
- Data cleaning
scripts/cleaning - Feature preparation
scripts/dataset_creation - 600 MW forecasting
scripts/inference/forecasting_600mw.py - HAI temporal features
scripts/inspection/hai_23_05/22_temporal_representation - Candidate C detection
scripts/inspection/hai_23_05/25_inference/candidate_C_inference_engine.py - HAI attack classification
scripts/inference/hai_attack_classifier_runtime.py
Inference and integration
- HTTP API
scripts/api/main.py - SCADA AI integration
scripts/integration/ai_model_integration.py - AI runtime
scripts/integration/ai_runtime.py - Decision support
scripts/decision_support/decision_engine.py
Operator interface
- Dashboard API client
frontend/src/components/dashboard/api.ts - Dashboard panels
frontend/src/components/dashboard/Panels.tsx - Thermal plant view
frontend/src/components/plant/ThermalPowerPlant.tsx - Plant visualization components
frontend/src/components/plant
Data access
- PostgreSQL storage
scripts/database/postgres_storage.py
Other components
- Historical plant and HAI data
- PostgreSQL
- Dashboard user
Connections 17
- Historical plant and HAI data → Data cleaning: provides data
README.md - Data cleaning → Feature preparation: prepares datasets
README.md - Feature preparation → 600 MW forecasting: supplies features
README.md - Feature preparation → HAI temporal features: supplies features
README.md - HAI temporal features → Candidate C detection: builds detector features
README.md - 600 MW forecasting → HTTP API: serves forecasts
scripts/api/main.py - Candidate C detection → HTTP API: serves anomaly results
scripts/api/main.py - HAI attack classification → HTTP API: serves classification
scripts/api/main.py - HTTP API → Decision support: evaluates decisions
scripts/api/main.py - SCADA AI integration → AI runtime: used by runtime
scripts/integration/ai_runtime.py - AI runtime → SCADA AI integration: runtime delegates
scripts/integration/ai_runtime.py - Dashboard user → Dashboard panels: views
- Dashboard user → Thermal plant view: explores plant
- Dashboard panels → Dashboard API client: displays snapshot
frontend/src/components/dashboard/Panels.tsx - Dashboard API client → HTTP API: requests health and models
frontend/src/components/dashboard/api.ts - Thermal plant view → Plant visualization components: renders equipment
frontend/src/components/plant/ThermalPowerPlant.tsx - PostgreSQL storage → PostgreSQL: reads and writes
scripts/database/postgres_storage.py