How nitish-singh123/electricity-consumption-analyzer works
The product is a local TCP electricity-consumption analyzer. Its main workflow loads CSV records in the client, sends JSON to the server, validates and enriches readings, then computes per-customer FSM paths, bills, trends, rankings, and budget advice for a printed report. SymPy calculations and functional transformations are internal server layers. README capabilities supplement the sampled source; edges below are limited to relationships shown in excerpts or documented there.
Main entry points: server.py Analysis pipeline · client.py TCP sender · dataset.csv CSV datasets
Components 19
Client workflow
- CSV loader
client.py - TCP sender
client.py - Report printer
client.py
Server analysis
- Record validation
server.py - Record enrichment
server.py - Analysis pipeline
server.py - Customer summaries
server.py - Consumption FSM
server.py - Customer ranking
server.py - TOU billing
server.py
Symbolic calculations
- Slab tariff
server.py - Trend prediction
server.py - Budget break-even
server.py
TCP service
- TCP listener
server.py - Request handler
server.py - TCP client socket
client.py
Other components
- Analyst
- CSV datasets
dataset.csv - SymPy
Connections 22
- Analyst → CSV loader: selects dataset
client.py - CSV datasets → CSV loader: reads records
client.py - CSV loader → TCP sender: passes records
client.py - TCP sender → TCP client socket: sends JSON
client.py - TCP client socket → TCP listener: connects to
README.md - TCP listener → Request handler: dispatches connection
server.py - Request handler → Analysis pipeline: analyzes records
server.py - Analysis pipeline → Record validation: filters records
server.py - Analysis pipeline → Record enrichment: enriches valid records
server.py - Record enrichment → TOU billing: calculates TOU bill
server.py - Analysis pipeline → Customer summaries: builds summaries
server.py - Customer summaries → Consumption FSM: walks daily usage
README.md - Customer summaries → Trend prediction: fits and predicts
README.md - Customer summaries → Slab tariff: computes slab bill
README.md - Analysis pipeline → Customer ranking: ranks customers
README.md - Analysis pipeline → Budget break-even: solves budget limit
README.md - Slab tariff → SymPy: uses symbolic math
README.md - Trend prediction → SymPy: solves fit equations
README.md - Budget break-even → SymPy: solves tariff branches
README.md - Request handler → TCP client socket: returns JSON
README.md - TCP sender → Report printer: prints analysis
client.py - Report printer → Analyst: presents report
client.py