diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-10-19 14:16:39 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-10-19 14:16:39 -0500 |
commit | bbf96c617d0298f6f4027f0a9b407fc1cd57c4bf (patch) | |
tree | e97e5c29b7a5d2ab25c153bb9de05a85ec3c45f5 /project_management | |
parent | 933a5137e8fa9f6353f971e005cf96c0ed775e62 (diff) | |
download | audit-tools-bbf96c617d0298f6f4027f0a9b407fc1cd57c4bf.tar.gz audit-tools-bbf96c617d0298f6f4027f0a9b407fc1cd57c4bf.tar.bz2 audit-tools-bbf96c617d0298f6f4027f0a9b407fc1cd57c4bf.zip |
add plotly dashboard example
Diffstat (limited to 'project_management')
-rw-r--r-- | project_management/dash/app.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/project_management/dash/app.py b/project_management/dash/app.py new file mode 100644 index 0000000..b6aa824 --- /dev/null +++ b/project_management/dash/app.py @@ -0,0 +1,49 @@ +# Import packages +from dash import Dash, html, dash_table, dcc +import pandas as pd +import plotly.express as px + +# Incorporate data +df = pd.read_excel('project_data.xlsx') + +# Initialize the app +app = Dash() + +# App layout +app.layout = [ + html.H1(children='Project Dashboard', style={'textAlign':'center'}), + html.Div(children = [ + dcc.Graph( + figure=px.histogram( + df, + x='Preparer', + color='High Priority?', + title='Control Count by Preparer' + ), + style = {'flex-grow':'1'} + ), + dcc.Graph( + figure=px.histogram( + df, + x='Preparer', + y='Projected Hours ', + color='Status ', + title='Project Hours by Preparer' + ), + style = {'flex-grow':'1'} + ) + ], style = {'display':'flex', 'flex-wrap':'wrap', 'justify-content':'space-between', 'align-items':'center'}), + dcc.Graph( + figure=px.pie( + df, + values = df['Preparer'].value_counts().values, + names=df['Reviewer'].value_counts().index, + title='Reviewer Breakdown', + hole=0.5 + ) + ) +] + +# Run the app +if __name__ == '__main__': + app.run(debug=True) |