File size: 720 Bytes
475efba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37d563b
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
import streamlit as st

def load_data():
    # Load data into a pandas DataFrame
    df = pd.read_csv("tax_data.csv")
    
    # Perform any necessary data processing and cleaning
    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())