├── code3 ├── CODE ├── README.md └── Code2 /code3: -------------------------------------------------------------------------------- 1 | Task,Start_Date,Planned_End_Date,Actual_End_Date,Progress,Phase 2 | Requirement Gathering,2025-01-01,2025-01-10,2025-01-09,100,Initiation 3 | Design,2025-01-11,2025-01-20,2025-01-23,100,Planning 4 | Development,2025-01-21,2025-02-15,2025-02-18,80,Execution 5 | Testing,2025-02-16,2025-02-28,2025-02-25,50,Execution 6 | Deployment,2025-03-01,2025-03-05,2025-03-07,30,Closure 7 | -------------------------------------------------------------------------------- /CODE: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import dash 3 | from dash import dcc, html 4 | import plotly.express as px 5 | import dash_bootstrap_components as dbc 6 | 7 | # Load Data 8 | df = pd.read_csv("data/project_schedule.csv", parse_dates=["Start_Date", "Planned_End_Date", "Actual_End_Date"]) 9 | 10 | # Calculate additional metrics 11 | df["Planned_Duration"] = (df["Planned_End_Date"] - df["Start_Date"]).dt.days 12 | df["Actual_Duration"] = (df["Actual_End_Date"] - df["Start_Date"]).dt.days 13 | df["Adherence"] = df["Actual_End_Date"] <= df["Planned_End_Date"] 14 | 15 | # App setup 16 | app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) 17 | app.title = "Project Schedule Adherence Dashboard" 18 | 19 | # Layout 20 | app.layout = dbc.Container([ 21 | html.H2("📊 Project Schedule Adherence Dashboard", className="text-center my-4"), 22 | 23 | dbc.Row([ 24 | dbc.Col(dbc.Card([ 25 | dbc.CardBody([ 26 | html.H5("Total Tasks", className="card-title"), 27 | html.H3(len(df), className="card-text") 28 | ]) 29 | ]), width=4), 30 | 31 | dbc.Col(dbc.Card([ 32 | dbc.CardBody([ 33 | html.H5("Tasks On Schedule", className="card-title"), 34 | html.H3(df["Adherence"].sum(), className="card-text") 35 | ]) 36 | ]), width=4), 37 | 38 | dbc.Col(dbc.Card([ 39 | dbc.CardBody([ 40 | html.H5("Schedule Adherence (%)", className="card-title"), 41 | html.H3(f"{(df['Adherence'].mean()*100):.2f}%", className="card-text") 42 | ]) 43 | ]), width=4), 44 | ], className="mb-4"), 45 | 46 | dcc.Graph( 47 | figure=px.bar(df, x="Task", y=["Planned_Duration", "Actual_Duration"], 48 | barmode="group", title="Planned vs Actual Duration per Task") 49 | ), 50 | 51 | dcc.Graph( 52 | figure=px.timeline(df, x_start="Start_Date", x_end="Actual_End_Date", y="Task", color="Adherence", 53 | title="Gantt Chart with Schedule Adherence") 54 | .update_yaxes(autorange="reversed") 55 | ) 56 | ], fluid=True) 57 | 58 | # Run the app 59 | if __name__ == "__main__": 60 | app.run_server(debug=True) 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 📊 Project Schedule Adherence Dashboard 2 | 3 | A web-based dashboard to monitor and visualize project schedule performance, built with **Dash**, **Plotly**, and **Pandas**. This tool helps project managers track planned vs. actual durations, adherence rates, and task completion progress with interactive charts. 4 | 5 | --- 6 | 7 | ## 🚀 Features 8 | 9 | - 📅 **Gantt Chart** for visualizing task timelines and delays 10 | - 📊 **Bar Charts** comparing planned vs. actual task durations 11 | - ✅ **Schedule Adherence Rate** summary 12 | - 📈 **Progress Tracker** for task completion (0–100%) 13 | - 🔍 **Phase Filter** to explore specific project stages 14 | - 🖨️ Export via **browser print to PDF** 15 | 16 | --- 17 | 18 | ## 🗃️ Sample Dataset Format 19 | 20 | `data/project_schedule.csv`: 21 | 22 | ```csv 23 | Task,Start_Date,Planned_End_Date,Actual_End_Date,Progress,Phase 24 | Requirement Gathering,2025-01-01,2025-01-10,2025-01-09,100,Initiation 25 | Design,2025-01-11,2025-01-20,2025-01-23,100,Planning 26 | Development,2025-01-21,2025-02-15,2025-02-18,80,Execution 27 | Testing,2025-02-16,2025-02-28,2025-02-25,50,Execution 28 | Deployment,2025-03-01,2025-03-05,2025-03-07,30,Closure 29 | 30 | 🛠️ Setup Instructions 31 | 1. Clone the Repository 32 | 33 | git clone https://github.com/your-username/project-schedule-adherence-dashboard.git 34 | cd project-schedule-adherence-dashboard 35 | 36 | 2. Install Dependencies 37 | 38 | pip install dash plotly pandas dash-bootstrap-components 39 | 40 | 3. Run the App 41 | 42 | python app.py 43 | 44 | Visit http://127.0.0.1:8050 in your browser. 45 | 📦 Project Structure 46 | 47 | project_schedule_adherence/ 48 | │ 49 | ├── app.py # Main dashboard application 50 | ├── data/ 51 | │ └── project_schedule.csv # Project schedule data file 52 | ├── assets/ # Optional CSS or JS 53 | │ └── custom.css 54 | ├── README.md # Project documentation 55 | 56 | 📤 Export Report 57 | 58 | To export the dashboard as a PDF: 59 | 60 | Click the "🖨️ Export Report" button. 61 | 62 | Use your browser’s Print option. 63 | 64 | Select "Save as PDF" to export the current view. 65 | 66 | 🧩 Possible Extensions 67 | 68 | 📡 Connect to live project management tools (e.g., Jira, Trello) 69 | 70 | 🧠 Integrate prediction for task delays using machine learning 71 | 72 | 🧾 Email scheduled PDF reports weekly 73 | 74 | 🔐 Add user authentication and roles 75 | 76 | 📊 Add pie charts for task status (e.g., delayed, completed) 77 | 78 | 👨‍💻 Author 79 | 80 | Your Name 81 | GitHub | LinkedIn 82 | 📄 License 83 | 84 | MIT License – feel free to use, modify, and distribute. 85 | 86 | 87 | --- 88 | 89 | Would you like me to: 90 | 91 | - Create a GitHub repository structure with this? 92 | - Add a badge for Heroku or Render deployment? 93 | - Include test data for CI/CD or unit testing? 94 | 95 | Let me know, and I’ll help you extend it. 96 | -------------------------------------------------------------------------------- /Code2: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import dash 3 | from dash import dcc, html, Output, Input 4 | import plotly.express as px 5 | import dash_bootstrap_components as dbc 6 | 7 | # Load Data 8 | df = pd.read_csv("data/project_schedule.csv", parse_dates=["Start_Date", "Planned_End_Date", "Actual_End_Date"]) 9 | df["Planned_Duration"] = (df["Planned_End_Date"] - df["Start_Date"]).dt.days 10 | df["Actual_Duration"] = (df["Actual_End_Date"] - df["Start_Date"]).dt.days 11 | df["Adherence"] = df["Actual_End_Date"] <= df["Planned_End_Date"] 12 | 13 | # App Setup 14 | app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) 15 | app.title = "Project Schedule Adherence Dashboard" 16 | 17 | # Layout 18 | app.layout = dbc.Container([ 19 | html.H2("📊 Project Schedule Adherence Dashboard", className="text-center my-4"), 20 | 21 | dbc.Row([ 22 | dbc.Col([ 23 | html.Label("Filter by Phase:"), 24 | dcc.Dropdown( 25 | id="phase-filter", 26 | options=[{"label": phase, "value": phase} for phase in df["Phase"].unique()], 27 | value=None, 28 | placeholder="Select a Phase", 29 | clearable=True 30 | ) 31 | ], width=4), 32 | 33 | dbc.Col([ 34 | html.Br(), 35 | html.Button("🖨️ Export Report (Use Browser's Print to PDF)", id="export-button", className="btn btn-secondary") 36 | ], width=8, className="text-end") 37 | ], className="mb-4"), 38 | 39 | dbc.Row([ 40 | dbc.Col(dbc.Card([ 41 | dbc.CardBody([ 42 | html.H5("Total Tasks", className="card-title"), 43 | html.H3(id="total-tasks") 44 | ]) 45 | ]), width=4), 46 | 47 | dbc.Col(dbc.Card([ 48 | dbc.CardBody([ 49 | html.H5("On-Time Tasks", className="card-title"), 50 | html.H3(id="on-time-tasks") 51 | ]) 52 | ]), width=4), 53 | 54 | dbc.Col(dbc.Card([ 55 | dbc.CardBody([ 56 | html.H5("Schedule Adherence (%)", className="card-title"), 57 | html.H3(id="adherence-rate") 58 | ]) 59 | ]), width=4), 60 | ], className="mb-4"), 61 | 62 | dcc.Graph(id="duration-bar-chart"), 63 | dcc.Graph(id="gantt-chart"), 64 | 65 | html.H4("Task Completion Progress", className="mt-4"), 66 | dcc.Graph(id="progress-chart") 67 | ], fluid=True) 68 | 69 | # Callback 70 | @app.callback( 71 | Output("total-tasks", "children"), 72 | Output("on-time-tasks", "children"), 73 | Output("adherence-rate", "children"), 74 | Output("duration-bar-chart", "figure"), 75 | Output("gantt-chart", "figure"), 76 | Output("progress-chart", "figure"), 77 | Input("phase-filter", "value") 78 | ) 79 | def update_dashboard(selected_phase): 80 | filtered = df[df["Phase"] == selected_phase] if selected_phase else df 81 | 82 | total = len(filtered) 83 | on_time = filtered["Adherence"].sum() 84 | adherence = f"{(filtered['Adherence'].mean() * 100):.2f}%" if total else "0%" 85 | 86 | bar_fig = px.bar(filtered, x="Task", y=["Planned_Duration", "Actual_Duration"], 87 | barmode="group", title="Planned vs Actual Duration per Task") 88 | 89 | gantt_fig = px.timeline(filtered, x_start="Start_Date", x_end="Actual_End_Date", y="Task", color="Adherence", 90 | title="Gantt Chart with Schedule Adherence") 91 | gantt_fig.update_yaxes(autorange="reversed") 92 | 93 | progress_fig = px.bar(filtered, x="Task", y="Progress", color="Progress", 94 | title="Task Completion Progress (%)", text="Progress") 95 | progress_fig.update_traces(texttemplate='%{text}%', textposition='outside') 96 | 97 | return total, on_time, adherence, bar_fig, gantt_fig, progress_fig 98 | 99 | # Run App 100 | if __name__ == "__main__": 101 | app.run_server(debug=True) 102 | --------------------------------------------------------------------------------