Reduce graph generation time

- Keep raw data in the memory
- Aggregate data in the resolution of one second to reduce the number of data points for graphing
Move to utils?