MCPcopy Create free account
hub / github.com/Hrishikesh332/HCDS-EPD / route_to_page

Function route_to_page

app.py:146–169  ·  view source on GitHub ↗
(df)

Source from the content-addressed store, hash-verified

144 return load_data()
145
146def route_to_page(df):
147 current_page = st.session_state.current_page
148
149 try:
150 if current_page == "dashboard":
151 dashboard(df)
152 elif current_page == "forecasting":
153 forecasting(df)
154 elif current_page == "fairness":
155 fairness_analysis(df)
156 elif current_page == "outliers":
157 outlier_analysis(df)
158 elif current_page == "clustering":
159 clustering_analysis(df)
160 elif current_page == "categories":
161 category_analysis(df)
162 else:
163 st.error(f"Unknown page: {current_page}")
164 dashboard(df)
165
166 except Exception as e:
167 st.error(f"Error loading page '{current_page}': {str(e)}")
168 st.info("Falling back to dashboard.")
169 dashboard(df)
170
171if __name__ == "__main__":
172 main()

Callers 1

mainFunction · 0.85

Calls 6

dashboardFunction · 0.90
forecastingFunction · 0.90
fairness_analysisFunction · 0.90
outlier_analysisFunction · 0.90
clustering_analysisFunction · 0.90
category_analysisFunction · 0.90

Tested by

no test coverage detected