|
import streamlit as st |
|
|
|
def load_data(): |
|
|
|
df = pd.read_csv("tax_data.csv") |
|
|
|
|
|
df = df.dropna() |
|
df["compliance"] = df["compliance"].astype(int) |
|
|
|
return df |
|
|
|
|
|
def main(): |
|
df = load_data() |
|
|
|
st.header("Tax Compliance Analysis") |
|
st.subheader("Data Overview") |
|
|
|
st.write("Number of records: ", df.shape[0]) |
|
st.write("Number of compliant records: ", df[df["compliance"] == 1].shape[0]) |
|
st.write("Number of non-compliant records: ", df[df["compliance"] == 0].shape[0]) |
|
|
|
st.subheader("Compliance by Tax Type") |
|
st.bar_chart(df.groupby("tax_type")["compliance"].mean()) |
|
|
|
|