Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanbhosale committed Nov 18, 2024
1 parent 2e9d0ce commit 94c17be
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions dashboard/src/utils/post_survey_analysis/functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def execute_post_survey_analysis(uploaded_file, df):
st.header("Composite Discrepancy Score Calculation")

# Display the dataframe
st.subheader("Uploaded Data")
st.write(df.head())
with st.expander("Uploaded Data Head:"):
st.dataframe(df.head(), use_container_width=True, hide_index=True)

# Check if necessary columns are present
required_columns = [
Expand Down Expand Up @@ -73,12 +73,13 @@ def execute_post_survey_analysis(uploaded_file, df):
# Sort the dataframe by composite discrepancy score in descending order
scores_df = scores_df.sort_values('composite_discrepancy_score', ascending=False)

st.subheader("Discrepancy Measures per L0 and L1")
st.dataframe(scores_df)
with st.expander("Discrepancy Measures per L0 and L1:"):
st.dataframe(scores_df, use_container_width=True, hide_index=True)

# Display Composite Discrepancy Scores
st.subheader("Composite Discrepancy Scores")
composite_scores = scores_df[['L0_name', 'L1_name', 'composite_discrepancy_score']]
with st.expander("Composite Discrepancy Scores:"):
st.dataframe(composite_scores, use_container_width=True, hide_index=True)

# Plot the composite discrepancy scores
st.subheader("Composite Discrepancy Score Plot")
Expand All @@ -94,9 +95,6 @@ def display_plot(plot_json, caption):
else:
st.warning("Composite Discrepancy Score Plot not available.")

# Display the composite scores table
st.table(composite_scores)

# Display Plots
st.subheader("Discrepancy Plots")

Expand Down

0 comments on commit 94c17be

Please sign in to comment.