Created
June 11, 2020 09:36
-
-
Save nikkisharma536/a4fa4a9b005f86dbfb1b297f94871017 to your computer and use it in GitHub Desktop.
Streamlit altair / line charts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## linechart | |
st.subheader('Comparision of infection growth') | |
total_cases_graph =alt.Chart(subset_data).transform_filter( | |
alt.datum.total_cases > 0 | |
).mark_line().encode( | |
x=alt.X('date', type='nominal', title='Date'), | |
y=alt.Y('sum(total_cases):Q', title='Confirmed cases'), | |
color='Country', | |
tooltip = 'sum(total_cases)', | |
).properties( | |
width=1500, | |
height=600 | |
).configure_axis( | |
labelFontSize=17, | |
titleFontSize=20 | |
) | |
st.altair_chart(total_cases_graph) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment