Spaces:
Running
Running
Initial check on year column
Browse files- pages/4 Sunburst.py +6 -1
pages/4 Sunburst.py
CHANGED
@@ -3,6 +3,7 @@ import streamlit as st
|
|
3 |
import pandas as pd
|
4 |
import plotly.express as px
|
5 |
import numpy as np
|
|
|
6 |
|
7 |
#===config===
|
8 |
st.set_page_config(
|
@@ -77,7 +78,11 @@ if uploaded_file is not None:
|
|
77 |
|
78 |
with tab1:
|
79 |
#===sunburst===
|
80 |
-
|
|
|
|
|
|
|
|
|
81 |
|
82 |
if (GAP != 0):
|
83 |
YEAR = st.slider('Year', min_value=MIN, max_value=MAX, value=(MIN, MAX), on_change=reset_all)
|
|
|
3 |
import pandas as pd
|
4 |
import plotly.express as px
|
5 |
import numpy as np
|
6 |
+
import sys
|
7 |
|
8 |
#===config===
|
9 |
st.set_page_config(
|
|
|
78 |
|
79 |
with tab1:
|
80 |
#===sunburst===
|
81 |
+
try:
|
82 |
+
papers, MIN, MAX, GAP = get_minmax(extype)
|
83 |
+
except KeyError:
|
84 |
+
st.error('Error: Please check your "Year" column.')
|
85 |
+
sys.exit(1)
|
86 |
|
87 |
if (GAP != 0):
|
88 |
YEAR = st.slider('Year', min_value=MIN, max_value=MAX, value=(MIN, MAX), on_change=reset_all)
|