Spaces:
Sleeping
Sleeping
File size: 1,852 Bytes
3d28f03 |
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
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()
|