Posting in Python forum but solution I’m looking for doesn’t necessarily have to be python but ideally can be executable in my existing python program at at least should be able to schedule the graph program to run via cron.
I’ve got a python script recording movement detected by a PIR sensor and logged in a text file with a second text file being used to record the hourly totals. The files are sent via email daily.
I’d like to enhance the program now with graphical representation of the log data but I haven’t done this before and don’t know the best program to use. Ideally I’d like to send the graph on email too - presumably .jpg format is best way.
The graph would have time on x axis in intervals of one minute with the y axis being binary to represent movement (1) or no movement (0).
The input for the graph is the log file with these elements:
Start time of movement
End time of movement
Total duration of movement (difference in end and start time)
The elements in the summary file are similar but have HOUR instead of Start and End Times and the duration is a total for that hour. This file will not be of any use for plotting the graph.
I know I may need to manipulate the input to obtain binary values for each minute. That won’t be an issue.
Any suggestions on best way to graph this would be appreciated.