leakageDataGenAndAnalysis is a Python-based system for simulating a water distribution network and analyzing it for potential leakages. This project includes scripts for generating synthetic data representing water flow through a network of junctions and endpoints and for detecting and calculating water usage and leakages within this network.
- Python 3.x
- Pandas library
- Clone the repository to your local machine:
git clone https://github.com/BlockOasis/leakageDataGenAndAnalysis.git-
Navigate to the cloned repository.
-
(Optional) Set up a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`- Install the required packages:
pip install pandasdata_maker.py- Simulates basic water usage data in a distribution network.data_maker_leak.py- Generates more complex network data with potential leakages.
Run these scripts to generate datasets. These datasets will be stored in the outputs directory.
leakage_detection.py- Analyzes the generated data to detect leakages in the network.usage_calculation.py- Calculates the water usage at various endpoints over a specified time range.
Run these scripts to analyze the generated datasets for leakages and usage calculations.
To run a script, navigate to its directory and execute it with Python. For example:
python data_generation/data_maker.pydata_generation/data_maker_no_leak.py: Generates simulated water flow data for different types of locations in a water distribution network without consideration of leakage.data_generation/data_maker_leak.py: Simulates a complex water distribution network including a master junction and local junctions/endpoints with potential leakages.data_analysis/leakage_detection.py: Analyzes the generated dataset to identify and report potential leakages.data_analysis/usage_calculation.py: Calculates and reports the water usage at different endpoints within a specified time range.
The generated datasets and analysis reports are saved in the outputs directory.