File size: 892 Bytes
df67d76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
34
35
36
import streamlit as st
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

# Fungsi untuk memuat data
def load_data():
    df = pd.read_csv('h8dsft_P1G3_Muhammad_Arief_Kurniawan.csv')  # Adjust the path if needed
    return df

def main():
    st.title("Eksplorasi Data Analitik")

    # Load data
    data = load_data()

    # Display basic data information
    st.write("### Informasi Dasar Data")
    st.write(data.info())
    st.write("### Deskripsi Statistik")
    st.write(data.describe())
    st.write("### 5 Data Pertama")
    st.write(data.head())

    # Visualization with Streamlit
    st.write("### Visualisasi Distribusi Target: DEATH_EVENT")
    fig, ax = plt.subplots(figsize=(10, 6))
    sns.countplot(x=data['DEATH_EVENT'], ax=ax) 
    st.pyplot(fig)


    # You can add more visualizations or features as needed

if __name__ == "__main__":
    main()