rasmodev commited on
Commit
28f594a
β€’
1 Parent(s): dd66972

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -30
app.py CHANGED
@@ -139,13 +139,14 @@ def solution():
139
  Overall, this tool has the potential to make a meaningful contribution to the fight against income inequality and promote a more just and equitable society. βš–οΈ
140
  """)
141
 
 
142
 
143
  def perform_eda():
144
- st.title("Exploratory Data Analysis")
145
  st.write("""
146
- πŸ“ŠπŸ“ˆ Welcome to the Exploratory Data Analysis for the "Income Prediction" Project! πŸ“ˆπŸ“Š
147
- Gain a comprehensive understanding of income distribution and explore the factors that contribute to an individual's income level based on the census data that was used to build this prediction tool.
148
- Dive into the wealth of data and uncover insights about income prediction. Explore the data and understand the factors that contribute to an individual's income level. Let's begin our data-driven journey! πŸ’°πŸ”
149
  """)
150
 
151
  # Show the Power BI dashboard
@@ -161,7 +162,16 @@ def display_insights_and_recommendations():
161
  From the dashboard, you can now appreciate the serious income inequality problem. Explore key insights and actionable recommendations for stakeholders to fight income inequality.
162
  """)
163
 
 
 
 
 
 
 
 
 
164
  # Table with insights and recommendations
 
165
  st.table([
166
  ["πŸŽ“ Higher education levels positively correlate with higher income.", "Invest in accessible and quality education, including scholarships and vocational training, for lower-income communities."],
167
  ["πŸ‘©β€πŸŽ“ Women are more likely below the income threshold than men.", "Support gender equality programs addressing wage disparities and encouraging women in STEM fields."],
@@ -173,40 +183,19 @@ def display_insights_and_recommendations():
173
  ["πŸ“Š Data-driven insights are crucial for addressing income inequality.", "Continue investing in data collection and analysis to inform evolving policies."]
174
  ])
175
 
176
- # Define the Power BI display
177
  def power_bi():
178
  """
179
- Embeds the Power BI report with specified dimensions and full-screen height.
180
  """
181
 
182
  st.subheader("Exploring Income Data")
183
  st.write("Let's dive deeper into the data to understand income distribution and relationships between variables.")
184
 
185
- # Embed the Power BI iframe with specified dimensions
186
- power_bi_html = """
187
- <iframe title="Report Section" width="600" height="373.5" src="https://app.powerbi.com/view?r=eyJrIjoiZDNjMmExZjYtMWU2NS00NTBjLTk4Y2EtYmQ2MWU2OWMwODMyIiwidCI6IjQ0ODdiNTJmLWYxMTgtNDgzMC1iNDlkLTNjMjk4Y2I3MTA3NSJ9" frameborder="0" allowFullScreen="true"></iframe>
188
- """
189
-
190
- st.components.v1.html(power_bi_html)
191
-
192
- # Ensure full-screen height using CSS
193
- with st.empty():
194
- st.write("""
195
- <style>
196
- html, body {
197
- height: 100%;
198
- margin: 0;
199
- padding: 0;
200
- }
201
-
202
- iframe {
203
- width: 100%;
204
- height: 100vh;
205
- }
206
- </style>
207
- """, unsafe_allow_html=True)
208
-
209
 
 
 
210
 
211
  def prediction():
212
 
 
139
  Overall, this tool has the potential to make a meaningful contribution to the fight against income inequality and promote a more just and equitable society. βš–οΈ
140
  """)
141
 
142
+ import streamlit as st
143
 
144
  def perform_eda():
145
+ st.title("Data Insights and Recommendations")
146
  st.write("""
147
+ πŸ“ŠπŸ“ˆ Welcome to the Exploratory Data Analysis for the Income Prediction Project! πŸ“ˆπŸ“Š
148
+ Gain a comprehensive understanding of income distribution and explore the factors contributing to an individual's income level based on the census data used to build this prediction tool.
149
+ Dive into the wealth of data and uncover insights about income prediction. Explore the data and understand the factors contributing to an individual's income level. Let's begin our data-driven journey! πŸ’°πŸ”
150
  """)
151
 
152
  # Show the Power BI dashboard
 
162
  From the dashboard, you can now appreciate the serious income inequality problem. Explore key insights and actionable recommendations for stakeholders to fight income inequality.
163
  """)
164
 
165
+ # Add a screenshot of the Power BI dashboard
166
+ st.subheader("Exploring Income Data")
167
+ st.write("Let's dive deeper into the data to understand income distribution and relationships between variables.")
168
+ st.image("path_to_your_screenshot_image.png", use_column_width=True)
169
+
170
+ # Provide a link to the full Power BI dashboard
171
+ st.write("Explore the full Power BI dashboard [here](https://app.powerbi.com/view?r=eyJrIjoiZDNjMmExZjYtMWU2NS00NTBjLTk4Y2EtYmQ2MWU2OWMwODMyIiwidCI6IjQ0ODdiNTJmLWYxMTgtNDgzMC1iNDlkLTNjMjk4Y2I3MTA3NSJ9).")
172
+
173
  # Table with insights and recommendations
174
+ st.subheader("Insights and Recommendations")
175
  st.table([
176
  ["πŸŽ“ Higher education levels positively correlate with higher income.", "Invest in accessible and quality education, including scholarships and vocational training, for lower-income communities."],
177
  ["πŸ‘©β€πŸŽ“ Women are more likely below the income threshold than men.", "Support gender equality programs addressing wage disparities and encouraging women in STEM fields."],
 
183
  ["πŸ“Š Data-driven insights are crucial for addressing income inequality.", "Continue investing in data collection and analysis to inform evolving policies."]
184
  ])
185
 
 
186
  def power_bi():
187
  """
188
+ Display a screenshot of the Power BI dashboard with a link to the full dashboard.
189
  """
190
 
191
  st.subheader("Exploring Income Data")
192
  st.write("Let's dive deeper into the data to understand income distribution and relationships between variables.")
193
 
194
+ # Add a screenshot of the Power BI dashboard
195
+ st.image("default.jpg", use_column_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
+ # Provide a link to the full Power BI dashboard
198
+ st.write("Explore the full Power BI dashboard [here](https://app.powerbi.com/view?r=eyJrIjoiZDNjMmExZjYtMWU2NS00NTBjLTk4Y2EtYmQ2MWU2OWMwODMyIiwidCI6IjQ0ODdiNTJmLWYxMTgtNDgzMC1iNDlkLTNjMjk4Y2I3MTA3NSJ9).")
199
 
200
  def prediction():
201