A Python package that creates a high-quality Gantt chart to visualize project timelines, work packages, milestones, and deliverables
Project description
Gantt Chart Creator for MSCA Fellowship
- This Python application creates a high-quality Gantt chart to visualize project timelines, work packages, milestones, and deliverables. It uses Plotly for interactive visualization and supports exporting the chart as a PNG image. The tool is tailored for projects, such as those funded by the Marie Skłodowska-Curie Actions (MSCA) fellowship.
Features
- Interactive Gantt chart creation.
- Customizable colors for milestones and deliverables.
- Annotations for explaining work packages.
- Option to save the chart as a high-quality PNG file.
Installation
To use this application, you need to have Python installed. You also need the following Python packages:
plotly
kaleido
- You can install these packages using pip:
pip install plotly kaleido
Usage
- To create a Gantt chart, call the create_gantt_chart function with the appropriate parameters.
Function Signature
def create_gantt_chart(work_packages, milestone_color, deliverable_color, annotation_text, start_date, finish_date, project_title, save=False):
Parameters
- work_packages: List of dictionaries, each representing a task with 'Task', 'Start', 'Finish', and 'Type'.
- milestone_color: Color code (e.g., hex color) for milestones.
- deliverable_color: Color code (e.g., hex color) for deliverables.
- annotation_text: Text for the annotation explaining work packages.
- start_date: Start date for the x-axis in 'YYYY-MM-DD' format.
- finish_date: Finish date for the x-axis in 'YYYY-MM-DD' format.
- project_title: Title of the project to be displayed at the top of the chart.
- save: Boolean, if True, the chart is saved as a high-quality PNG file.
Example
-
Here is an example of how to use the create_gantt_chart function:
-
from pejmanai_msca.gantt_chart import create_gantt_chart
-
work_packages = [ {"Task": "WP1-Subtask1", "Start": "2024-04-01", "Finish": "2024-07-30", "Type": "M1"}, {"Task": "WP1-Subtask2", "Start": "2024-08-01", "Finish": "2024-12-30", "Type": "D1"}, {"Task": "WP1-Subtask3", "Start": "2025-01-01", "Finish": "2025-04-30", "Type": "M2"}, {"Task": "WP2-Subtask1", "Start": "2024-05-01", "Finish": "2026-04-30", "Type": "M3"}, {"Task": "WP2-Subtask2", "Start": "2024-10-01", "Finish": "2025-01-30", "Type": "M4"}, {"Task": "WP3-Subtask1", "Start": "2025-02-01", "Finish": "2026-02-28", "Type": "M5"}, {"Task": "WP4-Subtask1", "Start": "2025-02-01", "Finish": "2026-02-28", "Type": "D2"} ]
-
milestone_color = '#f33126'
-
deliverable_color = '#2ca09c'
-
annotation_text = ( "● Milestones
" "● Deliverables
" "W1 - Research
" "W2 - R & D
" "W3 - Training loop
" "W4 - Final report" ) -
project_title = "MSCA Gantt Chart Example"
-
create_gantt_chart(work_packages, milestone_color, deliverable_color, annotation_text, '2024-01-01', '2026-12-31', project_title, save=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pejmanai_msca-0.0.1.tar.gz
.
File metadata
- Download URL: pejmanai_msca-0.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e9f80d24380fa6c7a6d0628458d8f32d4b08249f202e82faa7ff7998fc1a93d |
|
MD5 | c92d12f1172a1fb35d492b0b0accc547 |
|
BLAKE2b-256 | 10af6803c5122e49d9add063e7757a1cfd9d859636d997d11ba3c6ef0dca545c |
File details
Details for the file pejmanai_msca-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pejmanai_msca-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e2e319d85bef2717750b9aa532ff8d4139b80dfa25b747b261b9622d3c0730 |
|
MD5 | d8c57b5dab83312e7f3fe252e12d6f98 |
|
BLAKE2b-256 | 77371e7cdd2a0440931bfd54fa623db8f42c097931542f791bb211615820245f |