Skip to content

Schedule visualization tools in Python and matplotlib specifically intended to help individuals working night shifts.

License

Notifications You must be signed in to change notification settings

theTrueEnder/Night-Shift-Schedule-Helper

Repository files navigation

Night Shift Schedule Helper

This Python application uses two types of schedule organizations to help night shift workers visualize their planned schedules, both for their benefit and for the benefit of their friends and loved ones.

image

Clock Schedule

The first plot type is a "Circular Time Chart" or (more fun) a "Clock Plot". It is a round, 24-hour polar plot with the time axis wrapped around. The user defines activity segments of the day to make up the circle, as seen in the example below:

image


Sheet Schedule

The second plot type is a spreadsheet-style plot. Instead of graphing one day, like the clock plot, the Sheet Schedule spans one week, showing all 24 hours side-by-side to make trends easier to visualize. For example:

image


Notably, the sheet schedule bears a resemblance to a spreadsheet. I originally tried to implement this in Microsoft Excel, but failed and decided Python was much more fun. However, the sheet schedule contains a .csv export function, so the static output of the sheet schedule can actually be imported to Excel (or Google Sheets) if that is desirable for you. See the example at example-schedule-sheet.csv

Installation

⚠️ This project was developed and works on Python 3.13. I am not sure what minor of Python 3 will break it, but most likely you need at least 3.8 or 3.10.

⚠️ This project was tested on a Windows 11 machine. The Python code itself shouldn't have issues on a Mac/Linux machine, but I'm not 100% sure if the path characters ('/' vs '') might break something. Cross-platform testing is on the TODOs, stay tuned!

  1. Download the .zip of this project and extract it (the green Code button)
  2. Open a terminal in the extracted directory
  3. pip install -r requirements.txt

Usage

Once you have the dependencies installed (see Installation), adjust the config.json to your liking. config.json and example-config.json are the same out-of-the box: this is intentional. This way, you have a starting point to work from in your personalized schedule, and you can always load example-config.json in the GUI if you ever need to look back. If you want to start from scratch, use the template.json.

Tip

Run the GUI: python gui.py

Each of the individual schedulers can be run, though they use example-config.json by default. To change this, just edit the file path in the last section of the code.

Tip

Run Scheduler Sheet: python scheduler_sheet.py

Run Scheduler Clock Plot: python scheduler_clock_plot.py

Story

TODO

TODOs

  • Cross-platform testing
  • Meals
  • Reduce requirements.txt
  • Short file path
  • Readme story
  • GUI example png
  • Update example files
  • Config file folder
  • Config customization
  • Fix double plot preview
  • Fix config file problem
  • Expand readme
  • Fix clock plot colors
  • Rename this repo to more accurately reflect what this is
  • GUI layout alignment
  • Add config file picker to GUI
  • Fix empty time slot problems
  • Make a GUI

About

Schedule visualization tools in Python and matplotlib specifically intended to help individuals working night shifts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages