Download chart.py from skt-asap/streamlit: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/skt-asap/streamlit/resolve/main/chart.py
- Command line
-
hf download hf://spaces/skt-asap/streamlit/chart.py
-
curl -L -o chart.py https://huggingface.co/spaces/skt-asap/streamlit/resolve/main/chart.py
509 Bytes
| import pandas as pd | |
| import altair as alt | |
| def create_area_chart(filtered_data_long, selected_cell): | |
| chart = alt.Chart(filtered_data_long).mark_area().encode( | |
| x=alt.X('timestamp:T', title='Timestamp'), | |
| y=alt.Y('Value:Q', title='RB Used'), | |
| color=alt.Color('RB:N', title='RB Type'), | |
| tooltip=['timestamp:T', 'RB:N', 'Value:Q'] | |
| ).properties( | |
| width=800, | |
| height=400, | |
| title=f'RB Usage for Cell ID: {selected_cell}' | |
| ).interactive() | |
| return chart | |