Update app.py
Browse files
app.py
CHANGED
@@ -143,6 +143,8 @@ def solution():
|
|
143 |
""")
|
144 |
|
145 |
|
|
|
|
|
146 |
def perform_eda():
|
147 |
st.title("Exploratory Data Analysis")
|
148 |
st.write("""
|
@@ -154,6 +156,28 @@ def perform_eda():
|
|
154 |
# Show the Power BI dashboard
|
155 |
power_bi()
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
def power_bi():
|
158 |
"""
|
159 |
Embeds the Power BI report with specified dimensions and full-screen height.
|
@@ -187,25 +211,6 @@ def power_bi():
|
|
187 |
""", unsafe_allow_html=True)
|
188 |
|
189 |
|
190 |
-
# Add insights and recommendations
|
191 |
-
st.subheader("Data Insights and Recommendations")
|
192 |
-
st.write("""
|
193 |
-
From the dashboard, you can now appreciate the serious income inequality problem. Explore key insights and actionable recommendations for stakeholders to fight income inequality.
|
194 |
-
""")
|
195 |
-
|
196 |
-
# Table with insights and recommendations
|
197 |
-
st.table([
|
198 |
-
["π Higher education levels positively correlate with higher income.", "Invest in accessible and quality education, including scholarships and vocational training, for lower-income communities."],
|
199 |
-
["π©βπ Women are more likely below the income threshold than men.", "Support gender equality programs addressing wage disparities and encouraging women in STEM fields."],
|
200 |
-
["π₯ Income inequality exists across all employment statuses.", "Implement policies and programs supporting stable employment, job training, and entrepreneurship."],
|
201 |
-
["π Racial income disparities: Foster diversity and inclusion in workplaces.", "Promote equal opportunities, diversity training, and an inclusive work environment."],
|
202 |
-
["π Foreigners concentrated below the income threshold.", "Review immigration policies to ensure fair treatment and integration into the workforce."],
|
203 |
-
["π’ Majority below threshold in 'Unknown' occupations.", "Research challenges in different occupations and implement targeted support programs."],
|
204 |
-
["πΈ Nonfilers have higher representation below the threshold.", "Evaluate tax policies for fairness and consider incentives for low-income individuals."],
|
205 |
-
["π Data-driven insights are crucial for addressing income inequality.", "Continue investing in data collection and analysis to inform evolving policies."]
|
206 |
-
])
|
207 |
-
|
208 |
-
|
209 |
|
210 |
def prediction():
|
211 |
|
|
|
143 |
""")
|
144 |
|
145 |
|
146 |
+
import streamlit as st
|
147 |
+
|
148 |
def perform_eda():
|
149 |
st.title("Exploratory Data Analysis")
|
150 |
st.write("""
|
|
|
156 |
# Show the Power BI dashboard
|
157 |
power_bi()
|
158 |
|
159 |
+
# Add insights and recommendations
|
160 |
+
display_insights_and_recommendations()
|
161 |
+
|
162 |
+
def display_insights_and_recommendations():
|
163 |
+
st.subheader("Data Insights and Recommendations")
|
164 |
+
st.write("""
|
165 |
+
From the dashboard, you can now appreciate the serious income inequality problem. Explore key insights and actionable recommendations for stakeholders to fight income inequality.
|
166 |
+
""")
|
167 |
+
|
168 |
+
# Table with insights and recommendations
|
169 |
+
st.table([
|
170 |
+
["π Higher education levels positively correlate with higher income.", "Invest in accessible and quality education, including scholarships and vocational training, for lower-income communities."],
|
171 |
+
["π©βπ Women are more likely below the income threshold than men.", "Support gender equality programs addressing wage disparities and encouraging women in STEM fields."],
|
172 |
+
["π₯ Income inequality exists across all employment statuses.", "Implement policies and programs supporting stable employment, job training, and entrepreneurship."],
|
173 |
+
["π Racial income disparities: Foster diversity and inclusion in workplaces.", "Promote equal opportunities, diversity training, and an inclusive work environment."],
|
174 |
+
["π Foreigners concentrated below the income threshold.", "Review immigration policies to ensure fair treatment and integration into the workforce."],
|
175 |
+
["π’ Majority below threshold in 'Unknown' occupations.", "Research challenges in different occupations and implement targeted support programs."],
|
176 |
+
["πΈ Nonfilers have higher representation below the threshold.", "Evaluate tax policies for fairness and consider incentives for low-income individuals."],
|
177 |
+
["π Data-driven insights are crucial for addressing income inequality.", "Continue investing in data collection and analysis to inform evolving policies."]
|
178 |
+
])
|
179 |
+
|
180 |
+
# Define the Power BI display
|
181 |
def power_bi():
|
182 |
"""
|
183 |
Embeds the Power BI report with specified dimensions and full-screen height.
|
|
|
211 |
""", unsafe_allow_html=True)
|
212 |
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
def prediction():
|
216 |
|