I initially found it quite difficult to comprehend how aggregation works via the mongo documentation. To understand this concept, I went through a bit of trial and error and eventually came up with a successful solution. So here’s what I learned.
…
Aggregating time-series data in mongodb
![](<480:http://kylesmyth.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-18-at-7.44.10-PM-150x150.png, <768:http://kylesmyth.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-18-at-7.44.10-PM-300x174.png, >768:http://kylesmyth.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-18-at-7.44.10-PM.png)