Forum Discussion

ValentinBIA's avatar
ValentinBIA
Icon for Resolver I rankResolver I
6 years ago

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 IDDate of changeState
000111-01-2020 11:34:45  1
000111-01-2020 18:23:32  0
000112-01-2020 10:44:21  1
000112-01-2020 19:16:03  0
000211-01-2020 09:34:48  1
000211-01-2020 18:55:02  0
000212-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's avatar
    mwegener
    Icon for Most Valuable Professional rankMost 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.