import streamlit as st import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import plotly.express as px from PIL import Image st.set_page_config( page_title='Customer Default Payement in the Next Month - EDA', layout='wide', initial_sidebar_state='expanded' ) def run(): #membuat title st.title('Airline Delay Visualization') #membuat sub Header st.subheader('This Menus serve the visulalization for Airline Distibution. The purpose is to understanding characteristic for airline delay distribution') #menambahkan deskripsi st.write("# Perkenalan") st.write("Nama: Jonathan Tuahat") st.write("Batch: BSD 002") #membuat garis lurus st.write('---') #magix syntaxx ''' on this page we will do a simple data exploration, the data set used is Airline dataset. ''' #show dataframe df = pd.read_csv("Airlines_very_new.csv") st.dataframe(df) #membuat barplot st.write('#### Plot untuk mengecek status pembayaran payment pada bulan April - September') fig, ax = plt.subplots(figsize=(15, 5)) sns.barplot(x='Delay', y='Delay', data=df, palette='viridis', ax=ax) st.pyplot(fig) # menampilkan boxplot Grouppada setiap numerical values st.write('#### Boxplot of Values by Group') fig, ax = plt.subplots(figsize=(8, 6)) pilihan = st.selectbox('pilih kolom : ', ('Length', 'Time')) sns.boxplot(x='Delay', y= df[pilihan] , data=df, ax=ax) # Menampilkan plot menggunakan st.pyplot() st.pyplot(fig) st.write("* pada bagian `length` bisa kita lihat ternyata ada banyak outlier yang menjadikan persebaran data `length` miring") st.write("* pada bagian `Time` bisa kita lihat ternyata tidak ada outlier yang menjadikan persebaran data `Time` cukup bagus") if __name__=='__main__': run()