kaz9112's picture
first upload
8ce5240
raw
history blame
1.26 kB
import streamlit as st
import seaborn as sns
sns.set()
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
image = Image.open('barchart_hour.jpg')
def run():
# Membuat Title
st.title('Exploratory Data Analysis')
# Membuat Sub Header
st.subheader('EDA For American Youtube trending videos')
# Membuat Deskripsi
st.write('This page made by Sam')
# Membuat Garis lurus
st.markdown('---')
# Magic Syntax
'''
Ma ma mia ma ma mia
'''
# Show DataFrame
raw_data = pd.read_csv('USvideos.csv')
st.dataframe(raw_data.sample(100))
st.write('### scatterplot views(in hundred millions) vs likes')
fig = plt.figure(figsize=(15, 10))
sns.scatterplot(x=raw_data['views'],y=raw_data['likes'])
st.pyplot(fig)
st.write('### scatterplot views(in hundred millions) vs comment_counts')
fig = plt.figure(figsize=(15, 10))
sns.scatterplot(x=raw_data['views'],y=raw_data['comment_count'], palette='hls')
st.pyplot(fig)
st.write('### Views(in millions) by video published hour')
st.image(image, caption=None, width=None, use_column_width=None, clamp=False, channels="RGB", output_format="auto")
if __name__ == '__main__':
run()