import streamlit as st import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import plotly.express as px from PIL import Image st.title("Fifa 2022 Eda") st.subheader("EDA for 2022") # add image # image = image.open('') # st.image(image, caption='Fifa 2022') # create Outline st.write('# Outline A') st.write('## Outline A') st.write('### Outline A.1.a') st.write('# Outline B') # Create markdwon line st.markdown("----") # Show datafreame df = pd.read_csv('https://raw.githubusercontent.com/FTDS-learning-materials/phase-1/master/w1/P1W1D1PM%20-%20Machine%20Learning%20Problem%20Framing.csv') st.dataframe(df) st.markdown("----") # Visualization st.write('# Visualization') # Create Barplot st.write('## Attacking Work Rate Plot') fig = plt.figure(figsize=(15,5)) sns.countplot(x='AttackingWorkRate', data=df) st.pyplot(fig) st.write('Explanation') # Create Histplot st.write('## Histogram of Rating') fig = plt.figure(figsize=(15,5)) sns.histplot(x='Overall', data=df, bins=50, kde=True) # Add line st.pyplot(fig) st.write("Explanation") # Create scatterplot st.write('## Scatterplot of Weight and Height') fig = plt.figure(figsize=(15,5)) sns.scatterplot(x='Weight', y='Height', data=df) st.pyplot(fig) st.write("Explanation") # Create histogram by user input st.write('# Visualization by User Input') choice = st.selectbox('Select Feature: ', ('Age','Weight','Height','ShootingTotal'), help='Select the feature you want!') fig = plt.figure(figsize=(15,5)) sns.histplot(df[choice], bins=35, kde=True) # Add line st.pyplot(fig) st.write('Explaination') # Create plotly plot st.write('# Plotly Plot - Player Price againts Rating') fig = px.scatter(df, x='ValueEUR', y='Overall', hover_data=['Name','Age']) st.plotly_chart(fig) st.write('Explain!')