Skip to content

Commit

Permalink
[UPDATE] Category Times
Browse files Browse the repository at this point in the history
  • Loading branch information
FMCalisto committed Jul 11, 2024
1 parent fefe2f2 commit dbf6a17
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
31 changes: 23 additions & 8 deletions src/analytics/categorytimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
marker_line_color='rgb(8,48,107)',
marker_line_width=1.5,
opacity=0.6,
boxpoints='all',
boxpoints='outliers',
jitter=0.3
))

Expand All @@ -132,7 +132,7 @@
marker_line_color='rgb(8,48,107)',
marker_line_width=1.5,
opacity=0.6,
boxpoints='all',
boxpoints='outliers',
jitter=0.3
))

Expand All @@ -144,24 +144,39 @@
marker_line_color='rgb(8,48,107)',
marker_line_width=1.5,
opacity=0.6,
boxpoints='all',
boxpoints='outliers',
jitter=0.3
))

# Define the category order
category_order = ['Intern', 'Junior', 'Middle', 'Senior']

fig.update_layout(
title='Time on Task by Category Level and Assistance Type',
xaxis=dict(title='Category Level', tickangle=-45),
yaxis=dict(title='Time on Task (seconds)'),
title=dict(text='Time on Task by Category Level and Assistance Type', font=dict(size=24)),
xaxis=dict(title='Category Level', tickangle=-45, categoryorder='array', categoryarray=category_order, titlefont=dict(size=20), tickfont=dict(size=16)),
yaxis=dict(title='Time on Task (seconds)', gridcolor='grey', titlefont=dict(size=20), tickfont=dict(size=16)),
boxmode='group',
paper_bgcolor='rgb(243, 243, 243)',
plot_bgcolor='rgb(243, 243, 243)'
paper_bgcolor='rgba(0,0,0,0)',
plot_bgcolor='rgba(0,0,0,0)',
legend=dict(
orientation="h",
yanchor="bottom",
y=-0.3,
xanchor="center",
x=0.5,
font=dict(size=16)
)
)

# Save the plot
fn_to_save_html = os.path.join(plotsAbsPath, file_name_category_times + '.html')
fn_to_save_png = os.path.join(visAbsPath, file_name_category_times + '.png')
fn_to_save_svg = os.path.join(visAbsPath, file_name_category_times + '.svg')
fn_to_save_pdf = os.path.join(visAbsPath, file_name_category_times + '.pdf')
pyo.plot(fig, filename=fn_to_save_html, auto_open=False)
pio.write_image(fig, fn_to_save_png)
pio.write_image(fig, fn_to_save_svg)
pio.write_image(fig, fn_to_save_pdf)

# ============================== #
# ============================== #
Expand Down
Binary file modified stats/.DS_Store
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

0 comments on commit dbf6a17

Please sign in to comment.