Nothing too crazy here. Looking through examples and not finding what I need for schedules and timecards. Basically there are three elements:
- employee schedules (IE. start 0600 and end 1400)
- clock-in/clock-out AKA “timecard” (IE. start 0555 and end 1415)
- plotted against the full hours of operation (0500 - 2200)
Here is typical data in Pandas:
employees = [('BOB', datetime(2022,12,1,6,0,0), datetime(2022,12,1,14,0,0), datetime(2022,12,1,5,54,0), datetime(2022,12,1,14,12,0)),
('GILL', datetime(2022,12,1,6,0,0), datetime(2022,12,1,14,0,0), datetime(2022,12,1,6,43,0), datetime(2022,12,1,14,35,0)),
('TOBY', datetime(2022,12,1,14,0,0), datetime(2022,12,1,20,30,0), datetime(2022,12,1,13,45,0), datetime(2022,12,1,21,5,0))]
labels = ['name', 'schedulein', 'scheduleout', 'clockin', 'clockout']
df = pd.DataFrame.from_records(employees, columns=labels)
The display should have the employee name on the y-axis and the full schedule (open to close) on the x-axis. Then, each employee’s schedule and time card are stacked as horizontal bar aligned to employee name on the y-axis.