Commit b97b681102
Unsigned
Layout: unified · split
project_management/dash/app.py added +49
| @@ -0,0 +1,49 @@ | ||
| 1 | # Import packages | |
| 2 | from dash import Dash, html, dash_table, dcc | |
| 3 | import pandas as pd | |
| 4 | import plotly.express as px | |
| 5 | ||
| 6 | # Incorporate data | |
| 7 | df = pd.read_excel('project_data.xlsx') | |
| 8 | ||
| 9 | # Initialize the app | |
| 10 | app = Dash() | |
| 11 | ||
| 12 | # App layout | |
| 13 | app.layout = [ | |
| 14 | html.H1(children='Project Dashboard', style={'textAlign':'center'}), | |
| 15 | html.Div(children = [ | |
| 16 | dcc.Graph( | |
| 17 | figure=px.histogram( | |
| 18 | df, | |
| 19 | x='Preparer', | |
| 20 | color='High Priority?', | |
| 21 | title='Control Count by Preparer' | |
| 22 | ), | |
| 23 | style = {'flex-grow':'1'} | |
| 24 | ), | |
| 25 | dcc.Graph( | |
| 26 | figure=px.histogram( | |
| 27 | df, | |
| 28 | x='Preparer', | |
| 29 | y='Projected Hours ', | |
| 30 | color='Status ', | |
| 31 | title='Project Hours by Preparer' | |
| 32 | ), | |
| 33 | style = {'flex-grow':'1'} | |
| 34 | ) | |
| 35 | ], style = {'display':'flex', 'flex-wrap':'wrap', 'justify-content':'space-between', 'align-items':'center'}), | |
| 36 | dcc.Graph( | |
| 37 | figure=px.pie( | |
| 38 | df, | |
| 39 | values = df['Preparer'].value_counts().values, | |
| 40 | names=df['Reviewer'].value_counts().index, | |
| 41 | title='Reviewer Breakdown', | |
| 42 | hole=0.5 | |
| 43 | ) | |
| 44 | ) | |
| 45 | ] | |
| 46 | ||
| 47 | # Run the app | |
| 48 | if __name__ == '__main__': | |
| 49 | app.run(debug=True) | |