From be92060e088d22ab4f100c343c96ad0be929dc81 Mon Sep 17 00:00:00 2001 From: FUEL4EP Date: Mon, 21 Nov 2022 14:37:12 +0100 Subject: [PATCH] added analysis options for gas, pellets, and heat pump energy --- .directory | 6 -- README.md | 111 ++++++++++++++++++++++----- __pycache__/graphics.cpython-38.pyc | Bin 0 -> 3872 bytes __pycache__/io_module.cpython-38.pyc | Bin 0 -> 2671 bytes __pycache__/messaging.cpython-38.pyc | Bin 0 -> 4483 bytes consal.py | 78 +++++++++++++++++-- gas_energy_consumption.caf | 3 + heat_pump_energy_consumption.caf | 3 + pellets_energy_consumption.caf | 3 + 9 files changed, 171 insertions(+), 33 deletions(-) delete mode 100644 .directory create mode 100644 __pycache__/graphics.cpython-38.pyc create mode 100644 __pycache__/io_module.cpython-38.pyc create mode 100644 __pycache__/messaging.cpython-38.pyc create mode 100644 gas_energy_consumption.caf create mode 100644 heat_pump_energy_consumption.caf create mode 100644 pellets_energy_consumption.caf diff --git a/.directory b/.directory deleted file mode 100644 index 18fe1fd..0000000 --- a/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -SortOrder=1 -SortRole=modificationtime -Timestamp=2022,10,28,12,15,38 -Version=4 -ViewMode=1 diff --git a/README.md b/README.md index c256941..7afb58c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # consumption_analysis [![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/) [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FFUEL4EP%2Fconsumption_analysis&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) Buy Me a Coffee at ko-fi.com -Python statistic software for consumption analysis of electrical power, fresh water, and oil +Python statistic software for consumption analysis of electrical power, fresh water, oil, gas, pellets, and heat pump energy -# Installation for (K)ubuntu LINUX: +# Installation for [(K)ubuntu] LINUX: -1. Put all python source code files of this github reposotory into a working directory +1. Put all python source code files of this github repository into a working directory 2. Make consal.py executable: 'chmod +x consal.py' `/..` @@ -23,16 +23,25 @@ Optional: Put example data bases into the working directory * electrical_power_consumption.caf * oil_consumption.caf * water_consumption.caf +* gas_energy_consumption.caf +* pellets_energy_consumption.caf +* heat_pump_energy_consumption.caf -**Required python version** 3.x +**Required python version** +- 3.x **Required python modules:** -optparse, sys, os, numpy, scipy, time, datetime, pylab, matplotlib, re, string, builtins +- optparse, sys, os, numpy, scipy, time, datetime, pylab, matplotlib, re, string, builtins -** Tested operating systems: ** +**Tested operating systems:** -Kubuntu 14.04, Kubuntu 16.04, Kubuntu 18.04, Kubuntu 22.04 +- Kubuntu 14.04, Kubuntu 16.04, Kubuntu 18.04, Kubuntu 22.04 + +**Other operating systems:** + +- For other Linux OS, the code is working most probably as well +- For Windows OS, minor adaptions of the code might be necessary. Please do this on your own since I do not run any Microsoft OS. # Supported statistical analyses: @@ -48,15 +57,18 @@ Kubuntu 14.04, Kubuntu 16.04, Kubuntu 18.04, Kubuntu 22.04 * time chart of delta of 1 year moving average of consumption (matplotlib chart) ![pic](Images/delta_to_consumption_one_year_ago.png) +# Important note for moving averages -# Usage: +* moving averages over one year will be calculated after at least one year of data collection +* therefore **for the first year** of data entries, no moving averages will be calculated nor displayed -Usage: consal.py [options] -consal.py is doing a statistical analysis of electrical power, water, and oil -consumptions +# Usage: +Usage: python3 ./consal.py [options] +consal.py is doing a statistical analysis of electrical power, water, oil, +gas, pellets, and heat pump energy consumptions Options: @@ -66,7 +78,7 @@ Options: --nc no consistency check - -n create a new data base + -n create a new data base (always use together with '-i') -i input measurement(s) @@ -86,7 +98,22 @@ Options: -w analyze water consumption --wf=FILE file storing data base for water consumption analysis - + + -g analyze gas consumption + + --wg=FILE file storing data base for gas consumption analysis + + -p analyze pellets consumption + + --wp=FILE file storing data base for pellets consumption analysis + + -p analyze pellets consumption + + --wp=FILE file storing data base for pellets consumption analysis + + --hp analyze heat pump consumption + + --whp=FILE file storing data base for heat pump consumption analysis # Examples on usage: @@ -110,42 +137,86 @@ Options: consal -o + +4. Run analysis on provided data base for gas consumption: + + + consal -g + +5. Run analysis on provided data base for pellets consumption: + + + consal -p + +6. Run analysis on provided data base for heat pump energy consumption: + + + consal --hp -4. Add a new consumption value to an existing data base and then run an analysis of electrical power consumption: +7. Add a new consumption value to an existing data base and then run an analysis of electrical power consumption: consal -i -e -5. Add a new consumption value to an existing data base and then run an analysis of water consumption: +8. Add a new consumption value to an existing data base and then run an analysis of water consumption: consal -i -w -6. Add a new consumption value to an existing data base and then run an analysis of heating oil consumption: +9. Add a new consumption value to an existing data base and then run an analysis of heating oil consumption: consal -i -o + +10. Add a new consumption value to an existing data base and then run an analysis of gas consumption: -7. Create a new data base for electrical power consumption: + + consal -i -g + +11. Add a new consumption value to an existing data base and then run an analysis of pellets consumption: + + + consal -i -p + +12. Add a new consumption value to an existing data base and then run an analysis of heat pump energy consumption: + + + consal -i \--hp + +13. Create a new data base for electrical power consumption: consal -i -n -e -8. Create a new data base for water consumption: +14. Create a new data base for water consumption: consal -i -n -w -9. Create a new data base for heating oil consumption: +15. Create a new data base for heating oil consumption: consal -i -n -o + +16. Create a new data base for gas consumption: + + consal -i -n -g + +17. Create a new data base for pellets consumption: + + consal -i -n -p + +18. Create a new data base for heat pump energy consumption: + + consal -i -n \--hp + +# Enjoy and have fun saving energy! -# Enjoy and have fun! # Update history: - 13th June 2021: Migration to python3 - 28th October 2022: Fixes due to library updates, update of images +- 21st November 2022: Added analysis options for gas, pellets, and heat pump energy diff --git a/__pycache__/graphics.cpython-38.pyc b/__pycache__/graphics.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ea9381980eb0d2dcd22ff256d11eab112fdfd2d GIT binary patch literal 3872 zcma)9&2J<}74OfPo}LeXuGhP9k`AmFhA8$XL;_jCc3AHwNUQ~9H*A`ZPR~@&OnbYh zXRB-0Go!X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xp(K4n*X;P+-hC7;jdCzD~!W#1_UNa&!P=hMQ+V@+oe{c*NtF z7@UFzW@^Z+v;>BR3~WILCR=rJ25$z;#{3C*c9we4*LP;m-Mu`s%4TO)=T_N!(d82B z*=XhtzjoIQV(;?Q%3@?`OK|N%hHGu$EkY`==z6o!?i7iFbf~zp};vD>YN*mM!Q>4)b&4SvLRGwDAEqfI1AGEZfruQ5Lnn4S0AE1x5vnsz2(V^8J4SqGG1O literal 0 HcmV?d00001 diff --git a/__pycache__/messaging.cpython-38.pyc b/__pycache__/messaging.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62c628034d4b5a0ab48fa3ce46f22ea695525d9c GIT binary patch literal 4483 zcmc&%-)|dB6`t8$+iS;h)7-X6dn*{K=u(TS0i<#vl#;3~7anRMdZE2WXtmiH|LS@- zogFvCvUwnV;u-OrK1T4wpR=z>Nc|W3biXreJ4usp`v78-nVnxdbI$p`Gw1lX%gZ%} z=P!T%ee~~782cA>PCgzw+bG#TP)XKil1nG%ZEoLA+p%xA?MgTFq$f*nSiAHElVw?X z!(>IdgYtpfu3*HMRg6?;BR)oIatR|#2Tr?+UR^Gux2&pIU+c2=l5EIJ*sU&CUBTsr^%N1{6}Kr z9aLbgcN}#@)%>A0l}9L5s-6n5WZKK;yx<^cxusS@k2kx0vl*pHHX804oEwBm81HBOY;&lxETm8G?(XOHOqs{DDGjXAsSYaU z=nCqHnkOF@oo$rt1}ep1dPZi4$xG6e-W%Tbtit7d_38YSCx48Tm0EL==Zv zCOWAWVX`lj)~U{f>4ioN!+nuP(MXGaB5DFpC>BDC&M1jUp;lxig&_1$n~F6Y@o2&) zEU>22BsGlZg}R$Ho!rY*+|gAGTFVtx8Qt6uf_~CBLGW$#3PbSmr)M>}J73oXDkb_X z35O~O@>&oKQ#p#MT@Qj+qcEP$RDwXJQ4r{*)8`U)nhw{5_Dz(GcJ$XTG&f)VMfg%3+dMpFb8Fr{nOUcM2@EgMREdbfQMYHTsZA=n%E01Ub(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