Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,8 +69,3 @@ fig = px.choropleth(
|
|
| 69 |
# Display the map
|
| 70 |
st.plotly_chart(fig)
|
| 71 |
|
| 72 |
-
st.write("""I began by acquiring a dataset on child mortality rates, with countries as rows and years as columns. The dataset contained child mortality rates as the number of deaths per 1,000 live births.
|
| 73 |
-
To make the dataset suitable for visualization, I transformed it into a long format using pandas.melt(), creating three columns: country, year, and mortality_rate. This step allowed for efficient filtering and visualization.
|
| 74 |
-
I chose a choropleth map because it effectively communicates regional differences using a color gradient. Each country is color-coded based on its mortality rate for a selected year, offering immediate visual insights.
|
| 75 |
-
I implemented a slider widget for year selection, enabling users to dynamically explore mortality rates over time.
|
| 76 |
-
This required ensuring that the year column was properly formatted as numeric data, and filtering the dataset based on the slider’s value.""")
|
|
|
|
| 69 |
# Display the map
|
| 70 |
st.plotly_chart(fig)
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|