├── Code ├── README.md └── Water analysis results.csv /Code: -------------------------------------------------------------------------------- 1 | # Import necessary libraries 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import pandas as pd 5 | 6 | # Data 7 | data = { 8 | 'Parameter': [ 9 | 'pH', 'Conductivity (uS/cm)', 'Turbidity NTU', 'Total Hardness (mg/L)', 10 | 'Total Alkalinity (mg/L)', 'Chloride (mg/L)', 'Total suspended solids (mg/L)', 11 | 'Total dissolved solids (mg/L)', 'Total solids (mg/L)', 'Nitrate (mg/L)', 12 | 'Sulphate (mg/L)', 'Calcium (mg/L)', 'Chlorine', 'Magnessium (mg/L)', 13 | 'Iron (mg/L)', 'Lead (mg/L)', 'Copper (mg/L)', 'Silica (mg/L)' 14 | ], 15 | 'BH1': [6.2, 133, 1, 13, 18.69, 104.25, 35, 94, 129, 2.32, 2.12, 6.01, 0, 3, 0.251, 0.001, 0.28, 0.18], 16 | 'BH2': [6.2, 150, 1.9, 17, 20.69, 125.25, 35, 96, 133, 2.4, 2.16, 8.01, 0, 5, 0.311, 0.001, 0.3, 0.18], 17 | 'BH3': [6.2, 133, 1, 25, 18.69, 115.25, 32, 118, 250, 3.42, 3.14, 7.01, 0, 6.02, 0.43, 0.003, 0.212, 0.18], 18 | 'BH4': [6.42, 160, 1, 50, 35, 130, 45, 130, 130, 5, 3.5, 10, 0, 5, 0.421, 0.001, 0.28, 0.18], 19 | 'BH5': [6.2, 126, 1.5, 20, 30.69, 112.25, 35, 100, 130, 3.32, 3.12, 10.01, 0, 5, 0.401, 0.002, 0.28, 2.18], 20 | 'WHO(2011)': [7.5, 1000, 5, 100, 200, 250, 30, 500, 500, 10, 250, 70, 0.2, 30, 0.3, 0.1, 1, 40] 21 | } 22 | 23 | # Convert to DataFrame 24 | df = pd.DataFrame(data) 25 | 26 | # Plot each parameter 27 | for i, parameter in enumerate(df['Parameter']): 28 | plt.figure(figsize=(10, 6)) 29 | plt.bar(df.columns[1:], df.iloc[i, 1:], color=['skyblue' if col != 'WHO(2011)' else 'orange' for col in df.columns[1:]]) 30 | plt.title(f'Comparison of {parameter}', fontsize=14) 31 | plt.ylabel(parameter, fontsize=12) 32 | plt.xlabel('Sample', fontsize=12) 33 | plt.xticks(rotation=45) 34 | plt.tight_layout() 35 | plt.show() 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chart for Water Parameters 2 | 3 | ![Project Banner](https://your-image-url.com) 4 | 5 | ## 📌 Overview 6 | **Chart-for-Water-Parameters** is a visual representation of essential water quality parameters, such as pH, temperature, turbidity, dissolved oxygen, and other key metrics. This project helps researchers, environmentalists, and water resource managers analyze water quality trends efficiently using interactive charts. 7 | 8 | ## 🚀 Features 9 | - 📊 **Real-time data visualization** for key water parameters 10 | - 🌍 **Interactive & dynamic charts** using libraries like Chart.js / D3.js / Matplotlib 11 | - 📈 **Supports multiple data sources**, including IoT sensor data, CSV, and API integration 12 | - 🔧 **Customizable dashboards** to fit specific user needs 13 | - 📡 **Integration-ready** for real-time monitoring systems 14 | 15 | ## 🔧 Installation 16 | 1. **Clone the repository** 17 | ```sh 18 | git clone https://github.com/your-username/Chart-for-Water-Parameters.git 19 | cd Chart-for-Water-Parameters 20 | ``` 21 | 2. **Install dependencies** (for Python-based projects) 22 | ```sh 23 | pip install -r requirements.txt 24 | ``` 25 | OR (for JavaScript-based projects) 26 | ```sh 27 | npm install 28 | ``` 29 | 3. **Run the project** 30 | ```sh 31 | python app.py # For Flask/Django-based projects 32 | ``` 33 | OR 34 | ```sh 35 | npm start # For Node.js-based projects 36 | ``` 37 | 38 | ## 📂 Data Format 39 | The data should be structured as: 40 | ```json 41 | [ 42 | {"timestamp": "2025-02-09T12:00:00Z", "pH": 7.2, "temperature": 24, "turbidity": 5.6}, 43 | {"timestamp": "2025-02-09T12:10:00Z", "pH": 7.3, "temperature": 23.8, "turbidity": 5.4} 44 | ] 45 | ``` 46 | 47 | ## 📊 Usage 48 | - Upload CSV or connect to a real-time sensor 49 | - Select parameters to visualize 50 | - Adjust time range for trend analysis 51 | - Export charts as PNG/PDF for reports 52 | 53 | ## 🏗️ Technologies Used 54 | - **Frontend:** React / D3.js / Chart.js 55 | - **Backend:** Python (Flask/Django) / Node.js (Express) 56 | - **Database:** PostgreSQL / Firebase / MongoDB 57 | - **Visualization:** Matplotlib / Plotly / Highcharts 58 | 59 | ## 🤝 Contributing 60 | 1. Fork the repository 61 | 2. Create a new branch (`feature-new-chart`) 62 | 3. Commit changes (`git commit -m 'Added new chart type'`) 63 | 4. Push to the branch (`git push origin feature-new-chart`) 64 | 5. Create a Pull Request 65 | 66 | ## 📜 License 67 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 68 | 69 | ## 📞 Contact 70 | For queries or collaborations: 71 | - **Email:**desmondeteh@gmail.com** 72 | - **GitHub:**https://github.com/Eteh** 73 | 74 | --- 75 | ### 🌟 Don't forget to ⭐ this repository if you find it useful! 76 | 77 | -------------------------------------------------------------------------------- /Water analysis results.csv: -------------------------------------------------------------------------------- 1 | Borehole,Lat,long,Town,pH,EC,TDS,NO3,Cl,SO4,TA,TH,Ca,Mg,Na,K,Fe,WQI,Iron 2 | BH1,5.036889,6.405972,Igbogene 1,6.12,406,203,0.36,39,1.4,26,25,22.4,6.35,10.86,4.2,0.16,42.1216181,0.6 3 | BH2,5.01975,6.398167,Yenagwe1,6.3,715,356,0.165,15,0.8,15,45,8.5,2.48,4,1.46,0.14,53.98172031,0.14 4 | BH3,5.016722,6.396528,Yenagwe 2,6.38,857,430,0.335,21,1.67,17,18,13.7,3,6.5,1.55,0.24,62.89770334,0.4 5 | BH4,5.002366,6.387691,Akenfa 1,6.1,782,391,0.175,14,0.86,19,37,8.85,2.5,4.85,0.76,0.12,55.40595753,0.37 6 | BH5,4.957417,6.35375,Etegwe 1,5.99,164,82,0.165,14,0.82,3,35,8.6,2.76,4.54,1.2,0.08,22.86374269,0.38 7 | BH6,4.94325,6.324806,Biogbolo 1,5.93,175,84,0.094,16,0.48,5,32,9,2.85,5.2,1.4,0.13,24.76845452,0.3 8 | BH7,4.908472,6.337083,Kpansia 1,5.6,763,383,0.085,14,0.45,16,30,7.4,2.38,4.74,1.2,0.18,55.18412497,0.15 9 | BH8,4.929167,6.300806,Ekeki 1,6.69,1156,578,0.096,22,0.5,15,46,12.48,3.62,5.8,1.8,0.17,78.65419883,0.35 10 | BH9,4.917722,6.317583,Kpansia 1,6.14,269,135,0.348,34,1.75,16,101,20,5.65,9.95,4,0.2,42.97825035,0.14 11 | BH10,4.91175,6.305972,Yenizue Epie 1,6.74,1652,826,0.42,47,2.1,15,45,27.86,7.5,13.58,4.65,0.13,108.1452058,0.36 12 | BH11,4.925861,6.275583,Amarata 1,6.05,422,211,0.204,37,0.96,18,91,21.48,6.2,9.84,2.62,0.18,48.18565142,0.16 13 | BH12,4.916,6.2755,Swail 1,6.87,722,361,0.49,23,2.45,9,33,16.74,4.4,7.6,2.5,0.28,60.54938805,0.36 14 | BH13,4.917028,6.251222,Ogbogoro 1,6.43,928,464,0.078,16,0.39,18,27,9.2,2.58,5.4,1.8,0.06,61.17732854,0.26 15 | BH14,4.903722,6.251222,Ogu 1,6.2,160,80,0.162,24,0.8,12,56,14.56,3.8,6,2.26,0.12,28.05512813,0.12 16 | BH15,4.91125,6.255611,Akaba 1,6.91,530,265,0.17,8,0.86,3,15,6.75,1.76,3.85,0.6,0.18,42.33777969,0.18 17 | BH16,5.026869,6.398981,Igbogene 2,6.33,496,248,0.137,13,1.28,8,65,8.16,2.42,5.82,1.76,0.32,50.33214192,0.39 18 | BH17,5.002678,6.379307,Akenfa 2,6.13,164,82,0.341,55,5.6,9,93,33.97,8.7,15.9,5.38,0.4,46.74196216,0.4 19 | BH18,4.992793,6.375336,Agudama 1,5.88,334,167,0.23,58,5.5,16,200,34.5,8.84,17.4,5.4,0.7,74.21779429,0.7 20 | BH19,4.98176,6.37166,Agudama 2,6.01,173,87,0.22,46,4.38,17,128,27.6,7.45,13.54,5.1,0.68,57.29759797,0.68 21 | BH20,4.953314,6.355015,Etegwe 2,5.99,164,82,0.165,14,0.82,3,35,8.6,2.76,4.54,1.2,0.08,22.84728269,0.8 22 | BH21,4.952838,6.34541,Okutukutu 1,5.85,91,46,0.132,14,1.42,14,56,8.78,1.96,4.62,0.78,0.32,27.92237124,0.32 23 | BH22,4.94409,6.331098,Opolo 1,5.93,84,42,0.374,43,3.4,22,90,26.74,6.4,12.43,2.7,0.65,46.20785065,0.65 24 | BH23,4.940728,6.326492,Opolo 2,6.38,94,48,0.41,65,5.6,24,115,35.6,7.64,14.9,5.4,0.4,46.07438836,0.4 25 | BH24,4.933825,6.307698,Kpansia 2,5.86,348,174,0.127,14,1.38,12,26,9.5,2.64,4.86,1.36,0.3,38.0913137,0.11 26 | BH25,4.916093,6.301615,Yenizue Epie 2,6.4,422,211,0.318,90,10.8,22,148,56.88,12.76,28.64,7.34,0.44,72.58534912,0.44 27 | BH26,4.935199,6.285502,Amarata 2,6.74,194,97,0.187,22,0.28,10,47,12.69,4.2,6.38,2.42,0.4,37.8099315,0.112 28 | BH27,4.923142,6.272686,Swail 2,6.46,486,243,0.172,19,1.64,17,116,11.28,3.54,5.38,1.34,0.32,55.19895768,0.35 29 | BH28,4.905837,6.258554,Akaba 2,5.99,77,38,0.213,40,4,14,111,23.86,5.72,12.58,2.55,0.4,39.54486379,0.4 30 | BH29,4.918221,6.25624,Ogbogoro 2,6.2,160,80,0.162,24,0.8,12,56,14.56,3.8,6,2.26,0.12,28.05512813,0.12 31 | BH30,4.899849,6.269169,Ogu 2,6.28,172,86,0.348,52,5.25,4,41,29.78,6.88,16.7,4.4,0.43,41.78656051,0.43 32 | BH31,4.983667,6.276111,Akaibiri 1,6.14,285,142,0.218,14,2.48,17,17,10.35,2.87,5.48,1.72,0.31,35.27294402,0.31 33 | BH32,4.987861,6.275722,Akaibiri 1,6.59,355,178,0.231,20,3.5,18,34,14.36,3.54,7.6,1.3,0.364,42.95478895,0.364 34 | BH33,5.000389,6.279556,Gbarantoru 1,6.01,420,210,0.31,20,4,20,52,13.3,4.2,6.5,2.6,0.136,41.60380917,0.136 35 | BH34,4.999861,6.280667,Gbarantoru 2,5.97,583,292,0.318,34,4.8,18,48,22.18,5.68,9.45,2.8,0.142,51.37814257,0.32 36 | BH35,4.999656,6.279361,Gbarantoru 3,5.96,363,182,0.22,20,3.85,12,36,14.7,2.53,6.84,1.76,0.36,42.88598307,0.36 37 | BH36,4.999222,6.2785,Gbarantoru 4,5.92,364,182,0.23,30,3.64,17,30,13.82,4.86,8.35,2.18,0.132,36.67706526,0.132 38 | BH37,5.004056,6.294028,Gbarantoru 5,6.15,310,155,0.197,12,3,18,26,17.48,2.25,5.42,3.2,0.38,41.02340524,0.38 39 | BH38,5.032306,6.312556,Ogbuna 1,6.49,379,189,0.271,13,4.3,17,43,9.47,2.84,5.46,1.85,0.348,44.0304606,0.348 40 | BH39,5.033528,6.311917,Ogbuna 2,6.35,304,152,0.176,14,2.34,18,27,10.2,3,4.96,1.41,0.186,33.37600427,0.186 41 | BH40,5.034,6.311778,Ogbuna 3,6.52,279,140,0.185,11,2.97,23,30,9.78,2.56,3.75,1.92,0.36,38.02697592,0.36 42 | BH41,5.033361,6.311056,Ogbuna 4,6.08,285,143,0.121,12,2.58,15,21,8.5,2.58,4.34,6.98,0.272,38.08975501,0.372 43 | BH42,5.038194,6.323444,Okolobiri 1,6.15,382,191,0.278,62,4.84,17,43,32.76,10.72,18.68,2.5,0.188,45.20214153,0.388 44 | BH43,5.038,6.319889,Okolobiri 2,5.99,457,274,0.328,16,4.75,17,44,13.6,3.52,7.48,1.2,0.174,43.40610743,0.374 45 | BH44,5.035417,6.321361,Okolobiri 3,6.6,348,174,0.281,12,3.84,26,41,9.55,2.84,4.72,1.48,0.328,41.57678878,0.328 46 | BH45,5.034306,6.318833,Okolobiri 4,6.83,298,199,0.217,12,3.76,23,35,9.28,1.78,5.46,1.24,0.146,33.71068039,0.146 47 | BH46,5.03425,6.31789,Okolobiri 5,6.62,306,153,0.227,13,4,28,35,10.32,2.1,4.8,1.2,0.346,39.19937644,0.346 48 | BH47,4.996806,6.262944,Tombia 1,6.24,436,218,0.29,14,3.46,24,45,9.88,3,5.75,2.25,0.33,46.80970726,0.33 49 | BH48,5.001417,6.263,Tombia 2,6.08,307,154,0.214,21,3.2,21,22,13.25,4.34,6.58,3.74,0.39,41.65627,0.39 50 | BH49,5.000861,6.265528,Tombia 3,6.1,376,188,0.245,32,4,22,19,18.72,5.63,9.36,3.96,0.136,38.68340624,0.136 51 | BH50,5.000639,6.266833,Tombia 4,5.67,357,178,0.235,33,3.85,18,10,19.3,5.82,9.65,1.55,0.382,42.03195999,0.382 52 | --------------------------------------------------------------------------------