The Amazon PTO Calculator is a Python script designed to calculate and visualize the Paid Time Off (PTO) hours for Amazon corporate staff. It retrieves PTO data from an OpenDocument Spreadsheet (amazon_vacation_schedule.ods
) and performs calculations based on the specified parameters.
Please note that the following parameters should be adjusted in main.py
as needed:
filename = 'amazon_vacation_schedule.ods'
used = readTransactions(filename, 'baseline')
years = 4
months = 12
startMonth = 3
startYear = 2021
The script requires the amazon_vacation_schedule.ods
file to be located in the same directory as the main script. The spreadsheet should follow the schema:
tenure end_date year month vac ppt sick
0 1/31/2021 0 0
1 2/28/2021 0 1
2 3/31/2021 0 2
Where:
tenure
is the number of monthsend_date
is the month-end dateyear
is the year numbermonth
is the month numbervac
,ppt
, andsick
are the number of hours taken during the month
This script requires the following dependencies to be installed:
matplotlib
pandas
python-odf
To install the required dependencies, run the following command:
pip install matplotlib pandas odfpy
To use the Amazon PTO Calculator, follow these steps:
-
Place the
amazon_vacation_schedule.ods
file in the same directory as the main script. -
Open the
main.py
script in a text editor or IDE. -
Adjust the parameters (
filename
,years
,months
,startMonth
,startYear
) as needed. -
Run the script using the following command:
python main.py
The script will perform calculations based on the provided parameters and generate a plot showing the PTO hours over time.
-
Review the output displayed in the terminal. It will show the PTO hours remaining at the end of the given period.
The generated plot will be saved as pto_plot.png
in the same directory.
Feel free to customize the script according to your specific needs. You can modify the parsing logic for the spreadsheet, adjust the parameters for different calculation periods, or modify the plot visualization.
Contributions to this project are welcome! If you would like to contribute, please follow these steps:
- Fork the repository.
- Make your changes or improvements.
- Test your changes to ensure they work correctly.
- Commit your changes and submit a pull request.
Please provide a clear description of the changes you have made and the problem they address. Your feedback and suggestions are also appreciated!
This project is licensed under the MIT License.