SHELLAPANDIANGANHUNGING commited on
Commit
f45416f
·
verified ·
1 Parent(s): ef00f8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -75
app.py CHANGED
@@ -1380,121 +1380,78 @@ else:
1380
  # ===============================================================
1381
  st.subheader("Hazard Gradient Legend")
1382
  st.markdown("""
1383
- <style>
1384
- .legend-container {
1385
- display: flex;
1386
- gap: 20px;
1387
- margin-top: 10px;
1388
- }
1389
- .legend-box {
1390
- background-color: #fafafa;
1391
- border-radius: 12px;
1392
- padding: 15px 20px;
1393
- width: 32%;
1394
- border: 1px solid #e0e0e0;
1395
- box-shadow: 0px 2px 6px rgba(0,0,0,0.05);
1396
- }
1397
- .legend-title {
1398
- font-weight: 700;
1399
- margin-bottom: 12px;
1400
- color: #333;
1401
- }
1402
- .legend-item {
1403
- display: flex;
1404
- align-items: center;
1405
- margin-bottom: 6px;
1406
- }
1407
- .legend-color {
1408
- width: 18px;
1409
- height: 18px;
1410
- border-radius: 4px;
1411
- margin-right: 10px;
1412
- border: 1px solid #ccc;
1413
- }
1414
- .legend-note {
1415
- font-size: 12px;
1416
- color: #555;
1417
- font-style: italic;
1418
- margin-top: 10px;
1419
- display: block;
1420
- }
1421
- </style>
1422
-
1423
  <div class="legend-container">
1424
-
1425
- <!-- WORSENING -->
1426
  <div class="legend-box">
1427
- <div class="legend-title">Worsening Trends (Positive Slope)</div>
1428
-
1429
  <div class="legend-item">
1430
  <div class="legend-color" style="background-color: #d32f2f;"></div>
1431
- <span>Very High Worsening (≥ 1.5)</span>
1432
  </div>
1433
-
1434
  <div class="legend-item">
1435
  <div class="legend-color" style="background-color: #e57373;"></div>
1436
- <span>High Worsening (1.0 1.5)</span>
1437
  </div>
1438
-
1439
  <div class="legend-item">
1440
  <div class="legend-color" style="background-color: #ef9a9a;"></div>
1441
- <span>Moderate Worsening (0.5 1.0)</span>
1442
  </div>
1443
-
1444
  <div class="legend-item">
1445
  <div class="legend-color" style="background-color: #ffcdd2;"></div>
1446
- <span>Slight Worsening (0 0.5)</span>
1447
  </div>
1448
-
1449
- <span class="legend-note">
1450
- Worsening trends indicate increasing fatigue frequency over weeks.
1451
- </span>
1452
  </div>
1453
 
1454
- <!-- IMPROVING -->
1455
  <div class="legend-box">
1456
- <div class="legend-title">Improving Trends (Negative Slope)</div>
1457
-
1458
  <div class="legend-item">
1459
  <div class="legend-color" style="background-color: #388e3c;"></div>
1460
- <span>Excellent Improvement (≤ −1.5)</span>
1461
  </div>
1462
-
1463
  <div class="legend-item">
1464
  <div class="legend-color" style="background-color: #81c784;"></div>
1465
  <span>Great Improvement (−1.5 to −1.0)</span>
1466
  </div>
1467
-
1468
  <div class="legend-item">
1469
  <div class="legend-color" style="background-color: #a5d6a7;"></div>
1470
  <span>Good Improvement (−1.0 to −0.5)</span>
1471
  </div>
1472
-
1473
  <div class="legend-item">
1474
  <div class="legend-color" style="background-color: #c8e6c9;"></div>
1475
  <span>Slight Improvement (−0.5 to 0)</span>
1476
  </div>
1477
-
1478
- <span class="legend-note">
1479
- Improving trends indicate decreasing fatigue frequency over weeks.
1480
- </span>
1481
  </div>
1482
 
1483
- <!-- ONE-TIME EVENT -->
1484
  <div class="legend-box">
1485
- <div class="legend-title">One-Time Events (Zero Slope)</div>
1486
-
1487
  <div class="legend-item">
1488
  <div class="legend-color" style="background-color: #FFD700;"></div>
1489
- <span>One-Time Event (0)</span>
1490
  </div>
1491
-
1492
- <span class="legend-note">
1493
- Occurs when an operator appears in only one week — slope is defined as 0.
1494
- </span>
1495
  </div>
1496
-
1497
  </div>
 
 
 
 
 
 
 
 
 
 
 
1498
  """, unsafe_allow_html=True)
