Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hydroshift/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
22 changes: 6 additions & 16 deletions hydroshift/_pages/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ def section_lp3(gage: Gage):
"Maximum Likelihood": "MLE",
}[est_method]
with opt_col_2:
st_skew = st.toggle(
"Use regional skew", value=False, disabled=not gage.has_regional_skew
)
st_skew = st.toggle("Use regional skew", value=False, disabled=not gage.has_regional_skew)
if st_skew:
use_map = True
else:
Expand All @@ -77,9 +75,7 @@ def section_ams_seasonal(gage: Gage):
if gage.ams is not None:
if gage.missing_dates_ams:
st.warning(f"Missing {len(gage.missing_dates_ams)} AMS seasonal records")
st.plotly_chart(
plot_ams_seasonal(gage.ams, gage.gage_id), use_container_width=True
)
st.plotly_chart(plot_ams_seasonal(gage.ams, gage.gage_id), use_container_width=True)
show_data = st.checkbox("Show Ranked Seasonal Data Table")
if show_data:
st.dataframe(gage.ams)
Expand All @@ -95,7 +91,7 @@ def section_daily_mean(gage: Gage):
start_date = st.date_input("Start Date", value=date(2024, 1, 1))
end_date = st.date_input("End Date", value=date(2024, 12, 31))

data, missing_dates = gage.get_daily_values(
data = gage.get_daily_values(
start_date.strftime("%Y-%m-%d"),
end_date.strftime("%Y-%m-%d"),
)
Expand All @@ -104,9 +100,7 @@ def section_daily_mean(gage: Gage):
if data is not None:
if missing_dates:
st.warning(f"Missing {len(missing_dates)} daily mean records")
st.plotly_chart(
plot_daily_mean(data, gage.gage_id), use_container_width=True
)
st.plotly_chart(plot_daily_mean(data, gage.gage_id), use_container_width=True)
show_data = st.checkbox("Show Daily Mean Data Table")
if show_data:
st.dataframe(data)
Expand Down Expand Up @@ -135,9 +129,7 @@ def summary():
# Sidebar for input
with st.sidebar:
st.title("Settings")
st.session_state["gage_id"] = st.text_input(
"Enter USGS Gage Number:", st.session_state["gage_id"]
)
st.session_state["gage_id"] = st.text_input("Enter USGS Gage Number:", st.session_state["gage_id"])
gage = Gage(st.session_state["gage_id"])

# Toggle plots
Expand All @@ -154,9 +146,7 @@ def summary():
write_template("data_sources_side_bar.html")

if st.session_state["gage_id"]:
with st.spinner(
"Loading gage data..."
): # This is here to clear previous pages while data loads.
with st.spinner("Loading gage data..."): # This is here to clear previous pages while data loads.
pass

col2, col3 = st.columns([6, 2], gap="large")
Expand Down