Craig Oates
1 year ago
1 changed files with 81 additions and 0 deletions
@ -0,0 +1,81 @@
|
||||
* Overview of =daily-totals.py= Script |
||||
|
||||
I have assumed you have ran ~./separator.sh~ and ~./totalilator.sh~, created a |
||||
virtual-environment (venv) (~python3 -m venv venv~) and installed the dependencies |
||||
(via ~pip -r install requirements.txt~). See the project's [[file:../README.org][README]] for more |
||||
information on setting the repository up. |
||||
|
||||
#+begin_src shell |
||||
cd <PATH TO RITHERDON-CHARTS> |
||||
# Activate the virtual-environment if you haven't... |
||||
source venv/bin/activate |
||||
|
||||
# Run the script... |
||||
python daily-totals.py |
||||
#+end_src |
||||
|
||||
* Design/Trade-Off Notes and Decisions |
||||
|
||||
1. The data used with this script is the most /symmetrical/, for lack of a |
||||
better word, of all the CSV files I worked with. The number of rows and |
||||
values in the ~date~ column (in both CSV files) are the same. So, there was |
||||
no mapping issues along the x-axis -- like other scripts/charts. |
||||
2. I plotted the data on the chart with lines because that is the type of chart |
||||
Nicola wants the main data/charts to be presented in. |
||||
1. The aims of this script is a secondary pursuit. I did not think too much |
||||
about the overall goal of it. The main aim of the project is/was to |
||||
produce some line charts, so that is were my thinking is/was. This script |
||||
is just a continuation of working in that vain. There is no reason for |
||||
sticking with using a line chart with this script. |
||||
|
||||
* Files Used |
||||
|
||||
#+begin_src shell :results code |
||||
ls ../data/light-meter-*-daily-totals.csv |
||||
#+end_src |
||||
|
||||
#+RESULTS: |
||||
#+begin_src shell |
||||
../data/light-meter-1-daily-totals.csv |
||||
../data/light-meter-2-daily-totals.csv |
||||
#+end_src |
||||
|
||||
* Files Produced |
||||
|
||||
#+begin_src shell :results code |
||||
ls ../output/daily-totals* |
||||
#+end_src |
||||
|
||||
#+RESULTS: |
||||
#+begin_src shell |
||||
../output/daily-totals.html |
||||
#+end_src |
||||
|
||||
* What the Script Does |
||||
|
||||
Essentially, it takes the total number of reading recorded for each day, for |
||||
each Light Meter, and plots them on the chart. For example, it will show on |
||||
~2021-06-15~ (16^th June 2021) Light Meter 1 recorded ~59336~ readings and Light |
||||
Meter 2 recorded ~117487~. It does this for every day and each line on the chart |
||||
represent one Light Meter. |
||||
|
||||
Below is a sample of the data used by this script -- taken from |
||||
=../data/light-meter-1-daily-totals.csv=, |
||||
|
||||
| date | reading | |
||||
|--------------------+---------| |
||||
| 2021-06-13 | 6 | |
||||
| 2021-06-14 | 86729 | |
||||
| 2021-06-15 | 0 | |
||||
| 2021-06-16 | 59336 | |
||||
| MORE READINGS HERE | ... | |
||||
| 2021-07-28 | 80334 | |
||||
| 2021-07-29 | 52618 | |
||||
| 2021-07-30 | 49776 | |
||||
|
||||
The ~date~ column is used for the x-axis and the ~reading~ column is used for the |
||||
y-axis. |
||||
|
||||
* Examples/Screenshots |
||||
|
||||
[[file:../assets/daily-totals.png]] |
Loading…
Reference in new issue