Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,14 +59,14 @@ if selected_country:
|
|
| 59 |
['child_mortality_rate', 'population'],
|
| 60 |
as_=['Metric', 'Value']
|
| 61 |
).mark_line(point=True).encode(
|
| 62 |
-
x=alt.X('year:O', title='Year
|
| 63 |
-
y=alt.Y('Value:Q', title="
|
| 64 |
color=alt.Color('Metric:N', title='Metrics', legend=alt.Legend(orient='top')),
|
| 65 |
tooltip=['year', 'Metric:N', 'Value:Q']
|
| 66 |
).properties(
|
| 67 |
width=800,
|
| 68 |
height=400,
|
| 69 |
-
title=f"Child Mortality Rate and Population Trends in {selected_country}
|
| 70 |
)
|
| 71 |
|
| 72 |
st.altair_chart(chart, use_container_width=True)
|
|
|
|
| 59 |
['child_mortality_rate', 'population'],
|
| 60 |
as_=['Metric', 'Value']
|
| 61 |
).mark_line(point=True).encode(
|
| 62 |
+
x=alt.X('year:O', title='Year', axis=alt.Axis(labelAngle=0)),
|
| 63 |
+
y=alt.Y('Value:Q', title="Child Mortality Rate per Population", scale=alt.Scale(type='linear')),
|
| 64 |
color=alt.Color('Metric:N', title='Metrics', legend=alt.Legend(orient='top')),
|
| 65 |
tooltip=['year', 'Metric:N', 'Value:Q']
|
| 66 |
).properties(
|
| 67 |
width=800,
|
| 68 |
height=400,
|
| 69 |
+
title=f"Child Mortality Rate and Population Trends in {selected_country}"
|
| 70 |
)
|
| 71 |
|
| 72 |
st.altair_chart(chart, use_container_width=True)
|