vendredi 3 avril 2015

how to visualize data from impulse counter

I collect time stamps from a gas meter in irregular time intervals from seconds to minutes using a reed relay and a python script and I store these time stamp in a SQLite database. So the only information I have is the duration or time span between two entries in the DB meaning two points in time. How can I visualize this information using sql statements and a chart library?


The DB has two columns: 'timestamp' and 'value' where value is always '1' and 'timestamp' is a formatted date.


I tried something like 'select sum(value) from 'tablename' group by strftime('%Y%m%d %H%', date('timestamp');' to sum up all entries within blocks of hours.


Any help appreciated


Aucun commentaire:

Enregistrer un commentaire