1499
 
1500
  # ===============================================================
 
1380
  # ===============================================================
1381
  st.subheader("Hazard Gradient Legend")
1382
  st.markdown("""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1383
  <div class="legend-container">
1384
+ <!-- Worsening Trends -->
 
1385
  <div class="legend-box">
1386
+ <div class="legend-title">Worsening Trends (Positive Slope):</div>
 
1387
  <div class="legend-item">
1388
  <div class="legend-color" style="background-color: #d32f2f;"></div>
1389
+ <span>Very High Worsening (≥1.5)</span>
1390
  </div>
 
1391
  <div class="legend-item">
1392
  <div class="legend-color" style="background-color: #e57373;"></div>
1393
+ <span>High Worsening (1.0–1.5)</span>
1394
  </div>
 
1395
  <div class="legend-item">
1396
  <div class="legend-color" style="background-color: #ef9a9a;"></div>
1397
+ <span>Moderate Worsening (0.5–1.0)</span>
1398
  </div>
 
1399
  <div class="legend-item">
1400
  <div class="legend-color" style="background-color: #ffcdd2;"></div>
1401
+ <span>Slight Worsening (0–0.5)</span>
1402
  </div>
1403
+ <p class="legend-note">
1404
+ <i>Note: Positive slope indicates increasing fatigue events over time — escalating risk exposure.</i>
1405
+ </p>
 
1406
  </div>
1407
 
1408
+ <!-- Improving Trends -->
1409
  <div class="legend-box">
1410
+ <div class="legend-title">Improving Trends (Negative Slope):</div>
 
1411
  <div class="legend-item">
1412
  <div class="legend-color" style="background-color: #388e3c;"></div>
1413
+ <span>Excellent Improvement (≤−1.5)</span>
1414
  </div>
 
1415
  <div class="legend-item">
1416
  <div class="legend-color" style="background-color: #81c784;"></div>
1417
  <span>Great Improvement (−1.5 to −1.0)</span>
1418
  </div>
 
1419
  <div class="legend-item">
1420
  <div class="legend-color" style="background-color: #a5d6a7;"></div>
1421
  <span>Good Improvement (−1.0 to −0.5)</span>
1422
  </div>
 
1423
  <div class="legend-item">
1424
  <div class="legend-color" style="background-color: #c8e6c9;"></div>
1425
  <span>Slight Improvement (−0.5 to 0)</span>
1426
  </div>
1427
+ <p class="legend-note">
1428
+ <i>Note: Negative slope reflects decreasing fatigue events — effective mitigation or behavioral improvement.</i>
1429
+ </p>
 
1430
  </div>
1431
 
1432
+ <!-- One-Time Events -->
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
+ <p class="legend-note">
1440
+ <i>Note: Slope = 0 by definition when data exists for only one week — insufficient for trend assessment.</i>
1441
+ </p>
 
1442
  </div>
 
1443
  </div>
1444
+
1445
+ <style>
1446
+ .legend-note {
1447
+ font-size: 12px;
1448
+ color: #666;
1449
+ margin-top: 12px;
1450
+ margin-bottom: 0;
1451
+ font-style: italic;
1452
+ line-height: 1.4;
1453
+ }
1454
+ </style>
1455
  """, unsafe_allow_html=True)
1456
 
1457
  # ===============================================================