CoolFace
Apppublic

ilhamap/data_visualization1

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
app.py19 linesDownload Raw Back to root
1import pandas as pd2from matplotlib import pyplot as plt3import streamlit as st4sheet_id = "1WQ7HlCFNXfQaiITS2102-bX_2P-Z7BunXVBY8zMLa_g"5sheet_name = "Sheet1"6url = f"https://docs.google.com/spreadsheets/d/{sheet_id}/gviz/tq?tqx=out:csv&sheet={sheet_name}"7df = pd.read_csv(url)8x = df['year']9y = df['number']10 11fig = plt.figure(figsize=(5, 5))12plt.plot(x,y)13plt.title('line plot', fontweight='bold')14st.pyplot(fig)15 16fig = plt.figure(figsize=(5, 5))17plt.plot(x,y,'.')18plt.title('dotplot', fontweight='bold')19st.pyplot(fig)