import streamlit as st import pandas as pd import matplotlib.pyplot as plt import os st.title("Basic Bar Chart from Legislative Data") DATA_PATH = "Illinois_Entire_Data_Insights_Final_v2.csv" if not os.path.exists(DATA_PATH): st.error(f"Data file {DATA_PATH} not found in repo.") st.stop() df = pd.read_csv(DATA_PATH) st.success(f"Loaded {DATA_PATH}") # For example: count of bills by 'intent_standardized' if 'intent_standardized' not in df.columns: st.error("Column 'intent_standardized' not found in data.") st.stop() counts = df['intent_standardized'].value_counts() st.write("### Count of Bills by Intent") fig, ax = plt.subplots() counts.plot(kind='bar', ax=ax) ax.set_xlabel("Intent") ax.set_ylabel("Count") plt.xticks(rotation=45) st.pyplot(fig)