Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -814,7 +814,7 @@ with col1:
|
|
| 814 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 1 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 815 |
pos1_data = alarm_data[alarm_data['Position'] == 1].copy()
|
| 816 |
pos1_data = pos1_data[pos1_data['hour'].between(6, 17, inclusive='both')]
|
| 817 |
-
fig1 = create_radial_chart(pos1_data, list(range(6, 18)), 'pagi')
|
| 818 |
if fig1 is not None:
|
| 819 |
st.plotly_chart(fig1, use_container_width=True)
|
| 820 |
else:
|
|
@@ -825,7 +825,7 @@ with col2:
|
|
| 825 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 1 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 826 |
pos1_data = alarm_data[alarm_data['Position'] == 1].copy()
|
| 827 |
pos1_data = pos1_data[~pos1_data['hour'].between(6, 17, inclusive='both')]
|
| 828 |
-
fig2 = create_radial_chart(pos1_data, list(range(18, 24)) + list(range(0, 6)), 'sore')
|
| 829 |
if fig2 is not None:
|
| 830 |
st.plotly_chart(fig2, use_container_width=True)
|
| 831 |
else:
|
|
@@ -836,7 +836,7 @@ with col3:
|
|
| 836 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 2 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 837 |
pos2_data = alarm_data[alarm_data['Position'] == 2].copy()
|
| 838 |
pos2_data = pos2_data[pos2_data['hour'].between(6, 17, inclusive='both')]
|
| 839 |
-
fig3 = create_radial_chart(pos2_data,
|
| 840 |
if fig3 is not None:
|
| 841 |
st.plotly_chart(fig3, use_container_width=True)
|
| 842 |
else:
|
|
@@ -847,7 +847,7 @@ with col4:
|
|
| 847 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 2 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 848 |
pos2_data = alarm_data[alarm_data['Position'] == 2].copy()
|
| 849 |
pos2_data = pos2_data[~pos2_data['hour'].between(6, 17, inclusive='both')]
|
| 850 |
-
fig4 = create_radial_chart(pos2_data,
|
| 851 |
if fig4 is not None:
|
| 852 |
st.plotly_chart(fig4, use_container_width=True)
|
| 853 |
else:
|
|
@@ -859,7 +859,7 @@ with col5:
|
|
| 859 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 3 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 860 |
pos3_data = alarm_data[alarm_data['Position'] == 3].copy()
|
| 861 |
pos3_data = pos3_data[pos3_data['hour'].between(6, 17, inclusive='both')]
|
| 862 |
-
fig5 = create_radial_chart(pos3_data,
|
| 863 |
if fig5 is not None:
|
| 864 |
st.plotly_chart(fig5, use_container_width=True)
|
| 865 |
else:
|
|
@@ -870,7 +870,7 @@ with col6:
|
|
| 870 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 3 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 871 |
pos3_data = alarm_data[alarm_data['Position'] == 3].copy()
|
| 872 |
pos3_data = pos3_data[~pos3_data['hour'].between(6, 17, inclusive='both')]
|
| 873 |
-
fig6 = create_radial_chart(pos3_data,
|
| 874 |
if fig6 is not None:
|
| 875 |
st.plotly_chart(fig6, use_container_width=True)
|
| 876 |
else:
|
|
@@ -881,7 +881,7 @@ with col7:
|
|
| 881 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 4 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 882 |
pos4_data = alarm_data[alarm_data['Position'] == 4].copy()
|
| 883 |
pos4_data = pos4_data[pos4_data['hour'].between(6, 17, inclusive='both')]
|
| 884 |
-
fig7 = create_radial_chart(pos4_data,
|
| 885 |
if fig7 is not None:
|
| 886 |
st.plotly_chart(fig7, use_container_width=True)
|
| 887 |
else:
|
|
@@ -892,7 +892,7 @@ with col8:
|
|
| 892 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 4 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 893 |
pos4_data = alarm_data[alarm_data['Position'] == 4].copy()
|
| 894 |
pos4_data = pos4_data[~pos4_data['hour'].between(6, 17, inclusive='both')]
|
| 895 |
-
fig8 = create_radial_chart(pos4_data,
|
| 896 |
if fig8 is not None:
|
| 897 |
st.plotly_chart(fig8, use_container_width=True)
|
| 898 |
else:
|
|
|
|
| 814 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 1 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 815 |
pos1_data = alarm_data[alarm_data['Position'] == 1].copy()
|
| 816 |
pos1_data = pos1_data[pos1_data['hour'].between(6, 17, inclusive='both')]
|
| 817 |
+
fig1 = create_radial_chart(pos1_data, ")", list(range(6, 18)), 'pagi')
|
| 818 |
if fig1 is not None:
|
| 819 |
st.plotly_chart(fig1, use_container_width=True)
|
| 820 |
else:
|
|
|
|
| 825 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 1 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 826 |
pos1_data = alarm_data[alarm_data['Position'] == 1].copy()
|
| 827 |
pos1_data = pos1_data[~pos1_data['hour'].between(6, 17, inclusive='both')]
|
| 828 |
+
fig2 = create_radial_chart(pos1_data, "", list(range(18, 24)) + list(range(0, 6)), 'sore')
|
| 829 |
if fig2 is not None:
|
| 830 |
st.plotly_chart(fig2, use_container_width=True)
|
| 831 |
else:
|
|
|
|
| 836 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 2 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 837 |
pos2_data = alarm_data[alarm_data['Position'] == 2].copy()
|
| 838 |
pos2_data = pos2_data[pos2_data['hour'].between(6, 17, inclusive='both')]
|
| 839 |
+
fig3 = create_radial_chart(pos2_data, "", list(range(6, 18)), 'pagi')
|
| 840 |
if fig3 is not None:
|
| 841 |
st.plotly_chart(fig3, use_container_width=True)
|
| 842 |
else:
|
|
|
|
| 847 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 2 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 848 |
pos2_data = alarm_data[alarm_data['Position'] == 2].copy()
|
| 849 |
pos2_data = pos2_data[~pos2_data['hour'].between(6, 17, inclusive='both')]
|
| 850 |
+
fig4 = create_radial_chart(pos2_data, "", list(range(18, 24)) + list(range(0, 6)), 'sore')
|
| 851 |
if fig4 is not None:
|
| 852 |
st.plotly_chart(fig4, use_container_width=True)
|
| 853 |
else:
|
|
|
|
| 859 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 3 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 860 |
pos3_data = alarm_data[alarm_data['Position'] == 3].copy()
|
| 861 |
pos3_data = pos3_data[pos3_data['hour'].between(6, 17, inclusive='both')]
|
| 862 |
+
fig5 = create_radial_chart(pos3_data, "", list(range(6, 18)), 'pagi')
|
| 863 |
if fig5 is not None:
|
| 864 |
st.plotly_chart(fig5, use_container_width=True)
|
| 865 |
else:
|
|
|
|
| 870 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 3 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 871 |
pos3_data = alarm_data[alarm_data['Position'] == 3].copy()
|
| 872 |
pos3_data = pos3_data[~pos3_data['hour'].between(6, 17, inclusive='both')]
|
| 873 |
+
fig6 = create_radial_chart(pos3_data, "", list(range(18, 24)) + list(range(0, 6)), 'sore')
|
| 874 |
if fig6 is not None:
|
| 875 |
st.plotly_chart(fig6, use_container_width=True)
|
| 876 |
else:
|
|
|
|
| 881 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 4 (06:00β18:00)</div>', unsafe_allow_html=True)
|
| 882 |
pos4_data = alarm_data[alarm_data['Position'] == 4].copy()
|
| 883 |
pos4_data = pos4_data[pos4_data['hour'].between(6, 17, inclusive='both')]
|
| 884 |
+
fig7 = create_radial_chart(pos4_data, "", list(range(6, 18)), 'pagi')
|
| 885 |
if fig7 is not None:
|
| 886 |
st.plotly_chart(fig7, use_container_width=True)
|
| 887 |
else:
|
|
|
|
| 892 |
st.markdown('<div style="text-align:center; font-weight:bold; margin-bottom: 8px;">Position 4 (18:00β06:00)</div>', unsafe_allow_html=True)
|
| 893 |
pos4_data = alarm_data[alarm_data['Position'] == 4].copy()
|
| 894 |
pos4_data = pos4_data[~pos4_data['hour'].between(6, 17, inclusive='both')]
|
| 895 |
+
fig8 = create_radial_chart(pos4_data, "", list(range(18, 24)) + list(range(0, 6)), 'sore')
|
| 896 |
if fig8 is not None:
|
| 897 |
st.plotly_chart(fig8, use_container_width=True)
|
| 898 |
else:
|