Spaces:
Runtime error
Runtime error
File size: 1,258 Bytes
8ce5240 |
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 |
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() |