Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -429,7 +429,7 @@ def lab_management(year_slider, column_changer):
|
|
| 429 |
lab = scatterdata_filtered[column_changer].iloc[0]
|
| 430 |
|
| 431 |
max_x = scatterdata_filtered[column_changer].max()
|
| 432 |
-
max_x_abn = scatterdata_filtered[
|
| 433 |
min_x = scatterdata_filtered[column_changer].min()
|
| 434 |
if column_changer != 'ASC-US/ASC-H ratio(%)':
|
| 435 |
tooltips_cp = f"""
|
|
@@ -454,7 +454,7 @@ def lab_management(year_slider, column_changer):
|
|
| 454 |
</div>
|
| 455 |
"""
|
| 456 |
hover_cp = HoverTool(tooltips=tooltips_cp)
|
| 457 |
-
scatter_plot = scatterdata_filtered[
|
| 458 |
xlim=(0,max_x+0.5), xticks = [0,lab,ref, max_x], grid=True, title=column_changer,
|
| 459 |
xformatter='%.1f',xlabel ='', ylabel='', tools = [hover_cp]).opts(fontsize = pl_title, fontscale=f_scale_lab, shared_axes=False, toolbar=None, default_tools = [])
|
| 460 |
ref_vline = hv.VLine(x=ref).opts(color='black', alpha = 1).opts(shared_axes=False,toolbar=None, default_tools = [])
|
|
@@ -468,7 +468,7 @@ def lab_management(year_slider, column_changer):
|
|
| 468 |
asclsil_bg =(asc_lsil_goal.opts(color='#ACFFA0', alpha=0.75) * asc_lsil_bdln_2.opts(color='#6AB35F', alpha=0.75) * asc_lsil_bdln_1.opts(color='#6AB35F', alpha=0.75) * asc_lsil_att.opts(color='#B34D93', alpha=0.9))
|
| 469 |
return (asclsil_bg* ref_vline * lab_vline * scatter_plot).opts(shared_axes=False)
|
| 470 |
elif column_changer == 'ASC-US/ASC-H ratio(%)' :
|
| 471 |
-
scatter_plot =
|
| 472 |
xlim=(17,100), xticks = [min_x,lab,ref, max_x], rot=45, grid=True, title=column_changer,
|
| 473 |
xformatter='%.1f',ylabel='',xlabel='', tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 474 |
asc_us_goal = hv.VSpan(90, 100).opts(shared_axes=False,toolbar=None, default_tools = []) #Ide beállítottam a treshold_1, 2 értékeket hogy a labor átlagából vett zónákat reprezentálja
|
|
@@ -491,7 +491,7 @@ def lab_management(year_slider, column_changer):
|
|
| 491 |
# return (aus_bg* lab_vline * scatter_plot).opts(shared_axes=False)
|
| 492 |
#
|
| 493 |
elif column_changer == 'Abnormal Rate(%)':
|
| 494 |
-
scatter_plot =
|
| 495 |
xlim=(0,max_x_abn), xticks = [0,lab,ref,3, max_x_abn], grid=True, title=column_changer,
|
| 496 |
xformatter='%.1f',ylabel='', xlabel='',tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 497 |
asc_agc_goal = hv.VSpan(4.5, 6.5).opts(shared_axes=False,toolbar=None, default_tools = [])
|
|
@@ -502,7 +502,7 @@ def lab_management(year_slider, column_changer):
|
|
| 502 |
asc_agc_bdln_2.opts(color='#6AB35F', alpha=0.75) *asc_agc_att.opts(color='#B34D93', alpha=0.9))
|
| 503 |
return (ascagc_bg* ref_vline * lab_vline*scatter_plot).opts(toolbar='above', default_tools=[]).opts(shared_axes=False)
|
| 504 |
elif column_changer == 'Referral Rate(%)':
|
| 505 |
-
scatter_plot =
|
| 506 |
xlim=(0,max_x+0.5), xticks = [0,lab, max_x], grid=True, title=column_changer,
|
| 507 |
xformatter='%.1f',ylabel='', xlabel='',tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 508 |
ref_goal = hv.VSpan(7, 13).opts(shared_axes=False,toolbar=None, default_tools = [])
|
|
|
|
| 429 |
lab = scatterdata_filtered[column_changer].iloc[0]
|
| 430 |
|
| 431 |
max_x = scatterdata_filtered[column_changer].max()
|
| 432 |
+
max_x_abn = scatterdata_filtered[scatterdata_filtered.people.str.contains('ytolog')][column_changer].max()
|
| 433 |
min_x = scatterdata_filtered[column_changer].min()
|
| 434 |
if column_changer != 'ASC-US/ASC-H ratio(%)':
|
| 435 |
tooltips_cp = f"""
|
|
|
|
| 454 |
</div>
|
| 455 |
"""
|
| 456 |
hover_cp = HoverTool(tooltips=tooltips_cp)
|
| 457 |
+
scatter_plot = scatterdata_filtered[scatterdata_filtered.people.str.contains('Cyto', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size, height= sheight,
|
| 458 |
xlim=(0,max_x+0.5), xticks = [0,lab,ref, max_x], grid=True, title=column_changer,
|
| 459 |
xformatter='%.1f',xlabel ='', ylabel='', tools = [hover_cp]).opts(fontsize = pl_title, fontscale=f_scale_lab, shared_axes=False, toolbar=None, default_tools = [])
|
| 460 |
ref_vline = hv.VLine(x=ref).opts(color='black', alpha = 1).opts(shared_axes=False,toolbar=None, default_tools = [])
|
|
|
|
| 468 |
asclsil_bg =(asc_lsil_goal.opts(color='#ACFFA0', alpha=0.75) * asc_lsil_bdln_2.opts(color='#6AB35F', alpha=0.75) * asc_lsil_bdln_1.opts(color='#6AB35F', alpha=0.75) * asc_lsil_att.opts(color='#B34D93', alpha=0.9))
|
| 469 |
return (asclsil_bg* ref_vline * lab_vline * scatter_plot).opts(shared_axes=False)
|
| 470 |
elif column_changer == 'ASC-US/ASC-H ratio(%)' :
|
| 471 |
+
scatter_plot = scatterdata_filtered[scatterdata_filtered.people.str.contains('Cyto', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size,height= sheight,
|
| 472 |
xlim=(17,100), xticks = [min_x,lab,ref, max_x], rot=45, grid=True, title=column_changer,
|
| 473 |
xformatter='%.1f',ylabel='',xlabel='', tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 474 |
asc_us_goal = hv.VSpan(90, 100).opts(shared_axes=False,toolbar=None, default_tools = []) #Ide beállítottam a treshold_1, 2 értékeket hogy a labor átlagából vett zónákat reprezentálja
|
|
|
|
| 491 |
# return (aus_bg* lab_vline * scatter_plot).opts(shared_axes=False)
|
| 492 |
#
|
| 493 |
elif column_changer == 'Abnormal Rate(%)':
|
| 494 |
+
scatter_plot = scatterdata_filtered[scatterdata_filtered.people.str.contains('Cytol', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size,height= sheight,
|
| 495 |
xlim=(0,max_x_abn), xticks = [0,lab,ref,3, max_x_abn], grid=True, title=column_changer,
|
| 496 |
xformatter='%.1f',ylabel='', xlabel='',tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 497 |
asc_agc_goal = hv.VSpan(4.5, 6.5).opts(shared_axes=False,toolbar=None, default_tools = [])
|
|
|
|
| 502 |
asc_agc_bdln_2.opts(color='#6AB35F', alpha=0.75) *asc_agc_att.opts(color='#B34D93', alpha=0.9))
|
| 503 |
return (ascagc_bg* ref_vline * lab_vline*scatter_plot).opts(toolbar='above', default_tools=[]).opts(shared_axes=False)
|
| 504 |
elif column_changer == 'Referral Rate(%)':
|
| 505 |
+
scatter_plot = scatterdata_filtered[scatterdata_filtered.people.str.contains('Cytol', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size,height= sheight,
|
| 506 |
xlim=(0,max_x+0.5), xticks = [0,lab, max_x], grid=True, title=column_changer,
|
| 507 |
xformatter='%.1f',ylabel='', xlabel='',tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 508 |
ref_goal = hv.VSpan(7, 13).opts(shared_axes=False,toolbar=None, default_tools = [])
|