I have a system that tracks the status of various users. For example a user could be: In the office, Out of the office, On break, or Sleeping. My system generates a log anytime a status is changed and logs a bunch of data: time, user, status, etc…
Example Logs:
Time, User, Status
9/28/2015 6:08:45, Sara, In The Office
9/28/2015 6:14:36, Mike, In The Office
9/28/2015 8:57:00, Jordan, In The Office
9/28/2015 10:30:07, Sara, On Break
9/28/2015 11:02:31, Sara, In The Office
9/28/2015 15:30:12, Mike, Out Of The Office
9/28/2015 16:48:02, Jordan, Out Of The Office
This is simple with this small log example, in reality I have ~100 users and ~12 different statuses.
How can I take this data, and create a graph that shows the number of people in a specific status (or multiple statuses) over a time window? Or answer “How many people were ‘In the Office’ at 10:23 AM?”
It is safe to assume that every user is “Out of the Office” at midnight which basically functions as a reset. Which is probably relevant to building a running count and allows me to start my search on any given day instead of needed to go back to “the beginning of time” to get accurate counts.
I will not be getting the logs streamed in real-time, I will get a one-time dump of the events each day. I am not sure if this is relevant to how it would work.
Thanks for any advice, guidance, or assistance.
... View more