diff --git a/code/pages/1_Basic behavior analysis.py b/code/pages/1_Basic behavior analysis.py index 2cc5495..9c3b752 100644 --- a/code/pages/1_Basic behavior analysis.py +++ b/code/pages/1_Basic behavior analysis.py @@ -10,7 +10,7 @@ from sklearn.preprocessing import StandardScaler from streamlit_plotly_events import plotly_events from util.aws_s3 import load_data -from util.streamlit import add_session_filter, data_selector +from util.streamlit import add_session_filter, data_selector, add_footnote from scipy.stats import gaussian_kde import streamlit_nested_layout @@ -126,6 +126,7 @@ def app(): with st.sidebar: add_session_filter(if_bonsai=True) data_selector() + add_footnote() if not hasattr(ss, "df"): st.write("##### Data not loaded yet, start from Home:") diff --git a/code/util/streamlit.py b/code/util/streamlit.py index 0849ff3..5ef2b06 100644 --- a/code/util/streamlit.py +++ b/code/util/streamlit.py @@ -691,13 +691,14 @@ def add_dot_property_mapper(): def data_selector(): - with st.expander(f'Session selector', expanded=True): - # --- add a download button --- - _add_download_filtered_session() - + with st.expander(f'Session selector', expanded=True): with st.expander(f"Filtered: {len(st.session_state.df_session_filtered)} sessions, " f"{len(st.session_state.df_session_filtered.h2o.unique())} mice", expanded=False): st.dataframe(st.session_state.df_session_filtered) + + # --- add a download button --- + with st.columns([1, 10])[1]: + _add_download_filtered_session() # cols = st.columns([4, 1]) # with cols[0].expander(f"From dataframe: {len(st.session_state.df_selected_from_dataframe)} sessions", expanded=False):