SHELLAPANDIANGANHUNGING commited on
Commit
abcfbff
·
verified ·
1 Parent(s): 3f0e804

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +53 -61
app.py CHANGED
@@ -1387,68 +1387,60 @@ else:
1387
  # ===============================================================
1388
  st.markdown('<h3 class="big-title">Hazard Gradient Legend</h3>', unsafe_allow_html=True)
1389
  st.markdown("""
1390
- <div class="legend-container">
1391
- <!-- Worsening Trends -->
1392
- <div class="legend-box">
1393
- <div class="legend-title">Worsening Trends (Positive Slope):</div>
1394
- <div class="legend-item">
1395
- <div class="legend-color" style="background-color: #d32f2f;"></div>
1396
- <span>Very High Risk (≥1.5)</span>
1397
- </div>
1398
- <div class="legend-item">
1399
- <div class="legend-color" style="background-color: #e57373;"></div>
1400
- <span>High Risk (1.0–1.5)</span>
1401
- </div>
1402
- <div class="legend-item">
1403
- <div class="legend-color" style="background-color: #ef9a9a;"></div>
1404
- <span>Moderate Risk (0.5–1.0)</span>
1405
- </div>
1406
- <div class="legend-item">
1407
- <div class="legend-color" style="background-color: #ffcdd2;"></div>
1408
- <span>Slight Risk (0–0.5)</span>
1409
- </div>
1410
- <p class="legend-note">
1411
- <i>Note: Positive slope indicates increasing fatigue events over time — escalating operational risk.</i>
1412
- </p>
1413
- </div>
1414
-
1415
- <!-- Improving Trends -->
1416
- <div class="legend-box">
1417
- <div class="legend-title">Improving Trends (Negative Slope):</div>
1418
- <div class="legend-item">
1419
- <div class="legend-color" style="background-color: #388e3c;"></div>
1420
- <span>Excellent Improvement (≤−1.5)</span>
1421
- </div>
1422
- <div class="legend-item">
1423
- <div class="legend-color" style="background-color: #81c784;"></div>
1424
- <span>Great Improvement (−1.5 to −1.0)</span>
1425
- </div>
1426
- <div class="legend-item">
1427
- <div class="legend-color" style="background-color: #a5d6a7;"></div>
1428
- <span>Good Improvement (−1.0 to 0.5)</span>
1429
- </div>
1430
- <div class="legend-item">
1431
- <div class="legend-color" style="background-color: #c8e6c9;"></div>
1432
- <span>Slight Improvement (−0.5 to 0)</span>
1433
- </div>
1434
- <p class="legend-note">
1435
- <i>Note: Negative slope reflects decreasing fatigue events — effective mitigation or behavioral adaptation.</i>
1436
- </p>
1437
- </div>
1438
-
1439
- <!-- One-Time Events -->
1440
- <div class="legend-box">
1441
- <div class="legend-title">One-Time Events (Zero Slope):</div>
1442
- <div class="legend-item">
1443
- <div class="legend-color" style="background-color: #FFD700;"></div>
1444
- <span>One Time Event (0)</span>
1445
  </div>
1446
- <p class="legend-note">
1447
- <i>Note: Slope = 0 by definition when data exists for only one week — trend assessment not applicable.</i>
1448
- </p>
1449
- </div>
1450
- </div>
1451
- """, unsafe_allow_html=True)
1452
 
1453
  # ===============================================================
1454
  # PLOT FUNCTION — DIPERBAIKI: LOGIKA WARNA SESUAI KATEGORI RISK
 
1387
  # ===============================================================
1388
  st.markdown('<h3 class="big-title">Hazard Gradient Legend</h3>', unsafe_allow_html=True)
1389
  st.markdown("""
1390
+ <div class="legend-container">
1391
+ <div class="legend-box">
1392
+ <div class="legend-title">Worsening Trends (Positive Slope):</div>
1393
+ <div class="legend-item">
1394
+ <div class="legend-color" style="background-color: #d32f2f;"></div>
1395
+ <span>Very High Worsening (≥1.5)</span>
1396
+ </div>
1397
+ <div class="legend-item">
1398
+ <div class="legend-color" style="background-color: #e57373;"></div>
1399
+ <span>High Worsening (1.0–1.5)</span>
1400
+ </div>
1401
+ <div class="legend-item">
1402
+ <div class="legend-color" style="background-color: #ef9a9a;"></div>
1403
+ <span>Moderate Worsening (0.5–1.0)</span>
1404
+ </div>
1405
+ <div class="legend-item">
1406
+ <div class="legend-color" style="background-color: #ffcdd2;"></div>
1407
+ <span>Slight Worsening (0–0.5)</span>
1408
+ </div>
1409
+ <br>
1410
+ <i>Note: Applies when an operator has data in only one week — slope is set to 0 by definition.</i>
1411
+ </div>
1412
+ <div class="legend-box">
1413
+ <div class="legend-title">Improving Trends (Negative Slope):</div>
1414
+ <div class="legend-item">
1415
+ <div class="legend-color" style="background-color: #388e3c;"></div>
1416
+ <span>Excellent Improvement (≤−1.5)</span>
1417
+ </div>
1418
+ <div class="legend-item">
1419
+ <div class="legend-color" style="background-color: #81c784;"></div>
1420
+ <span>Great Improvement (1.5 to −1.0)</span>
1421
+ </div>
1422
+ <div class="legend-item">
1423
+ <div class="legend-color" style="background-color: #a5d6a7;"></div>
1424
+ <span>Good Improvement (−1.0 to −0.5)</span>
1425
+ </div>
1426
+ <div class="legend-item">
1427
+ <div class="legend-color" style="background-color: #c8e6c9;"></div>
1428
+ <span>Slight Improvement (−0.5 to 0)</span>
1429
+ <br>
1430
+ <i>Note: Applies when an operator has data in only one week — slope is set to 0 by definition.</i>
1431
+ </div>
1432
+ </div>
1433
+ <div class="legend-box">
1434
+ <div class="legend-title">One-Time Events (Zero Slope):</div>
1435
+ <div class="legend-item">
1436
+ <div class="legend-color" style="background-color: #FFD700;"></div>
1437
+ <span>One Time Event (0)</span>
1438
+ </div>
1439
+ <br>
1440
+ <i>Note: Applies when an operator has data in only one week — slope is set to 0 by definition.</i>
1441
+ </div>
 
 
 
1442
  </div>
1443
+ """, unsafe_allow_html=True)
 
 
 
 
 
1444
 
1445
  # ===============================================================
1446
  # PLOT FUNCTION — DIPERBAIKI: LOGIKA WARNA SESUAI KATEGORI RISK