Data processing and plotting for 'Personal Flash' artworks. https://www.nicolaellisandritherdon.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

2.6 KiB

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 README for more information on setting the repository up.

  cd <PATH TO RITHERDON-CHARTS>
  # Activate the virtual-environment if you haven't...
  source venv/bin/activate

  # Run the script...
  python daily-totals.py

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

  ls ../data/light-meter-*-daily-totals.csv
../data/light-meter-1-daily-totals.csv
../data/light-meter-2-daily-totals.csv

Files Produced

  ls ../output/daily-totals*
../output/daily-totals.html

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

/return-to-ritherdon/ritherdon-charts/src/branch/master/assets/daily-totals.png