Forum Discussion
Office occupation % heat map
Hi everyone,
I'm looking to make a heat map that indicates when a desk at an office is empty or used.
I have a dataset such as the following:
| Desk ID | Date of change | State |
| 0001 | 11-01-2020 11:34:45 | 1 |
| 0001 | 11-01-2020 18:23:32 | 0 |
| 0001 | 12-01-2020 10:44:21 | 1 |
| 0001 | 12-01-2020 19:16:03 | 0 |
| 0002 | 11-01-2020 09:34:48 | 1 |
| 0002 | 11-01-2020 18:55:02 | 0 |
| 0002 | 12-01-2020 09:34:45 | 1 |
For example the first line shows someone sat on desk 0001 at 11:34:45 on the 11th, and the second line shows that he left the desk at 18:23:32 the same day.
What I am trying to get from this data is a heat map that shows office % occupation for every 15 minutes interval between 09:00 and 20:00.
Should I build a database based on this one that gives the state of a desk for each interval (which would mean more than 10 million lines in my dataset), or is there a way to create a heat map from this data alone, that could for each 15 minute interval look at the last known state and attribute it correctly ?
Thank you very much for you time.
1 Reply
- mwegener
Most Valuable Professional
Hi ValentinBIA ,
I would only save the change.
For example:
someone sat on desk 0001 at 11:34:45 on the 11th = +1
he left the desk at 18:23:32 the same day = -1
With a running total, you should be able to record the status for every point in time.