File size: 779 Bytes
10f1210
 
 
725ff5f
10f1210
d255a2b
10f1210
725ff5f
10f1210
d255a2b
 
 
10f1210
d255a2b
 
725ff5f
d255a2b
 
 
 
10f1210
d255a2b
10f1210
d255a2b
10f1210
d255a2b
 
 
 
 
10f1210
d255a2b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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)