linted
This commit is contained in:
@@ -39,7 +39,6 @@ st.markdown("""
|
||||
""", unsafe_allow_html=True)
|
||||
|
||||
|
||||
|
||||
# @st.cache(hash_funcs={Connection: id})
|
||||
@st.cache(allow_output_mutation=True)
|
||||
def get_connection(path: str):
|
||||
@@ -92,12 +91,14 @@ else:
|
||||
# start_date = datetime(2022 ,5 ,17).date()
|
||||
# end_date = datetime(2022 ,5 ,17).date()
|
||||
|
||||
|
||||
@st.cache()
|
||||
def date_filter(df, start_date, end_date):
|
||||
filt = (df2.index >= pd.Timestamp(start_date)) & (df2.index <= pd.Timestamp(end_date + timedelta(days=1)))
|
||||
df = df[filt]
|
||||
return(df)
|
||||
|
||||
|
||||
df2 = date_filter(df2, start_date, end_date)
|
||||
|
||||
st.write('<style>div.row-widget.stRadio > div{flex-direction:row;justify-content: left;} </style>',
|
||||
@@ -133,6 +134,7 @@ else:
|
||||
}
|
||||
resample_time = resample_times[resample_sel]
|
||||
|
||||
|
||||
@st.cache()
|
||||
def time_resample(df, resample_time):
|
||||
if resample_time == 'Raw':
|
||||
@@ -142,6 +144,8 @@ def time_resample(df, resample_time):
|
||||
df_resample = df.resample(resample_time)['Com_Name'].aggregate('unique').explode()
|
||||
|
||||
return(df_resample)
|
||||
|
||||
|
||||
top_bird = df2['Com_Name'].mode()[0]
|
||||
df5 = time_resample(df2, resample_time)
|
||||
|
||||
@@ -248,7 +252,6 @@ if daily == False:
|
||||
rows=1, cols=1)
|
||||
# specs= [[{"type":"xy","rowspan":1},{"type":"heatmap","rowspan":1}]],
|
||||
|
||||
|
||||
# subplot_titles=('<b>Daily Top '+ str(top_N) + ' Species in Date Range '+ str(start_date) +' to '+ str(end_date) +'</b>',
|
||||
# '<b>Daily ' + specie+ ' Detections on 15 minute intervals </b>'),
|
||||
# # 'Total Detect:'+str('{:,}'.format(df_counts))+
|
||||
|
||||
Reference in New Issue
Block a user