Upload 18 files
Browse files- .gitattributes +9 -0
- 2022_FIFA_World_Cup_image_2.jpg +0 -0
- Argentina v France _ FIFA World Cup Qatar 2022.mp4 +3 -0
- CupImage.jpg +0 -0
- FIFA2022Quatar.py +1578 -0
- FIFAWorldCup2022.csv +65 -0
- FIFA_World_Cup_2022_Soundtrack.mp4 +3 -0
- Fifa World Cup Opening Shows for Concept K.mp4 +3 -0
- Image_6.jpg +0 -0
- Image_7.jpg +0 -0
- hayya-hayya-better-together-fifa-world-cup-2022-8d-audio-version-use-headphones-8d-music-song-128-ytshorts.savetube.me.mp3 +3 -0
- k-naan-waving.mp3 +3 -0
- quatar2022.jpeg +0 -0
- requirements.txt +12 -0
- shakira-la-la-la.mp3 +3 -0
- shakira-waka-waka.mp3 +3 -0
- sound_effect.mp3 +0 -0
- vecteezy_qatar-fifa-world-cup-2022-animation-de-particules-intro_14441286.mp4 +3 -0
- we-are-one-ole-ola.mp3 +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
Argentina[[:space:]]v[[:space:]]France[[:space:]]_[[:space:]]FIFA[[:space:]]World[[:space:]]Cup[[:space:]]Qatar[[:space:]]2022.mp4 filter=lfs diff=lfs merge=lfs -text
|
37 |
+
Fifa[[:space:]]World[[:space:]]Cup[[:space:]]Opening[[:space:]]Shows[[:space:]]for[[:space:]]Concept[[:space:]]K.mp4 filter=lfs diff=lfs merge=lfs -text
|
38 |
+
FIFA_World_Cup_2022_Soundtrack.mp4 filter=lfs diff=lfs merge=lfs -text
|
39 |
+
hayya-hayya-better-together-fifa-world-cup-2022-8d-audio-version-use-headphones-8d-music-song-128-ytshorts.savetube.me.mp3 filter=lfs diff=lfs merge=lfs -text
|
40 |
+
k-naan-waving.mp3 filter=lfs diff=lfs merge=lfs -text
|
41 |
+
shakira-la-la-la.mp3 filter=lfs diff=lfs merge=lfs -text
|
42 |
+
shakira-waka-waka.mp3 filter=lfs diff=lfs merge=lfs -text
|
43 |
+
vecteezy_qatar-fifa-world-cup-2022-animation-de-particules-intro_14441286.mp4 filter=lfs diff=lfs merge=lfs -text
|
44 |
+
we-are-one-ole-ola.mp3 filter=lfs diff=lfs merge=lfs -text
|
2022_FIFA_World_Cup_image_2.jpg
ADDED
![]() |
Argentina v France _ FIFA World Cup Qatar 2022.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5dc2666a17e34676c8021302e54c469d84da67aa7f157ebe444318df6b5ea93e
|
3 |
+
size 22589180
|
CupImage.jpg
ADDED
![]() |
FIFA2022Quatar.py
ADDED
@@ -0,0 +1,1578 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import pandas as pd
|
3 |
+
from PIL import Image
|
4 |
+
import matplotlib.pyplot as plt
|
5 |
+
import seaborn as sns
|
6 |
+
import numpy as np
|
7 |
+
import plotly.express as px
|
8 |
+
import shap
|
9 |
+
from sklearn.preprocessing import LabelEncoder
|
10 |
+
from sklearn.model_selection import train_test_split
|
11 |
+
from sklearn.linear_model import LinearRegression
|
12 |
+
from sklearn.metrics import accuracy_score
|
13 |
+
from sklearn.metrics import r2_score, mean_squared_error
|
14 |
+
from shapash.explainer.smart_explainer import SmartExplainer
|
15 |
+
from sklearn.ensemble import RandomForestClassifier
|
16 |
+
from sklearn.tree import DecisionTreeClassifier
|
17 |
+
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor
|
18 |
+
import plotly.graph_objects as go
|
19 |
+
import plotly.figure_factory as ff
|
20 |
+
from email.mime.multipart import MIMEMultipart
|
21 |
+
from email.mime.text import MIMEText
|
22 |
+
import smtplib
|
23 |
+
import tensorflow as tf
|
24 |
+
from codecarbon import EmissionsTracker
|
25 |
+
import random
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
# Load image
|
31 |
+
image_quatar2022 = Image.open('quatar2022.jpeg')
|
32 |
+
image_quatar2022_2 = Image.open('2022_FIFA_World_Cup_image_2.jpg')
|
33 |
+
# Load additional image, audio, and video
|
34 |
+
image_featured = Image.open('CupImage.jpg')
|
35 |
+
image_F = Image.open('Image_6.jpg')
|
36 |
+
image_M = Image.open('Image_7.jpg')
|
37 |
+
audio_fifa = "k-naan-waving.mp3"
|
38 |
+
audio_fifa_2 = "shakira-la-la-la.mp3"
|
39 |
+
audio_fifa_3 = "shakira-waka-waka.mp3"
|
40 |
+
audio_fifa_4 = "we-are-one-ole-ola.mp3"
|
41 |
+
audio_fifa_5 = "hayya-hayya-better-together-fifa-world-cup-2022-8d-audio-version-use-headphones-8d-music-song-128-ytshorts.savetube.me.mp3"
|
42 |
+
audio_1= "sound_effect.mp3"
|
43 |
+
video_intro = "FIFA_World_Cup_2022_Soundtrack.mp4"
|
44 |
+
video_concu = "Argentina v France _ FIFA World Cup Qatar 2022.mp4"
|
45 |
+
|
46 |
+
import streamlit as st
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
# Set page configuration
|
51 |
+
st.set_page_config(
|
52 |
+
page_title="FIFA World Cup 2022 Data Analysis",
|
53 |
+
page_icon="⚽"
|
54 |
+
)
|
55 |
+
|
56 |
+
# Title
|
57 |
+
st.title("FIFA World Cup 2022 Data Analysis")
|
58 |
+
# Initialize session state
|
59 |
+
if 'app_mode' not in st.session_state:
|
60 |
+
st.session_state.app_mode = 'Welcome'
|
61 |
+
|
62 |
+
st.markdown("<p style='text-align: center; font-family: Comic Sans MS; font-size: 24px;'><b>Select a page in a sidebar to explore:</b></p>", unsafe_allow_html=True)
|
63 |
+
|
64 |
+
st.sidebar.markdown("<h2 style='color: yellow; text-align: center; border-bottom: 2px solid yellow;'>Explore FIFA World Cup 2022 Data Analysis</h2>", unsafe_allow_html=True)
|
65 |
+
|
66 |
+
st.sidebar.markdown("Navigate through below sections:")
|
67 |
+
# Page selection buttons
|
68 |
+
button_labels = ['Welcome 🏠', 'Introduction 📖', 'Visualization 📊', 'Prediction 📈', 'Feature of Importance & Shap 📊', 'MLflow & Deployment 🚀', 'Conclusion 🏁']
|
69 |
+
selected_button = st.sidebar.radio("Select a page below to explore:", button_labels)
|
70 |
+
|
71 |
+
# Set the selected page based on the button clicked
|
72 |
+
if selected_button == 'Welcome 🏠':
|
73 |
+
st.session_state.app_mode = 'Welcome'
|
74 |
+
elif selected_button == 'Introduction 📖':
|
75 |
+
st.session_state.app_mode = 'Introduction'
|
76 |
+
elif selected_button == 'Visualization 📊':
|
77 |
+
st.session_state.app_mode = 'Visualization'
|
78 |
+
elif selected_button == 'Prediction 📈':
|
79 |
+
st.session_state.app_mode = 'Prediction'
|
80 |
+
elif selected_button == 'Feature of Importance & Shap 📊':
|
81 |
+
st.session_state.app_mode = 'Feature of Importance & Shap'
|
82 |
+
elif selected_button == 'MLflow & Deployment 🚀':
|
83 |
+
st.session_state.app_mode = 'MLflow & Deployment'
|
84 |
+
|
85 |
+
elif selected_button == 'Conclusion 🏁':
|
86 |
+
st.session_state.app_mode = 'Conclusion'
|
87 |
+
|
88 |
+
# Custom CSS for styling
|
89 |
+
st.markdown(
|
90 |
+
"""
|
91 |
+
<style>
|
92 |
+
/* Add custom font and styling */
|
93 |
+
.welcome-text {
|
94 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
95 |
+
font-size: 24px;
|
96 |
+
color: #fff;
|
97 |
+
text-align: center;
|
98 |
+
padding: 20px;
|
99 |
+
background-color: #17202A; /* Dark blue background */
|
100 |
+
border-radius: 10px;
|
101 |
+
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
|
102 |
+
}
|
103 |
+
h2 {
|
104 |
+
font-size: 36px;
|
105 |
+
margin-bottom: 20px;
|
106 |
+
color: #FFD700; /* Gold color */
|
107 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
108 |
+
}
|
109 |
+
p {
|
110 |
+
font-size: 20px;
|
111 |
+
line-height: 1.5;
|
112 |
+
color: #fff; /* White color */
|
113 |
+
margin-bottom: 15px;
|
114 |
+
}
|
115 |
+
video {
|
116 |
+
width: 100%;
|
117 |
+
border-radius: 10px;
|
118 |
+
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
|
119 |
+
}
|
120 |
+
/* Style for sidebar */
|
121 |
+
.sidebar {
|
122 |
+
background-color: #2C3E50; /* Dark sidebar background */
|
123 |
+
padding: 20px;
|
124 |
+
border-radius: 10px;
|
125 |
+
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
|
126 |
+
}
|
127 |
+
.sidebar-header {
|
128 |
+
color: #FFD700; /* Gold color */
|
129 |
+
font-size: 24px;
|
130 |
+
margin-bottom: 20px;
|
131 |
+
}
|
132 |
+
.sidebar-item {
|
133 |
+
font-size: 18px;
|
134 |
+
color: #fff; /* White color */
|
135 |
+
margin-bottom: 10px;
|
136 |
+
}
|
137 |
+
</style>
|
138 |
+
""",
|
139 |
+
unsafe_allow_html=True
|
140 |
+
)
|
141 |
+
|
142 |
+
# Welcome page content
|
143 |
+
if st.session_state.app_mode == 'Welcome':
|
144 |
+
# Sidebar content for Welcome page
|
145 |
+
|
146 |
+
st.sidebar.markdown("<p style='color: yellow; font-family: Arial, sans-serif;'>Navigate below Welcome sidebar:</p>", unsafe_allow_html=True)
|
147 |
+
|
148 |
+
st.sidebar.markdown("[Welcome](#welcome-section)")
|
149 |
+
|
150 |
+
# Welcome section
|
151 |
+
st.markdown(
|
152 |
+
"""
|
153 |
+
<div id="welcome-section" class="welcome-text">
|
154 |
+
<h2>Welcome to FIFA World Cup 2022 Data Analysis</h2>
|
155 |
+
<p>The FIFA World Cup is the biggest football sports competition where countries from all over the world come together to compete for the most glorious and amazing cup. 🔍 In this app, we're diving into what affects how many goals a team scores in every game during the FIFA World Cup 2022, & Other factors which matters in The Football Match. Why? Well, in football, by scoring more goals often means you're more likely to win the game. Let's explore why that's the case.</p>
|
156 |
+
<p style="font-style: italic;">"Football is about scoring goals." - Pep Guardiola</p>
|
157 |
+
</div>
|
158 |
+
""",
|
159 |
+
unsafe_allow_html=True
|
160 |
+
)
|
161 |
+
|
162 |
+
# Load the video
|
163 |
+
video_path = "Fifa World Cup Opening Shows for Concept K.mp4"
|
164 |
+
with open(video_path, "rb") as f:
|
165 |
+
video_bytes = f.read()
|
166 |
+
st.video(video_bytes)
|
167 |
+
|
168 |
+
# Disclaimer message (initially hidden)
|
169 |
+
if st.sidebar.button("Show Disclaimer"):
|
170 |
+
st.sidebar.markdown(
|
171 |
+
"""
|
172 |
+
<div class="sidebar-item">
|
173 |
+
<p>⚠️ Disclaimer: We're not predicting the game winner here. Instead, we're focusing on what increases the likelihood to score more goals in a game, which would basically also increases a team's chances of winning that game.</p>
|
174 |
+
</div>
|
175 |
+
""",
|
176 |
+
unsafe_allow_html=True
|
177 |
+
)
|
178 |
+
|
179 |
+
|
180 |
+
# Introduction Page
|
181 |
+
elif st.session_state.app_mode == 'Introduction':
|
182 |
+
st.subheader("Introduction")
|
183 |
+
st.sidebar.markdown("<p style='color: yellow; font-family: Arial, sans-serif;'>Navigate below Introduction sidebar:</p>", unsafe_allow_html=True)
|
184 |
+
|
185 |
+
# Welcoming message and image
|
186 |
+
st.markdown("<h1 style='text-align: center;'>Habibi, Enjoy FIFA World Cup 2022 Data Analysis App!</h1>", unsafe_allow_html=True)
|
187 |
+
|
188 |
+
|
189 |
+
|
190 |
+
st.markdown("<p style='font-family: Arial; font-size: 16px;'>💡 Pro Tip:</p>", unsafe_allow_html=True)
|
191 |
+
st.markdown("<p style='font-family: Comic Sans MS; font-size: 20px; color: #FF1493;'>🎵 Enjoy the below chosen FIFA World Cup song for you, in the left side bar! 🎉 Feel free to adjust the volume 🔊 or stop the song ⏹️ whenever you want. 🕺💃</p>", unsafe_allow_html=True)
|
192 |
+
|
193 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
194 |
+
st.sidebar.audio(audio_fifa_3, format='audio/mp3')
|
195 |
+
st.video(video_intro, format='video/mp4')
|
196 |
+
|
197 |
+
# Objectives
|
198 |
+
st.header("🎯 Objectives")
|
199 |
+
|
200 |
+
st.markdown("""
|
201 |
+
Our goal is to analyze key factors affecting team performance in the FIFA World Cup 2022. We're particularly interested in understanding what influences the number of goals scored by each team. We're also exploring other factors like possession to gain insights into team dynamics and strategies.
|
202 |
+
""")
|
203 |
+
|
204 |
+
# Key Variables
|
205 |
+
st.markdown("### Key Variables")
|
206 |
+
st.markdown("Below are the key variables we emphasize in our analysis, though there are more additional variables considered:")
|
207 |
+
st.markdown("- Team")
|
208 |
+
st.markdown("- Possession")
|
209 |
+
st.markdown("- Number of Goals")
|
210 |
+
st.markdown("- Corners")
|
211 |
+
st.markdown("- On Target Attempts")
|
212 |
+
st.markdown("- Defensive Pressures Applied")
|
213 |
+
|
214 |
+
# Description of Data
|
215 |
+
st.markdown("### Description of Data")
|
216 |
+
st.markdown("Let's take a look at some descriptive statistics of the data:")
|
217 |
+
|
218 |
+
# Load data
|
219 |
+
df = pd.read_csv("FIFAWorldCup2022.csv")
|
220 |
+
|
221 |
+
# Interactive widgets
|
222 |
+
st.sidebar.title('Data Exploration Options')
|
223 |
+
|
224 |
+
# Default selection for Team 1
|
225 |
+
default_selected_team1 = ['QATAR']
|
226 |
+
|
227 |
+
# Dropdown menu for team selection (Team 1)
|
228 |
+
selected_teams_team1 = st.sidebar.multiselect('Select Teams (Team 1)', df['team1'].unique(), default=default_selected_team1)
|
229 |
+
|
230 |
+
# Default selection for Team 2
|
231 |
+
default_selected_team2 = ['ECUADOR']
|
232 |
+
|
233 |
+
# Dropdown menu for team selection (Team 2)
|
234 |
+
selected_teams_team2 = st.sidebar.multiselect('Select Teams (Team 2)', df['team2'].unique(), default=default_selected_team2)
|
235 |
+
|
236 |
+
# Filter data based on user selections for both teams
|
237 |
+
filtered_df_team1 = df[df['team1'].isin(selected_teams_team1)]
|
238 |
+
filtered_df_team2 = df[df['team2'].isin(selected_teams_team2)]
|
239 |
+
|
240 |
+
# Combine filtered data for both teams
|
241 |
+
filtered_df = pd.concat([filtered_df_team1, filtered_df_team2])
|
242 |
+
|
243 |
+
# Display interactive report
|
244 |
+
if st.sidebar.button('Show Report'):
|
245 |
+
if filtered_df.empty:
|
246 |
+
st.warning("No data available for the selected teams.")
|
247 |
+
else:
|
248 |
+
# Summary statistics
|
249 |
+
st.subheader("Summary Statistics")
|
250 |
+
st.write(filtered_df.describe())
|
251 |
+
|
252 |
+
# Bar chart for number of goals
|
253 |
+
st.subheader("Number of Goals Comparison")
|
254 |
+
fig_goals = px.bar(filtered_df, x='team1', y='number of goals team1', color='team1', title='Number of Goals Comparison')
|
255 |
+
st.plotly_chart(fig_goals)
|
256 |
+
|
257 |
+
# Histogram for possession
|
258 |
+
st.subheader("Distribution of Possession")
|
259 |
+
fig_possession = px.histogram(filtered_df, x='possession team1', color='team1', nbins=20, title='Possession Distribution')
|
260 |
+
st.plotly_chart(fig_possession)
|
261 |
+
|
262 |
+
|
263 |
+
# Line plot for trends over time (assuming 'date' column represents time)
|
264 |
+
if 'date' in filtered_df.columns:
|
265 |
+
st.subheader("Trends Over Time")
|
266 |
+
fig_trends = px.line(filtered_df, x='date', y='possession team1', color='team1', title='Possession Over Time')
|
267 |
+
st.plotly_chart(fig_trends)
|
268 |
+
|
269 |
+
# Additional statistics and insights
|
270 |
+
st.subheader("Additional Statistics and Insights")
|
271 |
+
# Remove percentage symbols and convert to numeric
|
272 |
+
filtered_df['possession team1'] = filtered_df['possession team1'].str.replace('%', '').astype(float)
|
273 |
+
|
274 |
+
# Create a bar plot for total goals scored, average possession, and average number of goals per game
|
275 |
+
fig, ax = plt.subplots(figsize=(10, 6))
|
276 |
+
|
277 |
+
# Total goals scored
|
278 |
+
total_goals = filtered_df['number of goals team1'].sum()
|
279 |
+
ax.bar("Total Goals Scored", total_goals, color='blue')
|
280 |
+
ax.text("Total Goals Scored", total_goals, f'{total_goals}', ha='center', va='bottom')
|
281 |
+
|
282 |
+
# Average possession
|
283 |
+
avg_possession = filtered_df['possession team1'].mean()
|
284 |
+
ax.bar("Average Possession", avg_possession, color='green')
|
285 |
+
ax.text("Average Possession", avg_possession, f'{avg_possession:.2f}%', ha='center', va='bottom')
|
286 |
+
|
287 |
+
# Average number of goals per game
|
288 |
+
avg_goals_per_game = filtered_df['number of goals team1'].mean()
|
289 |
+
ax.bar("Average Goals Per Game", avg_goals_per_game, color='orange')
|
290 |
+
ax.text("Average Goals Per Game", avg_goals_per_game, f'{avg_goals_per_game:.2f}', ha='center', va='bottom')
|
291 |
+
|
292 |
+
# Set labels and title
|
293 |
+
ax.set_ylabel('Value')
|
294 |
+
ax.set_title('Comparison of Statistics')
|
295 |
+
plt.xticks(rotation=45)
|
296 |
+
plt.tight_layout()
|
297 |
+
|
298 |
+
# Display the plot
|
299 |
+
st.pyplot(fig)
|
300 |
+
# Dynamic data exploration for team 1
|
301 |
+
st.subheader("Dynamic Data Exploration (Team 1)")
|
302 |
+
st.write(filtered_df_team1)
|
303 |
+
|
304 |
+
# Dynamic data exploration for team 2
|
305 |
+
st.subheader("Dynamic Data Exploration (Team 2)")
|
306 |
+
st.write(filtered_df_team2)
|
307 |
+
|
308 |
+
# User Feedback Integration
|
309 |
+
st.sidebar.title('User Feedback')
|
310 |
+
user_email = st.sidebar.text_input("Enter your email address:")
|
311 |
+
feedback = st.sidebar.text_area("Please provide your feedback here:")
|
312 |
+
submit_button = st.sidebar.button("Submit Feedback")
|
313 |
+
if submit_button:
|
314 |
+
# Store feedback in a file or database
|
315 |
+
with open("feedback.txt", "a") as f:
|
316 |
+
f.write("Email: {}\nFeedback: {}\n".format(user_email, feedback))
|
317 |
+
st.sidebar.success("Thank you for your feedback!")
|
318 |
+
|
319 |
+
# Send feedback to email
|
320 |
+
sender_email = user_email # Use user's email as sender
|
321 |
+
receiver_emails = ["jackson.mukeshimana@nyu.edu", "mukesjackson02@gmail.com"] # Update with receiver emails
|
322 |
+
|
323 |
+
# Compose email
|
324 |
+
message = MIMEMultipart()
|
325 |
+
message["From"] = sender_email
|
326 |
+
message["To"] = ", ".join(receiver_emails)
|
327 |
+
message["Subject"] = "User Feedback"
|
328 |
+
|
329 |
+
# Add message body
|
330 |
+
message.attach(MIMEText("User Email: {}\n\nFeedback: {}".format(user_email, feedback), "plain"))
|
331 |
+
|
332 |
+
# Connect to SMTP server and send email
|
333 |
+
with smtplib.SMTP("smtp.gmail.com", 587) as server:
|
334 |
+
server.starttls()
|
335 |
+
server.sendmail(sender_email, receiver_emails, message.as_string())
|
336 |
+
|
337 |
+
st.sidebar.success("Your feedback has been submitted and sent to the admins.")
|
338 |
+
# Convert categorical columns to numeric codes
|
339 |
+
df['team1'] = df['team1'].astype('category').cat.codes
|
340 |
+
df['team2'] = df['team2'].astype('category').cat.codes
|
341 |
+
|
342 |
+
# Remove percentage signs and convert to numeric
|
343 |
+
columns_to_convert = ['possession team1', 'possession team2', 'possession in contest']
|
344 |
+
for column in columns_to_convert:
|
345 |
+
df[column] = df[column].astype(str).str.rstrip('%').astype(float)
|
346 |
+
|
347 |
+
# Convert converted columns to categorical codes
|
348 |
+
for column in columns_to_convert:
|
349 |
+
df[column] = df[column].astype('category').cat.codes
|
350 |
+
|
351 |
+
# Convert other categorical columns to numeric codes
|
352 |
+
columns_to_convert_to_codes = ['date', 'hour', 'category']
|
353 |
+
for column in columns_to_convert_to_codes:
|
354 |
+
df[column] = df[column].astype('category').cat.codes
|
355 |
+
# Display summary statistics
|
356 |
+
st.dataframe(df.describe())
|
357 |
+
|
358 |
+
# Convert 'date' column to datetime
|
359 |
+
df['date'] = pd.to_datetime(df['date'])
|
360 |
+
|
361 |
+
# Missing Values
|
362 |
+
st.markdown("### Missing Values")
|
363 |
+
st.markdown("Let's examine the presence of missing values in our dataset:")
|
364 |
+
|
365 |
+
# Calculate percentage of missing values for each column
|
366 |
+
missing_values = df.isnull().sum() / len(df) * 100
|
367 |
+
|
368 |
+
# Display missing value percentages
|
369 |
+
st.write("Percentage of missing values for each column:")
|
370 |
+
st.write(missing_values)
|
371 |
+
|
372 |
+
# Assess overall completeness of the dataset
|
373 |
+
completeness_ratio = df.notnull().sum().sum() / (len(df) * len(df.columns))
|
374 |
+
st.write(f"Overall completeness ratio: {completeness_ratio:.2f}")
|
375 |
+
|
376 |
+
if completeness_ratio >= 0.85:
|
377 |
+
st.success("The dataset has a high level of completeness, providing us with reliable data for analysis.")
|
378 |
+
else:
|
379 |
+
st.warning("The dataset has a low level of completeness, which may affect the reliability of our analysis.")
|
380 |
+
|
381 |
+
# Conclusion
|
382 |
+
st.markdown("### Recap")
|
383 |
+
st.markdown("In this dashboard page, we explored the FIFA World Cup 2022 dataset. We've seen the key variables like possession, number of goals team1, corners, defensive pressures applied, and more others. We checked also the Cleanliness of our data set and checked any missing values maybe in our data set, for reliability and usability purposes.")
|
384 |
+
|
385 |
+
# Visualization Page
|
386 |
+
elif st.session_state.app_mode == 'Visualization':
|
387 |
+
# Play FIFA World Cup song
|
388 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
389 |
+
st.sidebar.markdown("<p style='font-family: Impact; font-size: 16px; color: #007ACC;'>🎵 Enjoy the below chosen FIFA World Cup song for you! 🎶 Feel free to adjust the volume or stop the song whenever you want. 🎧</p>", unsafe_allow_html=True)
|
390 |
+
|
391 |
+
st.sidebar.audio(audio_fifa_2, format='audio/mp3')
|
392 |
+
|
393 |
+
|
394 |
+
|
395 |
+
# Left sidebar for text
|
396 |
+
st.subheader("Explore visualizations of the FIFA World Cup 2022 data.")
|
397 |
+
st.image(image_quatar2022, width=800)
|
398 |
+
|
399 |
+
# Load the FIFA World Cup 2022 dataset
|
400 |
+
df = pd.read_csv('FIFAWorldCup2022.csv')
|
401 |
+
|
402 |
+
# Convert categorical columns to numeric codes
|
403 |
+
df['team1'] = df['team1'].astype('category').cat.codes
|
404 |
+
df['team2'] = df['team2'].astype('category').cat.codes
|
405 |
+
|
406 |
+
# Remove percentage signs and convert to numeric
|
407 |
+
columns_to_convert = ['possession team1', 'possession team2', 'defensive pressures applied team1', 'passes team2', 'passes completed team2', 'on target attempts team2', 'inbehind offers to receive team2', 'attempted defensive line breaks team2']
|
408 |
+
for column in columns_to_convert:
|
409 |
+
df[column] = df[column].astype(str).str.rstrip('%').astype(float)
|
410 |
+
|
411 |
+
# Convert converted columns to categorical codes
|
412 |
+
for column in columns_to_convert:
|
413 |
+
df[column] = df[column].astype('category').cat.codes
|
414 |
+
|
415 |
+
# Convert other categorical columns to numeric codes
|
416 |
+
columns_to_convert_to_codes = ['date', 'hour', 'category']
|
417 |
+
for column in columns_to_convert_to_codes:
|
418 |
+
df[column] = df[column].astype('category').cat.codes
|
419 |
+
|
420 |
+
# Select independent variables and target variable
|
421 |
+
selected_features = ["assists team2", "attempted defensive line breaks team2", "on target attempts team2", "inbehind offers to receive team2", "possession team2", "passes completed team2", "number of goals team2"]
|
422 |
+
|
423 |
+
# Extract selected columns from the dataset
|
424 |
+
df_selected = df[selected_features]
|
425 |
+
|
426 |
+
# Calculate the correlation matrix
|
427 |
+
corr_matrix = df_selected.corr()
|
428 |
+
|
429 |
+
# Plot the heatmap using Streamlit
|
430 |
+
st.write("## Correlation Heatmap")
|
431 |
+
|
432 |
+
st.markdown("<h3 style='text-align: center; color: #FFFFFF;'>This heatmap illustrates the correlation between selected variables and the number of goals scored by Team 2.</h3>", unsafe_allow_html=True)
|
433 |
+
|
434 |
+
# Add color palette customization
|
435 |
+
color_palette = st.selectbox("Select color palette:", ["coolwarm", "viridis", "magma", "inferno", "plasma"], index=0)
|
436 |
+
cmap = sns.color_palette(color_palette, as_cmap=True)
|
437 |
+
|
438 |
+
# Plot the heatmap
|
439 |
+
fig, ax = plt.subplots()
|
440 |
+
heatmap = sns.heatmap(corr_matrix, annot=True, cmap=cmap, fmt=".2f", ax=ax, square=True, linewidths=0.5, linecolor='black')
|
441 |
+
|
442 |
+
# Set labels and title
|
443 |
+
ax.set_xlabel("Variables")
|
444 |
+
ax.set_ylabel("Variables")
|
445 |
+
ax.set_title("Correlation Heatmap")
|
446 |
+
|
447 |
+
# Show plot
|
448 |
+
st.pyplot(fig)
|
449 |
+
|
450 |
+
|
451 |
+
|
452 |
+
# Define default values for independent and dependent variables
|
453 |
+
scatter_independent_default = 'corners team1'
|
454 |
+
scatter_dependent_default = 'number of goals team1'
|
455 |
+
|
456 |
+
# Interactive Selection: Allow users to select specific variables
|
457 |
+
independent_variable_scatter = st.selectbox("Select Independent Variable", df.columns[:-1], index=df.columns.get_loc(scatter_independent_default) if scatter_independent_default in df.columns else 0, key='scatter_independent')
|
458 |
+
dependent_variable_scatter = st.selectbox("Select Dependent Variable", df.columns[:-1], index=df.columns.get_loc(scatter_dependent_default) if scatter_dependent_default in df.columns else 0, key='scatter_dependent')
|
459 |
+
|
460 |
+
# Check if the selected columns exist and are numeric
|
461 |
+
if independent_variable_scatter in df.columns and dependent_variable_scatter in df.columns:
|
462 |
+
# Convert selected columns to numeric types, ignoring non-numeric values
|
463 |
+
df[independent_variable_scatter] = pd.to_numeric(df[independent_variable_scatter], errors='coerce')
|
464 |
+
df[dependent_variable_scatter] = pd.to_numeric(df[dependent_variable_scatter], errors='coerce')
|
465 |
+
|
466 |
+
# Drop rows with NaN values in the selected columns after conversion
|
467 |
+
df.dropna(subset=[independent_variable_scatter, dependent_variable_scatter], inplace=True)
|
468 |
+
|
469 |
+
# Color Palette Customization: Allow users to choose different color palettes
|
470 |
+
palette_scatter = st.radio("Select Color Palette", ["viridis", "magma", "plasma", "inferno", "coolwarm"], key='color_palette')
|
471 |
+
|
472 |
+
# Create scatter plot
|
473 |
+
fig, ax = plt.subplots()
|
474 |
+
sns.scatterplot(data=df, x=independent_variable_scatter, y=dependent_variable_scatter, ax=ax, palette=palette_scatter)
|
475 |
+
ax.set_xlabel(independent_variable_scatter)
|
476 |
+
ax.set_ylabel(dependent_variable_scatter)
|
477 |
+
ax.set_title(f'{dependent_variable_scatter} vs {independent_variable_scatter}')
|
478 |
+
plt.xticks(rotation=45)
|
479 |
+
plt.tight_layout()
|
480 |
+
|
481 |
+
# Show interactive sorting option
|
482 |
+
if st.checkbox('Sort Variables'):
|
483 |
+
sort_order = st.radio("Select sort order", ["ascending", "descending"], index=1)
|
484 |
+
if sort_order == "ascending":
|
485 |
+
df_sorted = df.sort_values(by=independent_variable_scatter)
|
486 |
+
else:
|
487 |
+
df_sorted = df.sort_values(by=independent_variable_scatter, ascending=False)
|
488 |
+
st.dataframe(df_sorted)
|
489 |
+
|
490 |
+
# Show the scatter plot with a descriptive title
|
491 |
+
st.write(f"## Scatter Plot: {dependent_variable_scatter} vs {independent_variable_scatter}")
|
492 |
+
st.pyplot(fig)
|
493 |
+
|
494 |
+
else:
|
495 |
+
st.write("Selected columns not found in DataFrame or are not numeric.")
|
496 |
+
|
497 |
+
|
498 |
+
# Histogram
|
499 |
+
st.subheader('Histogram')
|
500 |
+
|
501 |
+
# Interactive Selection: Allow users to select specific variables
|
502 |
+
hist_default = 'passes completed team1'
|
503 |
+
independent_variable_hist = st.selectbox("Select Variable", df.columns[:-1], index=df.columns.get_loc(hist_default) if hist_default in df.columns else 0, key='hist_independent')
|
504 |
+
|
505 |
+
# Create histogram
|
506 |
+
fig_hist, ax_hist = plt.subplots()
|
507 |
+
sns.histplot(data=df, x=independent_variable_hist, ax=ax_hist)
|
508 |
+
ax_hist.set_xlabel(independent_variable_hist)
|
509 |
+
ax_hist.set_title(f'Histogram of {independent_variable_hist}')
|
510 |
+
plt.xticks(rotation=45)
|
511 |
+
plt.tight_layout()
|
512 |
+
|
513 |
+
# Show interactive sorting option
|
514 |
+
if st.checkbox('Sort Values'):
|
515 |
+
sort_order_hist = st.radio("Select sort order", ["ascending", "descending"], index=1, key='hist_sort_order')
|
516 |
+
if sort_order_hist == "ascending":
|
517 |
+
df_sorted_hist = df.sort_values(by=independent_variable_hist)
|
518 |
+
else:
|
519 |
+
df_sorted_hist = df.sort_values(by=independent_variable_hist, ascending=False)
|
520 |
+
st.dataframe(df_sorted_hist)
|
521 |
+
|
522 |
+
# Color Palette Customization: Allow users to choose different color palettes
|
523 |
+
palette = st.radio("Select Color Palette", ["viridis", "magma", "plasma", "inferno", "coolwarm"], key='hist_color_palette')
|
524 |
+
sns.set_palette(palette)
|
525 |
+
st.pyplot(fig_hist)
|
526 |
+
|
527 |
+
import streamlit as st
|
528 |
+
import pandas as pd
|
529 |
+
import seaborn as sns
|
530 |
+
import matplotlib.pyplot as plt
|
531 |
+
|
532 |
+
# Assuming df is your DataFrame
|
533 |
+
# df = pd.DataFrame(...)
|
534 |
+
|
535 |
+
# Define the play_sound function
|
536 |
+
def play_sound():
|
537 |
+
st.audio("sound_effect.mp3", format="audio/mp3")
|
538 |
+
|
539 |
+
# Function to generate the box plot
|
540 |
+
def generate_box_plot(selected_variable):
|
541 |
+
fig_box, ax_box = plt.subplots()
|
542 |
+
sns.boxplot(data=df, x=selected_variable, ax=ax_box)
|
543 |
+
ax_box.set_xlabel(selected_variable)
|
544 |
+
ax_box.set_title(f'Box Plot of {selected_variable}')
|
545 |
+
plt.xticks(rotation=45)
|
546 |
+
plt.tight_layout()
|
547 |
+
st.pyplot(fig_box)
|
548 |
+
|
549 |
+
# Main code
|
550 |
+
st.subheader('Box Plot')
|
551 |
+
|
552 |
+
# Interactive Selection: Allow users to select specific variables
|
553 |
+
box_default = 'defensive pressures applied team1'
|
554 |
+
index_box_default = df.columns.get_loc(box_default) if box_default in df.columns else 0
|
555 |
+
index_box = min(index_box_default, len(df.columns[:-1]) - 1)
|
556 |
+
independent_variable_box = st.selectbox("Select Variable", df.columns[:-1], index=index_box, key='box_independent')
|
557 |
+
|
558 |
+
# Check if the index is within the range of options
|
559 |
+
if index_box < len(df.columns[:-1]):
|
560 |
+
# Call the function to generate the box plot
|
561 |
+
generate_box_plot(independent_variable_box)
|
562 |
+
|
563 |
+
# Color Palette Customization: Allow users to choose different color palettes
|
564 |
+
color_palette_key = 'color_palette_box'
|
565 |
+
color_palette = st.selectbox("Select color palette:", ["coolwarm", "viridis", "magma", "inferno", "plasma"], index=0, key=color_palette_key)
|
566 |
+
cmap = sns.color_palette(color_palette, as_cmap=True)
|
567 |
+
|
568 |
+
# Show interactive sorting option
|
569 |
+
sort_values_checkbox_key = 'sort_values_checkbox_box'
|
570 |
+
if st.checkbox('Sort Values', key=sort_values_checkbox_key):
|
571 |
+
sort_order_box = st.radio("Select sort order", ["ascending", "descending"], index=1, key='sort_order_box')
|
572 |
+
if sort_order_box == "ascending":
|
573 |
+
df_sorted_box = df.sort_values(by=independent_variable_box)
|
574 |
+
else:
|
575 |
+
df_sorted_box = df.sort_values(by=independent_variable_box, ascending=False)
|
576 |
+
st.dataframe(df_sorted_box)
|
577 |
+
|
578 |
+
# Dynamic Thresholding: Allow users to adjust threshold for displaying box plot
|
579 |
+
min_val = float(df[independent_variable_box].min()) # Cast min value to float
|
580 |
+
max_val = float(df[independent_variable_box].max()) # Cast max value to float
|
581 |
+
mean_val = df[independent_variable_box].mean() # No need to cast mean value, it's already float
|
582 |
+
threshold_box = st.slider('Threshold for Box Plot', min_value=min_val, max_value=max_val, value=mean_val)
|
583 |
+
|
584 |
+
# Play sound effect when plot is generated
|
585 |
+
if st.button("Generate Box Plot"):
|
586 |
+
play_sound()
|
587 |
+
|
588 |
+
else:
|
589 |
+
st.warning("No valid variable selected for the box plot.")
|
590 |
+
|
591 |
+
|
592 |
+
# Bar plot
|
593 |
+
st.subheader('Bar Plot')
|
594 |
+
|
595 |
+
# Interactive Selection: Allow users to select specific variables
|
596 |
+
bar_independent_default = 'free kicks team2'
|
597 |
+
bar_dependent_default = 'number of goals team2'
|
598 |
+
independent_variable_bar = st.selectbox("Select Independent Variable", df.columns[:-1], index=df.columns.get_loc(bar_independent_default) if bar_independent_default in df.columns else 0, key='bar_independent')
|
599 |
+
dependent_variable_bar = st.selectbox("Select Dependent Variable", df.columns[:-1], index=df.columns.get_loc(bar_dependent_default) if bar_dependent_default in df.columns else 0, key='bar_dependent')
|
600 |
+
|
601 |
+
# Color Palette Customization: Allow users to choose different color palettes
|
602 |
+
palette_bar = st.radio("Select Color Palette", ["viridis", "magma", "plasma", "inferno", "coolwarm"], key='bar_color_palette')
|
603 |
+
|
604 |
+
# Create bar plot function
|
605 |
+
def create_bar_plot(data, x, y, palette):
|
606 |
+
fig_bar, ax_bar = plt.subplots()
|
607 |
+
sns.barplot(data=data, x=x, y=y, ax=ax_bar, palette=palette)
|
608 |
+
ax_bar.set_xlabel(x)
|
609 |
+
ax_bar.set_ylabel(y)
|
610 |
+
ax_bar.set_title(f'Bar Plot of {y} vs {x}')
|
611 |
+
plt.xticks(rotation=45)
|
612 |
+
plt.tight_layout()
|
613 |
+
st.pyplot(fig_bar)
|
614 |
+
|
615 |
+
# Display initial bar plot
|
616 |
+
create_bar_plot(df, independent_variable_bar, dependent_variable_bar, palette_bar)
|
617 |
+
|
618 |
+
# Show interactive sorting option
|
619 |
+
if st.checkbox('Sort Values', key='sort_checkbox'):
|
620 |
+
sort_order_bar = st.radio("Select sort order", ["ascending", "descending"], index=1, key='sort_order_radio')
|
621 |
+
if sort_order_bar == "ascending":
|
622 |
+
df_sorted_bar = df.sort_values(by=dependent_variable_bar)
|
623 |
+
else:
|
624 |
+
df_sorted_bar = df.sort_values(by=dependent_variable_bar, ascending=False)
|
625 |
+
create_bar_plot(df_sorted_bar, independent_variable_bar, dependent_variable_bar, palette_bar)
|
626 |
+
|
627 |
+
# Dynamic Thresholding: Allow users to adjust threshold for displaying bar plot
|
628 |
+
min_value_bar = float(df[dependent_variable_bar].min()) # Convert min_value to float
|
629 |
+
max_value_bar = float(df[dependent_variable_bar].max()) # Convert max_value to float
|
630 |
+
value_bar = float(df[dependent_variable_bar].mean()) # Convert value to float
|
631 |
+
step_bar = 0.1 # Set step as a float
|
632 |
+
threshold_bar = st.slider('Threshold for Bar Plot', min_value=min_value_bar, max_value=max_value_bar, value=value_bar, step=step_bar, key='threshold_slider')
|
633 |
+
|
634 |
+
# Play sound effect when plot is generated
|
635 |
+
if st.button("Generate Bar Plot"):
|
636 |
+
play_sound()
|
637 |
+
|
638 |
+
import random # Import the random module
|
639 |
+
|
640 |
+
# Additional graphs
|
641 |
+
st.subheader('Additional Graphs')
|
642 |
+
st.markdown("Extra graphs based on picked variables from the dataset (Pick Yours to Explore as well!):")
|
643 |
+
|
644 |
+
# Plot 1: On Target Attempts Team1 vs Number of Goals of Team1 (Scatter Plot)
|
645 |
+
additional_independent_default_1 = 'on target attempts team1'
|
646 |
+
additional_dependent_default_1 = 'number of goals team1'
|
647 |
+
additional_independent_variable_1 = st.selectbox("Select Independent Variable", df.columns[:-1], index=df.columns.get_loc(additional_independent_default_1) if additional_independent_default_1 in df.columns else 0, key='additional_independent_1')
|
648 |
+
additional_dependent_variable_1 = st.selectbox("Select Dependent Variable", df.columns[:-1], index=df.columns.get_loc(additional_dependent_default_1) if additional_dependent_default_1 in df.columns else 0, key='additional_dependent_1')
|
649 |
+
fig1, ax1 = plt.subplots()
|
650 |
+
sns.scatterplot(data=df, x=additional_independent_variable_1, y=additional_dependent_variable_1, ax=ax1)
|
651 |
+
ax1.set_xlabel(additional_independent_variable_1)
|
652 |
+
ax1.set_ylabel(additional_dependent_variable_1)
|
653 |
+
ax1.set_title(f'{additional_dependent_variable_1} vs {additional_independent_variable_1}')
|
654 |
+
plt.xticks(rotation=45)
|
655 |
+
plt.tight_layout()
|
656 |
+
|
657 |
+
# Dynamic Thresholding: Allow users to adjust threshold for displaying scatter plot
|
658 |
+
min_val_1 = float(df[additional_dependent_variable_1].min())
|
659 |
+
max_val_1 = float(df[additional_dependent_variable_1].max())
|
660 |
+
mean_val_1 = float(df[additional_dependent_variable_1].mean())
|
661 |
+
step_val_1 = (max_val_1 - min_val_1) / 100 # Adjust step value
|
662 |
+
threshold_scatter_1 = st.slider('Threshold for Scatter Plot', min_value=min_val_1, max_value=max_val_1, value=mean_val_1, step=step_val_1, format="%.2f")
|
663 |
+
|
664 |
+
st.pyplot(fig1)
|
665 |
+
|
666 |
+
# Plot 2: Assists vs Number of Goals (Line Plot)
|
667 |
+
additional_independent_default_2 = 'assists team2'
|
668 |
+
additional_dependent_default_2 = 'number of goals team2'
|
669 |
+
additional_independent_variable_2 = st.selectbox("Select Independent Variable", df.columns[:-1], index=df.columns.get_loc(additional_independent_default_2) if additional_independent_default_2 in df.columns else 0, key='additional_independent_2')
|
670 |
+
additional_dependent_variable_2 = st.selectbox("Select Dependent Variable", df.columns[:-1], index=df.columns.get_loc(additional_dependent_default_2) if additional_dependent_default_2 in df.columns else 0, key='additional_dependent_2')
|
671 |
+
|
672 |
+
# Check if data for the selected variables is available in the DataFrame
|
673 |
+
if additional_independent_variable_2 in df.columns and additional_dependent_variable_2 in df.columns:
|
674 |
+
fig2, ax2 = plt.subplots()
|
675 |
+
sns.lineplot(data=df, x=additional_independent_variable_2, y=additional_dependent_variable_2, ax=ax2)
|
676 |
+
ax2.set_xlabel(additional_independent_variable_2)
|
677 |
+
ax2.set_ylabel(additional_dependent_variable_2)
|
678 |
+
ax2.set_title(f'{additional_dependent_variable_2} vs {additional_independent_variable_2}')
|
679 |
+
plt.xticks(rotation=45)
|
680 |
+
plt.tight_layout()
|
681 |
+
|
682 |
+
# Display the plot
|
683 |
+
st.pyplot(fig2)
|
684 |
+
else:
|
685 |
+
st.warning("Selected variables not found in the dataset. Please make sure to select valid variables.")
|
686 |
+
|
687 |
+
# Interactive Sorting: Allow users to sort variables based on correlation values
|
688 |
+
if st.checkbox('Interactive Sorting'):
|
689 |
+
sort_order = st.radio("Select sort order", ["ascending", "descending"], index=1)
|
690 |
+
if sort_order == "ascending":
|
691 |
+
df_sorted = df.sort_values(by=additional_independent_variable_2)
|
692 |
+
else:
|
693 |
+
df_sorted = df.sort_values(by=additional_independent_variable_2, ascending=False)
|
694 |
+
st.dataframe(df_sorted)
|
695 |
+
|
696 |
+
# Additional Fun Facts
|
697 |
+
show_fun_facts = st.button("Show Fun Facts")
|
698 |
+
if show_fun_facts:
|
699 |
+
st.session_state.show_fun_facts = True
|
700 |
+
|
701 |
+
if "show_fun_facts" not in st.session_state:
|
702 |
+
st.session_state.show_fun_facts = False
|
703 |
+
|
704 |
+
if st.session_state.show_fun_facts:
|
705 |
+
with st.expander("", expanded=True):
|
706 |
+
expander_title = "<h2 style='font-family: Arial; font-size: 20px;'>Additional Fun Facts</h2>"
|
707 |
+
st.markdown(expander_title, unsafe_allow_html=True)
|
708 |
+
fun_facts = [
|
709 |
+
"The fastest goal in FIFA World Cup history was scored by Hakan Şükür of Turkey in 2002, just 11 seconds into the match!",
|
710 |
+
"Brazil holds the record for the most FIFA World Cup titles, with a total of 5 wins.",
|
711 |
+
"The 2022 FIFA World Cup final was held at the Lusail Iconic Stadium in Qatar, which has a seating capacity of 80,000 people."
|
712 |
+
]
|
713 |
+
|
714 |
+
# Display additional fun facts with numbers and bold formatting
|
715 |
+
for i, fact in enumerate(fun_facts, 1):
|
716 |
+
st.markdown(f"<p style='font-family: Arial; font-size: 16px; color: #6495ED;'><strong>{i}. </strong>{fact}</p>", unsafe_allow_html=True)
|
717 |
+
|
718 |
+
# Conclusion and Surprise Element
|
719 |
+
show_conclusion = st.button("Show Conclusion and Surprise Element")
|
720 |
+
if show_conclusion:
|
721 |
+
st.subheader("Conclusion")
|
722 |
+
st.write("Congratulations! You've explored a variety of visualizations and interactive features to gain insights from the FIFA World Cup 2022 dataset. But wait, there's more!")
|
723 |
+
|
724 |
+
# Surprise Element: Random Fun Fact
|
725 |
+
random_fact = "Did you know that the FIFA World Cup trophy weighs about 6.175 kilograms (13.61 pounds)?"
|
726 |
+
st.markdown(f"<p style='font-family: Georgia; color: #FF0000;'>Here's a random fun fact: {random_fact}</p>", unsafe_allow_html=True)
|
727 |
+
|
728 |
+
|
729 |
+
|
730 |
+
elif st.session_state.app_mode == 'Prediction':
|
731 |
+
st.subheader("Prediction")
|
732 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
733 |
+
|
734 |
+
|
735 |
+
st.sidebar.markdown("<p style='font-family: Impact; font-size: 16px; color: #007ACC;'>🎵 Enjoy the below chosen FIFA World Cup song for you! 🎶 Feel free to adjust the volume or stop the song whenever you want. 🎧</p>", unsafe_allow_html=True)
|
736 |
+
|
737 |
+
st.sidebar.audio(audio_fifa_4, format='audio/mp3')
|
738 |
+
st.image(image_featured, use_column_width=True)
|
739 |
+
st.title("FIFA World Cup 2022 Data Analysis - Prediction")
|
740 |
+
st.markdown("Select a machine learning model and variables to predict outcomes.")
|
741 |
+
|
742 |
+
# Load the dataset
|
743 |
+
df = pd.read_csv('FIFAWorldCup2022.csv')
|
744 |
+
|
745 |
+
# Convert categorical columns to numeric codes
|
746 |
+
df['team1'] = df['team1'].astype('category').cat.codes
|
747 |
+
df['team2'] = df['team2'].astype('category').cat.codes
|
748 |
+
|
749 |
+
# Remove percentage signs and convert to numeric
|
750 |
+
columns_to_convert = ['possession team1', 'possession team2', 'possession in contest']
|
751 |
+
for column in columns_to_convert:
|
752 |
+
df[column] = df[column].astype(str).str.rstrip('%').astype(float)
|
753 |
+
|
754 |
+
# Convert converted columns to categorical codes
|
755 |
+
for column in columns_to_convert:
|
756 |
+
df[column] = df[column].astype('category').cat.codes
|
757 |
+
|
758 |
+
# Convert other categorical columns to numeric codes
|
759 |
+
columns_to_convert_to_codes = ['date', 'hour', 'category']
|
760 |
+
for column in columns_to_convert_to_codes:
|
761 |
+
df[column] = df[column].astype('category').cat.codes
|
762 |
+
|
763 |
+
# Set dependent variable
|
764 |
+
selected_target = 'number of goals team2'
|
765 |
+
|
766 |
+
# Set default independent variables
|
767 |
+
default_independent_variables = ["assists team2", "attempts inside the penalty area team2", "offsides team2"]
|
768 |
+
|
769 |
+
# Calculate correlation with the dependent variable
|
770 |
+
corr_with_target = df.corr()[selected_target].abs()
|
771 |
+
|
772 |
+
# Filter out independent variables with correlation > 0.1
|
773 |
+
filtered_features = corr_with_target[corr_with_target > 0.1].index.tolist()
|
774 |
+
|
775 |
+
# Ensure default values exist in available options
|
776 |
+
default_features = [feat for feat in default_independent_variables if feat in filtered_features]
|
777 |
+
|
778 |
+
# Features and target variable selection
|
779 |
+
selected_features = st.multiselect("Select Independent Variables", filtered_features, default=default_features)
|
780 |
+
|
781 |
+
# Machine learning model selection
|
782 |
+
selected_models = st.multiselect("Select Model(s)", ['Linear Regression', 'Random Forest', 'Gradient Boosting'], default=['Linear Regression'])
|
783 |
+
|
784 |
+
# Custom hyperparameters for selected models
|
785 |
+
custom_hyperparameters = {}
|
786 |
+
for model in selected_models:
|
787 |
+
if model == 'Random Forest':
|
788 |
+
custom_hyperparameters['Random Forest'] = {
|
789 |
+
'n_estimators': st.number_input("Number of Estimators (Random Forest)", min_value=10, max_value=1000, value=100, step=10)
|
790 |
+
}
|
791 |
+
elif model == 'Gradient Boosting':
|
792 |
+
custom_hyperparameters['Gradient Boosting'] = {
|
793 |
+
'n_estimators': st.number_input("Number of Estimators (Gradient Boosting)", min_value=10, max_value=1000, value=100, step=10),
|
794 |
+
'learning_rate': st.number_input("Learning Rate (Gradient Boosting)", min_value=0.01, max_value=1.0, value=0.1, step=0.01)
|
795 |
+
}
|
796 |
+
|
797 |
+
if not selected_features:
|
798 |
+
st.warning("Please select at least one independent variable.")
|
799 |
+
else:
|
800 |
+
# Extract selected columns from the dataset
|
801 |
+
df_selected = df[selected_features + [selected_target]]
|
802 |
+
|
803 |
+
# Remove rows with missing values
|
804 |
+
df_selected = df_selected.dropna()
|
805 |
+
|
806 |
+
if df_selected.empty:
|
807 |
+
st.warning("No data available after removing rows with missing values. Please choose different variables.")
|
808 |
+
else:
|
809 |
+
# Check if selected variables have numeric data
|
810 |
+
numeric_columns = df_selected.select_dtypes(include=['float', 'int']).columns
|
811 |
+
|
812 |
+
if len(numeric_columns) != len(selected_features) + 1: # Check if all selected variables are numeric
|
813 |
+
non_numeric_variables = [var for var in selected_features + [selected_target] if var not in numeric_columns]
|
814 |
+
st.error(f"The following selected variables contain non-numeric values: {', '.join(non_numeric_variables)}")
|
815 |
+
else:
|
816 |
+
X = df_selected[selected_features]
|
817 |
+
y = df_selected[selected_target]
|
818 |
+
|
819 |
+
# Split data into training and testing sets
|
820 |
+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
821 |
+
|
822 |
+
# Guiding message
|
823 |
+
st.info("Select a machine learning model.")
|
824 |
+
|
825 |
+
# Display dependent variable with enhanced style
|
826 |
+
st.markdown(f"<p style='font-size: 18px; color: #3366ff; font-weight: bold;'>Dependent Variable to Predict: {selected_target}</p>", unsafe_allow_html=True)
|
827 |
+
|
828 |
+
for model in selected_models:
|
829 |
+
st.subheader(f"{model} Model")
|
830 |
+
|
831 |
+
if model == 'Linear Regression':
|
832 |
+
# Linear Regression model implementation
|
833 |
+
try:
|
834 |
+
# Train the model
|
835 |
+
model = LinearRegression()
|
836 |
+
model.fit(X_train, y_train)
|
837 |
+
|
838 |
+
# Make predictions
|
839 |
+
y_pred = model.predict(X_test)
|
840 |
+
|
841 |
+
# Evaluate the model
|
842 |
+
r2 = r2_score(y_test, y_pred)
|
843 |
+
mse = mean_squared_error(y_test, y_pred)
|
844 |
+
|
845 |
+
# Model Performance Visualization
|
846 |
+
st.subheader("Model Performance Visualization")
|
847 |
+
|
848 |
+
# Create histogram data
|
849 |
+
hist_data = [y_test, y_pred]
|
850 |
+
group_labels = ['Actual', 'Predicted']
|
851 |
+
|
852 |
+
# Create the histogram using Plotly
|
853 |
+
fig_pred_actual_hist = ff.create_distplot(hist_data, group_labels, bin_size=0.5, colors=['blue', 'orange'])
|
854 |
+
|
855 |
+
# Update layout with enhanced features
|
856 |
+
fig_pred_actual_hist.update_layout(
|
857 |
+
title='Predicted vs Actual Histogram',
|
858 |
+
xaxis_title='Values',
|
859 |
+
yaxis_title='Frequency',
|
860 |
+
showlegend=True,
|
861 |
+
plot_bgcolor='rgba(255, 255, 255, 0.9)', # Set background color
|
862 |
+
template='plotly_white', # Use white template for better contrast
|
863 |
+
width=800, # Increase default width of the chart
|
864 |
+
height=600, # Increase default height of the chart
|
865 |
+
)
|
866 |
+
|
867 |
+
# Add buttons for interactivity
|
868 |
+
fig_pred_actual_hist.update_layout(
|
869 |
+
updatemenus=[
|
870 |
+
{
|
871 |
+
'buttons': [
|
872 |
+
{
|
873 |
+
'args': [None, {'frame': {'duration': 500, 'redraw': True}, 'fromcurrent': True}],
|
874 |
+
'label': 'Play',
|
875 |
+
'method': 'animate'
|
876 |
+
},
|
877 |
+
{
|
878 |
+
'args': [[None], {'frame': {'duration': 0, 'redraw': True}, 'mode': 'immediate', 'transition': {'duration': 0}}],
|
879 |
+
'label': 'Pause',
|
880 |
+
'method': 'animate'
|
881 |
+
}
|
882 |
+
],
|
883 |
+
'direction': 'left',
|
884 |
+
'pad': {'r': 10, 't': 10},
|
885 |
+
'showactive': False,
|
886 |
+
'type': 'buttons',
|
887 |
+
'x': 0.05, # Adjust position of the buttons
|
888 |
+
'xanchor': 'right',
|
889 |
+
'y': 1.1, # Adjust position of the buttons
|
890 |
+
'yanchor': 'top'
|
891 |
+
},
|
892 |
+
{
|
893 |
+
'buttons': [
|
894 |
+
{'args': [None, {'xaxis': {'type': 'linear'}, 'yaxis': {'type': 'linear'}}], 'label': 'Reset Zoom', 'method': 'relayout'}
|
895 |
+
],
|
896 |
+
'direction': 'down',
|
897 |
+
'showactive': False,
|
898 |
+
'type': 'buttons',
|
899 |
+
'x': 0.05, # Adjust position of the buttons
|
900 |
+
'xanchor': 'right',
|
901 |
+
'y': 1.05, # Adjust position of the buttons
|
902 |
+
'yanchor': 'top'
|
903 |
+
}
|
904 |
+
]
|
905 |
+
)
|
906 |
+
|
907 |
+
# Display the histogram
|
908 |
+
st.plotly_chart(fig_pred_actual_hist)
|
909 |
+
|
910 |
+
|
911 |
+
|
912 |
+
# Display model performance metrics
|
913 |
+
st.subheader("Model Performance Metrics")
|
914 |
+
st.write(f"{model} Model Performance:")
|
915 |
+
st.write(f"R-squared: {r2:.2f}")
|
916 |
+
st.write(f"Mean Squared Error: {mse:.2f}")
|
917 |
+
|
918 |
+
st.write("Interpretation:")
|
919 |
+
if r2 >= 0.7:
|
920 |
+
st.info(f"R-squared of {r2:.2f} shows that the model explains a large proportion of the variance in the dependent variable, indicating a strong relationship between the selected features and the number of goals of the team.")
|
921 |
+
elif r2 >= 0.5:
|
922 |
+
st.warning(f"R-squared of {r2:.2f} shows that the model explains a moderate proportion of the variance in the dependent variable, suggesting a moderate relationship between the selected features and the number of goals of the team.")
|
923 |
+
else:
|
924 |
+
st.error(f"R-squared of {r2:.2f} shows that the model does not explain much of the variance in the dependent variable, indicating a weak relationship between the selected features and the number of goals of the team.")
|
925 |
+
|
926 |
+
# Check if R-squared is less than zero
|
927 |
+
if r2 < 0:
|
928 |
+
st.error("R-squared is less than zero. There may be an issue with the chosen variable in the dataset. Please consider removing this variable.")
|
929 |
+
|
930 |
+
except ValueError as e:
|
931 |
+
st.error(f"Error: {e}. Please ensure all selected variables are numeric.")
|
932 |
+
|
933 |
+
elif model == 'Random Forest':
|
934 |
+
# Random Forest model implementation with custom hyperparameters
|
935 |
+
try:
|
936 |
+
# Train the model with custom hyperparameters
|
937 |
+
n_estimators = custom_hyperparameters['Random Forest']['n_estimators']
|
938 |
+
model = RandomForestRegressor(n_estimators=n_estimators)
|
939 |
+
model.fit(X_train, y_train)
|
940 |
+
|
941 |
+
# Make predictions
|
942 |
+
y_pred = model.predict(X_test)
|
943 |
+
|
944 |
+
# Evaluate the model
|
945 |
+
r2 = r2_score(y_test, y_pred)
|
946 |
+
mse = mean_squared_error(y_test, y_pred)
|
947 |
+
|
948 |
+
# Create scatter plot data
|
949 |
+
scatter_data = go.Scatter(x=y_test, y=y_pred, mode='markers', name='Predicted vs Actual', marker=dict(color='orange'))
|
950 |
+
|
951 |
+
# Create perfect prediction line data
|
952 |
+
perfect_line = go.Scatter(x=[y_test.min(), y_test.max()], y=[y_test.min(), y_test.max()], mode='lines', name='Perfect Prediction', line=dict(color='blue', dash='dash'))
|
953 |
+
|
954 |
+
# Create the figure
|
955 |
+
fig_rf = go.Figure(data=[scatter_data, perfect_line])
|
956 |
+
|
957 |
+
# Update layout with enhanced features
|
958 |
+
fig_rf.update_layout(
|
959 |
+
title='Random Forest: Predicted vs Actual',
|
960 |
+
xaxis_title='Actual',
|
961 |
+
yaxis_title='Predicted',
|
962 |
+
showlegend=True,
|
963 |
+
plot_bgcolor='rgba(255, 255, 255, 0.9)', # Set background color
|
964 |
+
xaxis=dict(showgrid=True, gridcolor='lightgray'), # Show gridlines on x-axis
|
965 |
+
yaxis=dict(showgrid=True, gridcolor='lightgray'), # Show gridlines on y-axis
|
966 |
+
hovermode='closest', # Set hover mode to show closest data point
|
967 |
+
template='plotly_white', # Use white template for better contrast
|
968 |
+
width=900, # Increase default width of the chart
|
969 |
+
height=700, # Increase default height of the chart
|
970 |
+
)
|
971 |
+
|
972 |
+
# Add buttons for interactivity
|
973 |
+
fig_rf.update_layout(
|
974 |
+
updatemenus=[
|
975 |
+
{
|
976 |
+
'buttons': [
|
977 |
+
{'args': [None, {'frame': {'duration': 500, 'redraw': True}, 'fromcurrent': True}], 'label': 'Play', 'method': 'animate'},
|
978 |
+
{'args': [[None], {'frame': {'duration': 0, 'redraw': True}, 'mode': 'immediate', 'transition': {'duration': 0}}], 'label': 'Pause', 'method': 'animate'}
|
979 |
+
],
|
980 |
+
'direction': 'left',
|
981 |
+
'pad': {'r': 10, 't': 10},
|
982 |
+
'showactive': False,
|
983 |
+
'type': 'buttons',
|
984 |
+
'x': 0.05, # Adjust position of the buttons
|
985 |
+
'xanchor': 'right',
|
986 |
+
'y': 1.1, # Adjust position of the buttons
|
987 |
+
'yanchor': 'top'
|
988 |
+
},
|
989 |
+
{
|
990 |
+
'buttons': [
|
991 |
+
{'args': [None, {'xaxis': {'type': 'linear'}, 'yaxis': {'type': 'linear'}}], 'label': 'Reset Zoom', 'method': 'relayout'}
|
992 |
+
],
|
993 |
+
'direction': 'down',
|
994 |
+
'showactive': False,
|
995 |
+
'type': 'buttons',
|
996 |
+
'x': 0.05, # Adjust position of the buttons
|
997 |
+
'xanchor': 'right',
|
998 |
+
'y': 1.05, # Adjust position of the buttons
|
999 |
+
'yanchor': 'top'
|
1000 |
+
}
|
1001 |
+
]
|
1002 |
+
)
|
1003 |
+
|
1004 |
+
# Display the scatter plot
|
1005 |
+
st.plotly_chart(fig_rf)
|
1006 |
+
|
1007 |
+
|
1008 |
+
# Display model performance metrics
|
1009 |
+
st.subheader("Model Performance Metrics")
|
1010 |
+
st.write(f"{model} Model Performance:")
|
1011 |
+
st.write(f"R-squared: {r2:.2f}")
|
1012 |
+
st.write(f"Mean Squared Error: {mse:.2f}")
|
1013 |
+
|
1014 |
+
st.write("Interpretation:")
|
1015 |
+
if r2 >= 0.7:
|
1016 |
+
st.info(f"R-squared of {r2:.2f} shows that the model explains a large proportion of the variance in the dependent variable, indicating a strong relationship between the selected features and the number of goals of the team.")
|
1017 |
+
elif r2 >= 0.5:
|
1018 |
+
st.warning(f"R-squared of {r2:.2f} shows that the model explains a moderate proportion of the variance in the dependent variable, suggesting a moderate relationship between the selected features and the number of goals of the team.")
|
1019 |
+
else:
|
1020 |
+
st.error(f"R-squared of {r2:.2f} shows that the model does not explain much of the variance in the dependent variable, indicating a weak relationship between the selected features and the number of goals of the team.")
|
1021 |
+
|
1022 |
+
# Check if R-squared is less than zero
|
1023 |
+
if r2 < 0:
|
1024 |
+
st.error("R-squared is less than zero. There may be an issue with the chosen variable in the dataset. Please consider removing this variable.")
|
1025 |
+
|
1026 |
+
except ValueError as e:
|
1027 |
+
st.error(f"Error: {e}. Please ensure all selected variables are numeric.")
|
1028 |
+
|
1029 |
+
elif model == 'Gradient Boosting':
|
1030 |
+
# Gradient Boosting model implementation with custom hyperparameters
|
1031 |
+
try:
|
1032 |
+
# Train the model with custom hyperparameters
|
1033 |
+
n_estimators = custom_hyperparameters['Gradient Boosting']['n_estimators']
|
1034 |
+
learning_rate = custom_hyperparameters['Gradient Boosting']['learning_rate']
|
1035 |
+
model = GradientBoostingRegressor(n_estimators=n_estimators, learning_rate=learning_rate)
|
1036 |
+
model.fit(X_train, y_train)
|
1037 |
+
|
1038 |
+
# Make predictions
|
1039 |
+
y_pred = model.predict(X_test)
|
1040 |
+
|
1041 |
+
# Evaluate the model
|
1042 |
+
r2 = r2_score(y_test, y_pred)
|
1043 |
+
mse = mean_squared_error(y_test, y_pred)
|
1044 |
+
|
1045 |
+
|
1046 |
+
|
1047 |
+
|
1048 |
+
# Create a 3D scatter plot using Plotly
|
1049 |
+
fig = go.Figure(data=[go.Scatter3d(
|
1050 |
+
x=y_test,
|
1051 |
+
y=y_pred,
|
1052 |
+
z=X_test['assists team2'], # Use a feature as the third dimension for added insight
|
1053 |
+
mode='markers',
|
1054 |
+
marker=dict(
|
1055 |
+
size=5,
|
1056 |
+
color=X_test['assists team2'], # Color points by a feature
|
1057 |
+
colorscale='Viridis', # Choose a color scale
|
1058 |
+
opacity=0.8
|
1059 |
+
)
|
1060 |
+
)])
|
1061 |
+
|
1062 |
+
# Update layout for better presentation
|
1063 |
+
fig.update_layout(
|
1064 |
+
scene=dict(
|
1065 |
+
xaxis_title='Actual Goals of Team',
|
1066 |
+
yaxis_title='Predicted Goals of Team',
|
1067 |
+
zaxis_title='Assists of Team', # Update axis titles
|
1068 |
+
bgcolor='rgba(139, 69, 19, 0.8)', # Set brown background color of the 3D scene
|
1069 |
+
),
|
1070 |
+
title=dict(text='Gradient Boosting: Actual vs Predicted Goals of Teams', y=0.95), # Adjust title position
|
1071 |
+
paper_bgcolor='rgba(139, 69, 19, 0.8)', # Set brown background color of the plot area
|
1072 |
+
plot_bgcolor='rgba(139, 69, 19, 0.8)', # Set brown background color of the plot
|
1073 |
+
width=900, # Increase default width of the chart
|
1074 |
+
height=700, # Increase default height of the chart
|
1075 |
+
margin=dict(l=0, r=0, b=50, t=50), # Adjust margins for better layout
|
1076 |
+
)
|
1077 |
+
|
1078 |
+
# Add buttons for interactivity
|
1079 |
+
fig.update_layout(
|
1080 |
+
updatemenus=[
|
1081 |
+
{
|
1082 |
+
'buttons': [
|
1083 |
+
{'args': [None, {'frame': {'duration': 500, 'redraw': True}, 'fromcurrent': True}], 'label': 'Play', 'method': 'animate'},
|
1084 |
+
{'args': [[None], {'frame': {'duration': 0, 'redraw': True}, 'mode': 'immediate', 'transition': {'duration': 0}}], 'label': 'Pause', 'method': 'animate'}
|
1085 |
+
],
|
1086 |
+
'direction': 'left',
|
1087 |
+
'pad': {'r': 10, 't': 10},
|
1088 |
+
'showactive': False,
|
1089 |
+
'type': 'buttons',
|
1090 |
+
'x': 0.05, # Adjust position of the buttons
|
1091 |
+
'xanchor': 'right',
|
1092 |
+
'y': 0.9, # Adjust position of the buttons
|
1093 |
+
'yanchor': 'top'
|
1094 |
+
},
|
1095 |
+
{
|
1096 |
+
'buttons': [
|
1097 |
+
{'args': [None, {'xaxis': {'type': 'linear'}, 'yaxis': {'type': 'linear'}}], 'label': 'Reset Zoom', 'method': 'relayout'}
|
1098 |
+
],
|
1099 |
+
'direction': 'down',
|
1100 |
+
'showactive': False,
|
1101 |
+
'type': 'buttons',
|
1102 |
+
'x': 0.05, # Adjust position of the buttons
|
1103 |
+
'xanchor': 'right',
|
1104 |
+
'y': 0.85, # Adjust position of the buttons
|
1105 |
+
'yanchor': 'top'
|
1106 |
+
}
|
1107 |
+
]
|
1108 |
+
)
|
1109 |
+
|
1110 |
+
# Display the plot
|
1111 |
+
st.plotly_chart(fig)
|
1112 |
+
|
1113 |
+
|
1114 |
+
|
1115 |
+
# Display model performance metrics
|
1116 |
+
st.subheader("Model Performance Metrics")
|
1117 |
+
st.write(f"{model} Model Performance:")
|
1118 |
+
st.write(f"R-squared: {r2:.2f}")
|
1119 |
+
st.write(f"Mean Squared Error: {mse:.2f}")
|
1120 |
+
|
1121 |
+
st.write("Interpretation:")
|
1122 |
+
if r2 >= 0.7:
|
1123 |
+
st.info(f"R-squared of {r2:.2f} shows that the model explains a large proportion of the variance in the dependent variable, indicating a strong relationship between the selected features and the number of goals of the team.")
|
1124 |
+
elif r2 >= 0.5:
|
1125 |
+
st.warning(f"R-squared of {r2:.2f} shows that the model explains a moderate proportion of the variance in the dependent variable, suggesting a moderate relationship between the selected features and the number of goals of the team.")
|
1126 |
+
else:
|
1127 |
+
st.error(f"R-squared of {r2:.2f} shows that the model does not explain much of the variance in the dependent variable, indicating a weak relationship between the selected features and the number of goals of the team.")
|
1128 |
+
|
1129 |
+
# Check if R-squared is less than zero
|
1130 |
+
if r2 < 0:
|
1131 |
+
st.error("R-squared is less than zero. There may be an issue with the chosen variable in the dataset. Please consider removing this variable.")
|
1132 |
+
|
1133 |
+
except ValueError as e:
|
1134 |
+
st.error(f"Error: {e}. Please ensure all selected variables are numeric.")
|
1135 |
+
|
1136 |
+
|
1137 |
+
elif st.session_state.app_mode == 'Feature of Importance & Shap':
|
1138 |
+
st.subheader("Features of Importance & Shap")
|
1139 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
1140 |
+
st.sidebar.markdown("<p style='font-family: Impact; font-size: 16px; color: #007ACC;'>🎵 Enjoy the below chosen FIFA World Cup song for you! 🎶 Feel free to adjust the volume or stop the song whenever you want. 🎧</p>", unsafe_allow_html=True)
|
1141 |
+
|
1142 |
+
st.sidebar.audio(audio_fifa_5, format='audio/mp3')
|
1143 |
+
|
1144 |
+
st.image(image_F, width=800)
|
1145 |
+
|
1146 |
+
st.title("Feature of Importance & Shap")
|
1147 |
+
df = pd.read_csv('FIFAWorldCup2022.csv')
|
1148 |
+
|
1149 |
+
# Preprocess the data
|
1150 |
+
df['team1'] = df['team1'].astype('category').cat.codes
|
1151 |
+
df['team2'] = df['team2'].astype('category').cat.codes
|
1152 |
+
columns_to_convert = ['possession team1', 'possession team2', 'possession in contest']
|
1153 |
+
for column in columns_to_convert:
|
1154 |
+
df[column] = df[column].str.rstrip('%').astype(float).astype('category').cat.codes
|
1155 |
+
columns_to_convert_to_codes = ['date', 'hour', 'category']
|
1156 |
+
for column in columns_to_convert_to_codes:
|
1157 |
+
df[column] = df[column].astype('category').cat.codes
|
1158 |
+
|
1159 |
+
# Split the data into features and target
|
1160 |
+
X = df.drop(columns=['number of goals team2'])
|
1161 |
+
y = df['number of goals team2']
|
1162 |
+
|
1163 |
+
# Train the model
|
1164 |
+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=1)
|
1165 |
+
rfc_tuned = RandomForestClassifier(n_estimators=100, max_depth=10)
|
1166 |
+
rfc_tuned.fit(X_train, y_train)
|
1167 |
+
|
1168 |
+
# Calculate feature importance
|
1169 |
+
importance_df = pd.DataFrame({"Feature_Name": X.columns, "Importance": rfc_tuned.feature_importances_})
|
1170 |
+
sorted_importance_df = importance_df.sort_values(by="Importance", ascending=False)
|
1171 |
+
|
1172 |
+
# Display feature importance
|
1173 |
+
st.subheader("Feature Importance")
|
1174 |
+
st.write("This chart shows the importance of each feature in predicting the number of goals scored by Team 2.")
|
1175 |
+
chart = st.bar_chart(sorted_importance_df.set_index('Feature_Name').head(15), use_container_width=True)
|
1176 |
+
|
1177 |
+
# Explanation of feature importance
|
1178 |
+
st.subheader("Interpretation of Feature Importance")
|
1179 |
+
st.write("Feature importance indicates how much each feature influences the prediction.")
|
1180 |
+
st.write("Higher importance suggests stronger influence on predicting the number of goals.")
|
1181 |
+
|
1182 |
+
# Create SHAP explainer
|
1183 |
+
explainer = shap.TreeExplainer(rfc_tuned)
|
1184 |
+
|
1185 |
+
# Generate SHAP values
|
1186 |
+
shap_values = explainer.shap_values(X_test)
|
1187 |
+
|
1188 |
+
# Display SHAP summary plot
|
1189 |
+
st.subheader("SHAP Values")
|
1190 |
+
st.write("SHAP values reveal the impact of each feature on individual predictions.")
|
1191 |
+
fig, ax = plt.subplots()
|
1192 |
+
shap.summary_plot(shap_values, X_test, plot_type='bar', max_display=10, show=False)
|
1193 |
+
st.pyplot(fig)
|
1194 |
+
|
1195 |
+
# Toggle button to switch between feature importance and SHAP values
|
1196 |
+
show_feature_importance = st.checkbox("View Feature Importance Table")
|
1197 |
+
if show_feature_importance:
|
1198 |
+
st.write(sorted_importance_df.head(15))
|
1199 |
+
|
1200 |
+
# Slider to adjust number of features displayed in feature importance chart
|
1201 |
+
num_features = st.slider("Number of Features to Display", min_value=5, max_value=len(sorted_importance_df), value=10)
|
1202 |
+
st.bar_chart(sorted_importance_df.set_index('Feature_Name').head(num_features), use_container_width=True)
|
1203 |
+
|
1204 |
+
# Explanation of SHAP values
|
1205 |
+
st.subheader("Interpretation of SHAP Values")
|
1206 |
+
st.write("Positive SHAP values indicate features that increase the predicted number of goals.")
|
1207 |
+
st.write("Negative SHAP values indicate features that decrease the predicted number of goals.")
|
1208 |
+
st.write("Higher magnitude suggests stronger impact on predictions.")
|
1209 |
+
|
1210 |
+
elif st.session_state.app_mode == 'MLflow & Deployment':
|
1211 |
+
from sklearn.model_selection import train_test_split, GridSearchCV
|
1212 |
+
from sklearn.tree import DecisionTreeClassifier
|
1213 |
+
from sklearn import metrics
|
1214 |
+
from mlflow import log_metric
|
1215 |
+
|
1216 |
+
import mlflow
|
1217 |
+
import os
|
1218 |
+
|
1219 |
+
st.subheader("MLflow & Deployment")
|
1220 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
1221 |
+
st.sidebar.markdown("<p style='color: #ffcc00; font-family: Impact; font-size: 16px;'>🎵 Enjoy the below chosen FIFA World Cup song for you! 🎶 Feel free to adjust the volume or stop the song whenever you want. 🎧</p>", unsafe_allow_html=True)
|
1222 |
+
|
1223 |
+
|
1224 |
+
st.sidebar.audio(audio_fifa_4, format='audio/mp3', start_time=0)
|
1225 |
+
st.image(image_quatar2022_2, use_column_width=True)
|
1226 |
+
st.title("MLflow & Deployment")
|
1227 |
+
|
1228 |
+
df = pd.read_csv('FIFAWorldCup2022.csv')
|
1229 |
+
X = df[["assists team2", "attempts inside the penalty area team2"]] # Features
|
1230 |
+
y = df['number of goals team2'] # Target
|
1231 |
+
|
1232 |
+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
|
1233 |
+
|
1234 |
+
dt = DecisionTreeClassifier(random_state=42)
|
1235 |
+
|
1236 |
+
param_grid = {'max_depth': [3, 5, 10], 'min_samples_leaf': [1, 2, 4]}
|
1237 |
+
|
1238 |
+
grid_search = GridSearchCV(estimator=dt, param_grid=param_grid, cv=5)
|
1239 |
+
|
1240 |
+
grid_search.fit(X_train, y_train)
|
1241 |
+
|
1242 |
+
best_params = grid_search.best_params_
|
1243 |
+
mlflow.log_params(best_params)
|
1244 |
+
|
1245 |
+
best_dt = grid_search.best_estimator_
|
1246 |
+
y_pred = best_dt.predict(X_test)
|
1247 |
+
|
1248 |
+
accuracy = metrics.accuracy_score(y_test, y_pred)
|
1249 |
+
precision = metrics.precision_score(y_test, y_pred, average='macro')
|
1250 |
+
recall = metrics.recall_score(y_test, y_pred, average='macro')
|
1251 |
+
f1 = metrics.f1_score(y_test, y_pred, average='macro')
|
1252 |
+
log_metric("accuracy", accuracy)
|
1253 |
+
log_metric("precision", precision)
|
1254 |
+
log_metric("recall", recall)
|
1255 |
+
log_metric("f1", f1)
|
1256 |
+
|
1257 |
+
mlflow.sklearn.log_model(best_dt, "best")
|
1258 |
+
|
1259 |
+
model_path = "best_model"
|
1260 |
+
if os.path.exists(model_path):
|
1261 |
+
try:
|
1262 |
+
import shutil
|
1263 |
+
shutil.rmtree(model_path)
|
1264 |
+
except OSError as e:
|
1265 |
+
st.error(f"An error occurred while deleting the previous model: {e}")
|
1266 |
+
|
1267 |
+
mlflow.sklearn.save_model(best_dt, model_path)
|
1268 |
+
st.subheader("Performance Metrics:")
|
1269 |
+
fig, ax = plt.subplots(figsize=(10, 6))
|
1270 |
+
metrics_names = ['Accuracy', 'Precision', 'Recall', 'F1 Score']
|
1271 |
+
metrics_values = [accuracy, precision, recall, f1]
|
1272 |
+
bars = ax.bar(metrics_names, metrics_values, color=['blue', 'green', 'orange', 'red'])
|
1273 |
+
ax.set_ylabel('Score')
|
1274 |
+
ax.set_title('Performance Metrics')
|
1275 |
+
|
1276 |
+
for bar in bars:
|
1277 |
+
height = bar.get_height()
|
1278 |
+
ax.annotate(f'{height:.3f}', xy=(bar.get_x() + bar.get_width() / 2, height), xytext=(0, 3),
|
1279 |
+
textcoords="offset points", ha='center', va='bottom', fontsize=12)
|
1280 |
+
|
1281 |
+
st.pyplot(fig)
|
1282 |
+
|
1283 |
+
|
1284 |
+
|
1285 |
+
# Assuming metrics_values and metrics_names are defined elsewhere
|
1286 |
+
metrics_values = [25, 35, 20, 20]
|
1287 |
+
metrics_names = ['Metric A', 'Metric B', 'Metric C', 'Metric D']
|
1288 |
+
|
1289 |
+
st.subheader("Additional Visualization (Pie Chart):")
|
1290 |
+
st.write("The pie chart illustrates the distribution of performance metrics.")
|
1291 |
+
|
1292 |
+
# Create the pie chart with custom colors
|
1293 |
+
fig, ax = plt.subplots(figsize=(8, 6))
|
1294 |
+
wedges, texts, autotexts = ax.pie(metrics_values, labels=metrics_names, autopct='%1.1f%%', startangle=140, colors=['blue', 'green', 'orange', 'red'], wedgeprops=dict(width=0.4))
|
1295 |
+
|
1296 |
+
# Set the color of autopct text to black for better visibility
|
1297 |
+
plt.setp(autotexts, size=12, weight="bold", color="black")
|
1298 |
+
|
1299 |
+
# Adjust pie chart properties
|
1300 |
+
ax.axis('equal')
|
1301 |
+
ax.set_title('Performance Metrics Distribution')
|
1302 |
+
|
1303 |
+
# Add values next to pie chart slices
|
1304 |
+
for i, text in enumerate(texts):
|
1305 |
+
text.set_text(f'{metrics_names[i]}: {metrics_values[i]:.3f}')
|
1306 |
+
|
1307 |
+
# Display the pie chart
|
1308 |
+
st.pyplot(fig)
|
1309 |
+
|
1310 |
+
|
1311 |
+
st.info("Hover over the bars in the bar graph to view exact values. Click on the pie chart segments to see percentage breakdown.")
|
1312 |
+
|
1313 |
+
st.subheader("Additional Insights:")
|
1314 |
+
st.write("Let's dive deeper into the performance metrics to understand their significance:")
|
1315 |
+
st.write("- **Accuracy**: Indicates the overall correctness of the model's predictions. A higher accuracy suggests better performance.")
|
1316 |
+
st.write("- **Precision**: Measures the correctness of positive predictions. It's the ratio of true positive predictions to all positive predictions made by the model.")
|
1317 |
+
st.write("- **Recall**: Reflects the model's ability to find all positive samples. It's the ratio of true positive predictions to all actual positive samples.")
|
1318 |
+
st.write("- **F1 Score**: Harmonic mean of precision and recall. It provides a balance between precision and recall, especially when dealing with imbalanced datasets.")
|
1319 |
+
|
1320 |
+
import streamlit as st
|
1321 |
+
|
1322 |
+
# Define questions and answers
|
1323 |
+
questions = [
|
1324 |
+
{
|
1325 |
+
"question": "Which country won the first ever FIFA World Cup in 1930?",
|
1326 |
+
"options": ["", "Brazil", "Uruguay", "Argentina", "Italy"],
|
1327 |
+
"answer": "Uruguay"
|
1328 |
+
},
|
1329 |
+
{
|
1330 |
+
"question": "Who is the all-time leading goal scorer in FIFA World Cup history?",
|
1331 |
+
"options": ["", "Pele", "Miroslav Klose", "Lionel Messi", "Cristiano Ronaldo"],
|
1332 |
+
"answer": "Miroslav Klose"
|
1333 |
+
}
|
1334 |
+
]
|
1335 |
+
|
1336 |
+
# Define congratulatory message
|
1337 |
+
congrats_message = "🎉 Congratulations! You got it right! 🎉"
|
1338 |
+
|
1339 |
+
# Define function to display question and options
|
1340 |
+
def display_question(question_obj):
|
1341 |
+
st.subheader(question_obj["question"])
|
1342 |
+
selected_option = st.radio("Select an option:", options=question_obj["options"])
|
1343 |
+
if selected_option == question_obj["answer"] and selected_option != "":
|
1344 |
+
st.success(congrats_message)
|
1345 |
+
elif selected_option != "":
|
1346 |
+
st.warning("Oops! That's not correct. Keep trying!")
|
1347 |
+
|
1348 |
+
# Prediction Page with Mindrefreshing Feature
|
1349 |
+
if st.session_state.app_mode == 'MLflow & Deployment':
|
1350 |
+
st.title("Mindrefreshing Feature: FIFA World Cup Trivia")
|
1351 |
+
st.markdown("Test your knowledge with these fun FIFA World Cup trivia questions!")
|
1352 |
+
|
1353 |
+
# Display questions and options
|
1354 |
+
for i, question in enumerate(questions, 1):
|
1355 |
+
st.write(f"**Question {i}:**")
|
1356 |
+
display_question(question)
|
1357 |
+
|
1358 |
+
# Option to play again for each question
|
1359 |
+
play_again = st.button("Play Again", key=f"play_again_{i}")
|
1360 |
+
if play_again:
|
1361 |
+
# Reset session state to reload questions
|
1362 |
+
st.session_state.app_mode = 'MLflow & Deployment'
|
1363 |
+
|
1364 |
+
|
1365 |
+
|
1366 |
+
|
1367 |
+
# Conclusion Page
|
1368 |
+
elif st.session_state.app_mode == 'Conclusion':
|
1369 |
+
st.subheader("Conclusion")
|
1370 |
+
|
1371 |
+
# Play the FIFA song
|
1372 |
+
st.sidebar.subheader("Play FIFA World Cup Song")
|
1373 |
+
st.sidebar.markdown("<p style='color: #ffcc00; font-family: Impact; font-size: 16px;'>🎵 Enjoy the below chosen FIFA World Cup song for you! 🎶 Feel free to adjust the volume or stop the song whenever you want. 🎧</p>", unsafe_allow_html=True)
|
1374 |
+
|
1375 |
+
st.sidebar.audio(audio_fifa, format='audio/mp3')
|
1376 |
+
|
1377 |
+
|
1378 |
+
|
1379 |
+
st.title("FIFA World Cup 2022 Data Analysis - Conclusion 👋")
|
1380 |
+
st.video(video_concu, format='video/mp4')
|
1381 |
+
|
1382 |
+
|
1383 |
+
# Set page background color and font
|
1384 |
+
st.markdown(
|
1385 |
+
"""
|
1386 |
+
<style>
|
1387 |
+
body {
|
1388 |
+
background-color: #f0f2f6; /* Light gray background */
|
1389 |
+
font-family: Arial, sans-serif; /* Choose a clean sans-serif font */
|
1390 |
+
color: #333; /* Dark gray text color */
|
1391 |
+
}
|
1392 |
+
h2 {
|
1393 |
+
color: #0047ab; /* Blue header color */
|
1394 |
+
}
|
1395 |
+
p {
|
1396 |
+
line-height: 1.5; /* Improve readability with slightly increased line spacing */
|
1397 |
+
}
|
1398 |
+
</style>
|
1399 |
+
""",
|
1400 |
+
unsafe_allow_html=True
|
1401 |
+
)
|
1402 |
+
|
1403 |
+
# Insights about team performance
|
1404 |
+
st.markdown("## Team Performance Insights")
|
1405 |
+
st.markdown("1. **Accuracy Matters:** Teams with precise shots tend to score more goals.")
|
1406 |
+
st.markdown("2. **Seize the Opportunities:** More shots on target often translate to more scoring chances.")
|
1407 |
+
st.markdown("3. **Balancing Act:** Teams that excel in attack also need to maintain a solid defense.")
|
1408 |
+
st.markdown("4. **Team Play:** Assists play a crucial role in achieving higher goal counts.")
|
1409 |
+
st.markdown("5. **Defensive Tactics:** Aggressive defensive strategies can lead to fewer goals conceded.")
|
1410 |
+
|
1411 |
+
# Limitations
|
1412 |
+
st.markdown("## Limitations")
|
1413 |
+
st.markdown("1. **Correlation, Not Causation:** While our models show strong correlations, causation cannot be definitively claimed.")
|
1414 |
+
st.markdown("2. **Room for Improvement:** Our prediction models require refinement for greater accuracy.")
|
1415 |
+
st.markdown("3. **Work in Progress:** Currently, our analysis does not predict game winners, as it wasn't our primary focus.")
|
1416 |
+
|
1417 |
+
# Future directions
|
1418 |
+
st.markdown("## Future Directions")
|
1419 |
+
st.markdown("1. **Time Is Key:** Investigate the impact of specific game minutes on goal likelihood in real-time.")
|
1420 |
+
st.markdown("2. **Beyond the Numbers:** Explore sentiment analysis to understand player and fan dynamics and their influence on goals.")
|
1421 |
+
st.markdown("3. **Stay Updated:** Implement real-time data analysis for timely insights during tournaments.")
|
1422 |
+
st.markdown("4. **Enhanced Predictions:** Develop robust models based on historical data to predict match outcomes and winners.")
|
1423 |
+
|
1424 |
+
import streamlit as st
|
1425 |
+
import pandas as pd
|
1426 |
+
import numpy as np
|
1427 |
+
from sklearn.model_selection import train_test_split
|
1428 |
+
from sklearn.linear_model import LinearRegression
|
1429 |
+
from sklearn.metrics import mean_squared_error
|
1430 |
+
from codecarbon import EmissionsTracker
|
1431 |
+
import tensorflow as tf
|
1432 |
+
|
1433 |
+
# Load FIFA World Cup dataset from CSV
|
1434 |
+
data = pd.read_csv('FIFAWorldCup2022.csv')
|
1435 |
+
|
1436 |
+
# Select independent variables (features) and target variable
|
1437 |
+
selected_features = ["assists team2", "attempted defensive line breaks team2", "on target attempts team2", "inbehind offers to receive team2", "possession team2", "passes completed team2"]
|
1438 |
+
selected_target = 'number of goals team2'
|
1439 |
+
# Remove percentage signs and convert to float
|
1440 |
+
for column in selected_features:
|
1441 |
+
data[column] = data[column].astype(str).str.rstrip('%').astype(float)
|
1442 |
+
|
1443 |
+
# Extract selected features and target variable from the dataset
|
1444 |
+
X = data[selected_features]
|
1445 |
+
y = data[selected_target]
|
1446 |
+
|
1447 |
+
# Split the data into training and testing sets
|
1448 |
+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
1449 |
+
|
1450 |
+
# Initialize the emissions tracker for linear regression
|
1451 |
+
tracker_linear = EmissionsTracker()
|
1452 |
+
tracker_linear.start()
|
1453 |
+
|
1454 |
+
# Train the linear regression model
|
1455 |
+
model_linear = LinearRegression()
|
1456 |
+
model_linear.fit(X_train, y_train)
|
1457 |
+
|
1458 |
+
# Predict the house prices
|
1459 |
+
predictions_linear = model_linear.predict(X_test)
|
1460 |
+
|
1461 |
+
# Stop the emissions tracker for linear regression
|
1462 |
+
emissions_linear = tracker_linear.stop()
|
1463 |
+
print(f"Estimated emissions for training the linear regression model: {emissions_linear:.4f} kg of CO2")
|
1464 |
+
|
1465 |
+
# Evaluate the linear regression model
|
1466 |
+
mse_linear = mean_squared_error(y_test, predictions_linear)
|
1467 |
+
rmse_linear = np.sqrt(mse_linear)
|
1468 |
+
print("Root Mean Squared Error (Linear Regression):", rmse_linear)
|
1469 |
+
|
1470 |
+
# Define a function to load MNIST dataset
|
1471 |
+
def load_mnist():
|
1472 |
+
mnist = tf.keras.datasets.mnist
|
1473 |
+
(x_train, y_train), (x_test, y_test) = mnist.load_data()
|
1474 |
+
x_train, x_test = x_train / 255.0, x_test / 255.0
|
1475 |
+
return (x_train, y_train), (x_test, y_test)
|
1476 |
+
|
1477 |
+
# Load MNIST dataset
|
1478 |
+
(x_train, y_train), (x_test, y_test) = load_mnist()
|
1479 |
+
|
1480 |
+
# Initialize the emissions tracker for neural network
|
1481 |
+
tracker_nn = EmissionsTracker()
|
1482 |
+
tracker_nn.start()
|
1483 |
+
|
1484 |
+
# Define and train the neural network model
|
1485 |
+
model_nn = tf.keras.models.Sequential([
|
1486 |
+
tf.keras.layers.Flatten(input_shape=(28, 28)),
|
1487 |
+
tf.keras.layers.Dense(128, activation="relu"),
|
1488 |
+
tf.keras.layers.Dropout(0.2),
|
1489 |
+
tf.keras.layers.Dense(10)
|
1490 |
+
])
|
1491 |
+
|
1492 |
+
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
|
1493 |
+
model_nn.compile(optimizer="adam", loss=loss_fn, metrics=["accuracy"])
|
1494 |
+
|
1495 |
+
model_nn.fit(x_train, y_train, epochs=3)
|
1496 |
+
|
1497 |
+
# Stop the emissions tracker for neural network
|
1498 |
+
emissions_nn = tracker_nn.stop()
|
1499 |
+
print(f"Estimated emissions for training the neural network model: {emissions_nn:.4f} kg of CO2")
|
1500 |
+
|
1501 |
+
# Combine emissions from both models
|
1502 |
+
total_emissions = emissions_linear + emissions_nn
|
1503 |
+
|
1504 |
+
# Calculate accuracy of the neural network model
|
1505 |
+
test_loss, test_accuracy = model_nn.evaluate(x_test, y_test, verbose=2)
|
1506 |
+
print("Test Accuracy (Neural Network):", test_accuracy)
|
1507 |
+
|
1508 |
+
# Button to toggle the visibility of the output
|
1509 |
+
if st.button("Show Emissions and Model Evaluation"):
|
1510 |
+
|
1511 |
+
# Estimated emissions and model evaluation
|
1512 |
+
st.markdown("## Model Evaluation and Environmental Impact")
|
1513 |
+
|
1514 |
+
st.markdown("A. Estimated emissions for training the linear regression model:")
|
1515 |
+
st.write(f"{emissions_linear:.4f} kg of CO2")
|
1516 |
+
|
1517 |
+
st.markdown("B. Root Mean Squared Error (Linear Regression):")
|
1518 |
+
st.write(rmse_linear)
|
1519 |
+
|
1520 |
+
st.markdown("C. Estimated emissions for training the neural network model:")
|
1521 |
+
st.write(f"{emissions_nn:.4f} kg of CO2")
|
1522 |
+
|
1523 |
+
st.markdown("D. Total emissions:")
|
1524 |
+
st.write(f"{total_emissions:.4f} kg of CO2")
|
1525 |
+
|
1526 |
+
st.markdown("E. Test Accuracy (Neural Network):")
|
1527 |
+
st.write(test_accuracy)
|
1528 |
+
|
1529 |
+
# Display questions below emissions button
|
1530 |
+
st.markdown("## Kahoot Quiz")
|
1531 |
+
|
1532 |
+
questions = [
|
1533 |
+
{
|
1534 |
+
"question": "Which of the following is a key component that increases the likelihood of a team scoring goals?",
|
1535 |
+
"options": ["", "On Target Attempts", "Number of Fans in the Stadium", "Weather Conditions", "Team's Mascot"],
|
1536 |
+
"answer": "On Target Attempts",
|
1537 |
+
"selected_option": None
|
1538 |
+
},
|
1539 |
+
{
|
1540 |
+
"question": "Which factor is most crucial for a team to create scoring opportunities?",
|
1541 |
+
"options": ["", "Number of Goals Conceded", "Successful Passes Completed by the Team", "Team's Jersey Color", "Length of the Grass on the Field"],
|
1542 |
+
"answer": "Successful Passes Completed by the Team",
|
1543 |
+
"selected_option": None
|
1544 |
+
}
|
1545 |
+
]
|
1546 |
+
|
1547 |
+
congrats_message = "🎉 Congratulations! You got it right! 🎉"
|
1548 |
+
|
1549 |
+
# Define function to display question and options
|
1550 |
+
def display_question(question_obj):
|
1551 |
+
st.markdown(f"### {question_obj['question']}")
|
1552 |
+
selected_option = st.radio("Select your answer:", options=question_obj["options"], key=question_obj["question"])
|
1553 |
+
if selected_option == question_obj["answer"]:
|
1554 |
+
st.success(congrats_message)
|
1555 |
+
elif selected_option and selected_option != "":
|
1556 |
+
st.warning("Oops! That's not correct. Better luck next time!")
|
1557 |
+
|
1558 |
+
# Quiz
|
1559 |
+
for i, question in enumerate(questions, 1):
|
1560 |
+
st.write(f"**Question {i}:**")
|
1561 |
+
display_question(question)
|
1562 |
+
|
1563 |
+
# Conclusion and Surprise Element
|
1564 |
+
st.markdown("<p style='font-family: Arial; font-size: 24px; font-weight: bold; color: white;'>## 🏆 That's a Wrap! 🏆</p>", unsafe_allow_html=True)
|
1565 |
+
st.markdown("<p style='font-family: Arial; font-size: 20px; color: white;'>🎉 Thanks for exploring our FIFA World Cup 2022 Data Analysis app! 🎉</p>", unsafe_allow_html=True)
|
1566 |
+
st.markdown("<p style='font-family: Arial; font-size: 20px; color: white;'>Hope you enjoyed discovering insights and trends in the data.</p>", unsafe_allow_html=True)
|
1567 |
+
st.markdown("<p style='font-family: Arial; font-size: 20px; color: white;'>Congratulations on your journey through football analytics!</p>", unsafe_allow_html=True)
|
1568 |
+
st.markdown("<p style='font-family: Arial; font-size: 20px; color: white;'>Here's a special surprise just for you!</p>", unsafe_allow_html=True)
|
1569 |
+
|
1570 |
+
# Additional Shocking Feature
|
1571 |
+
st.subheader("Reveal Secret")
|
1572 |
+
if st.button("Reveal Secret"):
|
1573 |
+
st.balloons()
|
1574 |
+
st.success("🎉 You found the hidden treasure! Enjoy your victory! 🎉")
|
1575 |
+
# Advanced Feature: Continuously moving and shining balloons
|
1576 |
+
st.write('<style>div.st-balloons > img {animation: balloon-float 2s linear infinite, balloon-spin 4s linear infinite;}</style>', unsafe_allow_html=True)
|
1577 |
+
st.write('<style>@keyframes balloon-float {0% {transform: translateY(0);} 50% {transform: translateY(-20px);} 100% {transform: translateY(0);}} @keyframes balloon-spin {from {transform: rotate(0deg);} to {transform: rotate(360deg);}}</style>', unsafe_allow_html=True)
|
1578 |
+
|
FIFAWorldCup2022.csv
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
team1,team2,possession team1,possession team2,possession in contest,number of goals team1,number of goals team2,date,hour,category,total attempts team1,total attempts team2,conceded team1,conceded team2,goal inside the penalty area team1,goal inside the penalty area team2,goal outside the penalty area team1,goal outside the penalty area team2,assists team1,assists team2,on target attempts team1,on target attempts team2,off target attempts team1,off target attempts team2,attempts inside the penalty area team1,attempts inside the penalty area team2,attempts outside the penalty area team1,attempts outside the penalty area team2,left channel team1,left channel team2,left inside channel team1,left inside channel team2,central channel team1,central channel team2,right inside channel team1,right inside channel team2,right channel team1,right channel team2,total offers to receive team1,total offers to receive team2,inbehind offers to receive team1,inbehind offers to receive team2,inbetween offers to receive team1,inbetween offers to receive team2,infront offers to receive team1,infront offers to receive team2,receptions between midfield and defensive lines team1,receptions between midfield and defensive lines team2,attempted line breaks team1,attempted line breaks team2,completed line breaksteam1,completed line breaks team2,attempted defensive line breaks team1,attempted defensive line breaks team2,completed defensive line breaksteam1,completed defensive line breaks team2,yellow cards team1,yellow cards team2,red cards team1,red cards team2,fouls against team1,fouls against team2,offsides team1,offsides team2,passes team1,passes team2,passes completed team1,passes completed team2,crosses team1,crosses team2,crosses completed team1,crosses completed team2,switches of play completed team1,switches of play completed team2,corners team1,corners team2,free kicks team1,free kicks team2,penalties scored team1,penalties scored team2,goal preventions team1,goal preventions team2,own goals team1,own goals team2,forced turnovers team1,forced turnovers team2,defensive pressures applied team1,defensive pressures applied team2
|
2 |
+
QATAR,ECUADOR,42%,50%,8%,0,2,20 NOV 2022,17 : 00,Group A,5,6,2,0,0,2,0,0,0,1,0,3,5,3,2,4,3,2,15,8,0,7,3,6,1,4,9,6,520,532,116,127,235,187,169,218,5,8,136,155,86,99,9,13,4,7,4,2,0,0,15,15,3,4,450,480,381,409,9,14,4,4,9,9,1,3,19,17,0,1,6,5,0,0,52,72,256,279
|
3 |
+
ENGLAND,IRAN,72%,19%,9%,6,2,21 NOV 2022,14 : 00,Group B,13,8,2,6,6,2,0,0,6,1,7,3,3,4,10,6,3,2,11,3,5,0,2,3,3,1,11,0,1061,212,207,53,386,86,468,73,16,4,238,101,178,45,25,7,16,4,0,2,0,0,9,14,2,2,809,224,730,154,23,8,7,1,12,3,8,0,16,10,0,1,8,13,0,0,63,72,139,416
|
4 |
+
SENEGAL,NETHERLANDS,44%,45%,11%,0,2,21 NOV 2022,17 : 00,Group A,14,9,2,0,0,2,0,0,0,1,3,3,8,5,7,5,7,4,12,11,4,2,2,2,4,7,13,20,502,506,123,117,230,191,149,198,15,14,151,162,89,96,22,22,15,10,2,1,0,0,13,13,2,1,383,438,313,374,19,25,7,8,9,6,6,7,14,14,0,0,9,15,0,0,63,73,263,251
|
5 |
+
UNITED STATES,WALES,51%,39%,10%,1,1,21 NOV 2022,20 : 00,Group B,6,7,1,1,1,1,0,0,1,0,1,3,4,3,4,5,2,2,14,7,5,2,4,5,4,2,11,7,725,436,149,100,336,172,240,164,12,9,199,174,146,103,23,17,15,8,4,2,0,0,15,10,1,1,569,409,509,321,31,15,4,6,5,8,5,3,11,15,0,1,7,7,0,0,81,72,242,292
|
6 |
+
ARGENTINA,SAUDI ARABIA,64%,24%,12%,1,2,22 NOV 2022,11 : 00,Group C,14,3,2,1,1,2,0,0,0,1,6,2,5,0,10,3,4,0,12,3,4,2,5,3,8,3,18,8,650,268,157,69,177,131,316,68,26,9,191,137,127,68,39,15,25,7,0,6,0,0,7,21,10,1,610,267,529,190,29,9,12,2,5,7,9,2,22,16,1,0,4,14,0,0,65,80,163,361
|
7 |
+
DENMARK,TUNISIA,55%,33%,12%,0,0,22 NOV 2022,14 : 00,Group D,11,11,0,0,0,0,0,0,0,0,4,1,4,7,7,6,4,5,17,9,4,2,7,2,6,3,18,6,681,477,152,89,276,204,253,184,14,7,190,174,136,85,21,17,12,6,2,1,0,0,9,10,1,1,594,387,523,302,27,13,10,3,11,1,11,9,11,10,0,0,11,11,0,0,76,73,226,287
|
8 |
+
MEXICO,POLAND,54%,31%,15%,0,0,22 NOV 2022,17 : 00,Group C,13,8,0,0,0,0,0,0,0,0,4,1,5,4,10,7,3,1,20,8,6,6,1,6,3,4,27,13,547,296,128,72,202,101,217,123,20,3,170,150,117,82,32,12,19,2,2,1,0,0,14,16,3,0,485,322,422,241,33,10,8,2,9,1,6,5,16,16,0,0,8,15,0,0,61,70,193,290
|
9 |
+
FRANCE,AUSTRALIA,56%,35%,9%,4,1,22 NOV 2022,20 : 00,Group D,22,4,1,4,4,1,0,0,4,1,7,1,9,3,18,2,4,2,30,11,6,2,3,5,8,1,19,9,691,521,150,95,182,208,359,218,26,7,173,133,135,84,32,15,27,7,0,3,0,0,5,11,0,0,734,466,672,399,34,9,17,2,6,5,8,1,11,5,0,0,4,22,0,0,64,56,250,316
|
10 |
+
MOROCCO,CROATIA,32%,57%,12%,0,0,23 NOV 2022,11 : 00,Group F,8,6,0,0,0,0,0,0,0,0,2,2,0,2,3,4,5,2,8,12,1,3,6,6,0,5,11,7,498,626,106,99,193,197,199,330,4,9,142,169,81,116,10,18,4,9,1,0,0,0,17,11,0,1,360,667,290,592,10,19,1,4,6,7,0,5,12,17,0,0,7,8,0,0,87,58,391,217
|
11 |
+
GERMANY,JAPAN,65%,22%,13%,1,2,23 NOV 2022,14 : 00,Group E,25,10,2,1,1,2,0,0,0,1,9,3,11,6,15,10,10,0,24,5,9,0,14,3,5,3,21,11,865,346,199,102,366,146,300,98,19,10,241,113,185,70,23,17,20,11,0,0,0,0,6,14,4,4,820,261,743,207,28,16,9,3,4,2,6,6,17,10,1,0,12,26,0,0,55,87,164,487
|
12 |
+
SPAIN,COSTA RICA,74%,17%,9%,7,0,23 NOV 2022,17 : 00,Group E,17,0,0,7,7,0,0,0,4,0,7,0,8,0,12,0,5,0,30,5,4,0,8,1,6,0,12,1,1085,250,180,52,418,104,487,94,23,1,276,119,233,58,34,11,22,1,0,2,0,0,8,12,3,7,1061,231,1003,170,17,5,2,0,8,1,5,0,18,11,1,0,0,17,0,0,46,76,185,585
|
13 |
+
BELGIUM,CANADA,46%,43%,11%,1,0,23 NOV 2022,20 : 00,Group F,9,21,0,1,1,0,0,0,1,0,3,4,6,12,6,16,3,5,6,17,3,6,5,8,2,5,6,20,618,582,115,140,268,279,235,163,8,15,175,176,118,123,13,23,6,13,3,2,0,0,11,14,0,1,512,448,439,382,8,19,5,6,4,6,4,4,15,10,0,0,21,9,0,0,74,47,284,320
|
14 |
+
SWITZERLAND,CAMEROON,43%,46%,11%,1,0,24 NOV 2022,11 : 00,Group G,8,7,0,1,1,0,0,0,1,0,3,3,4,2,6,6,2,1,19,9,2,12,11,3,6,5,16,18,609,561,153,109,256,248,200,204,13,5,178,182,123,103,21,16,13,4,2,1,0,0,12,10,2,2,497,500,437,424,28,20,6,4,4,8,11,5,11,14,0,0,7,8,0,0,64,79,313,316
|
15 |
+
URUGUAY,KOREA REPUBLIC,49%,38%,13%,0,0,24 NOV 2022,14 : 00,Group H,10,6,0,0,0,0,0,0,0,0,0,0,6,5,7,1,3,5,13,15,4,0,4,4,6,4,14,19,566,551,157,136,155,228,254,187,4,8,146,185,88,96,16,17,7,8,1,1,0,0,7,10,1,0,528,419,459,340,16,19,4,3,10,9,4,3,10,8,0,0,6,10,0,0,65,54,240,231
|
16 |
+
PORTUGAL,GHANA,55%,35%,10%,3,2,24 NOV 2022,17 : 00,Group H,11,8,2,3,3,2,0,0,2,2,5,3,3,5,7,2,4,6,24,7,6,9,7,6,4,3,10,3,762,459,168,87,308,187,286,185,20,5,198,150,149,88,26,12,18,4,2,4,0,0,14,19,1,1,636,394,573,326,17,12,4,3,13,2,3,3,19,15,1,0,8,11,0,0,70,82,286,326
|
17 |
+
BRAZIL,SERBIA,53%,34%,13%,2,0,24 NOV 2022,20 : 00,Group G,24,4,0,2,2,0,0,0,1,0,10,0,9,3,11,1,13,3,14,10,9,3,10,4,7,3,20,7,727,414,144,67,275,185,308,162,11,4,184,140,134,91,16,15,10,6,0,3,0,0,7,12,1,0,585,403,526,341,19,13,3,3,6,6,6,4,12,8,0,0,4,24,0,0,72,71,236,338
|
18 |
+
WALES,IRAN,51%,33%,16%,0,2,25 NOV 2022,11 : 00,Group B,10,21,2,0,0,1,0,1,0,1,3,6,4,6,5,7,5,14,18,7,3,3,8,7,11,4,13,7,722,343,135,109,286,149,301,85,13,9,208,185,129,92,17,24,8,10,1,2,1,0,9,10,2,2,508,295,413,202,20,26,5,4,13,5,2,7,12,11,0,0,21,9,0,0,89,84,161,276
|
19 |
+
QATAR,SENEGAL,42%,48%,10%,1,3,25 NOV 2022,14 : 00,Group A,10,12,3,1,1,3,0,0,1,2,2,4,7,6,4,10,6,2,7,26,5,4,2,6,5,4,11,18,511,553,109,136,199,190,203,227,9,12,174,184,117,113,13,19,7,9,3,3,0,0,7,12,4,3,424,511,353,445,18,20,5,6,12,9,6,7,15,11,0,0,12,11,0,0,67,67,308,232
|
20 |
+
NETHERLANDS,ECUADOR,48%,39%,13%,1,1,25 NOV 2022,17 : 00,Group A,2,13,1,1,0,1,1,0,1,0,1,5,1,3,0,8,2,5,8,10,8,5,2,2,4,5,11,4,632,541,129,86,267,276,236,179,4,12,168,155,115,84,9,22,4,10,0,1,0,0,15,12,1,4,524,425,451,345,8,22,0,4,6,2,2,5,16,16,0,0,14,2,0,0,85,52,254,279
|
21 |
+
ENGLAND,UNITED STATES,51%,40%,9%,0,0,25 NOV 2022,20 : 00,Group B,8,10,0,0,0,0,0,0,0,0,3,2,4,7,6,6,2,4,11,12,2,0,7,1,5,6,11,8,676,539,116,129,290,238,270,172,10,6,208,143,147,88,23,15,10,5,0,0,0,0,9,15,1,0,550,427,488,368,13,16,4,2,9,2,3,7,15,10,0,0,10,8,0,0,52,61,266,350
|
22 |
+
TUNISIA,AUSTRALIA,50%,31%,19%,0,1,26 NOV 2022,11 : 00,Group D,13,8,1,0,0,1,0,0,0,1,4,2,5,3,9,5,4,3,12,11,8,3,7,4,6,7,11,19,710,342,166,108,291,120,253,114,13,8,200,171,109,91,23,19,11,10,3,0,0,0,16,15,3,0,501,334,396,239,23,23,5,4,6,2,5,2,15,19,0,0,9,13,0,0,81,88,217,273
|
23 |
+
POLAND,SAUDI ARABIA,30%,57%,14%,2,0,26 NOV 2022,14 : 00,Group C,8,16,0,2,2,0,0,0,1,0,3,5,3,9,8,9,0,7,7,21,2,6,4,5,8,7,13,15,428,661,140,156,164,264,124,241,14,22,150,205,84,153,22,27,12,19,3,2,0,0,18,15,0,0,303,560,236,494,19,24,8,4,5,13,4,5,15,17,0,0,16,9,0,0,69,53,329,173
|
24 |
+
FRANCE,DENMARK,44%,44%,12%,2,1,26 NOV 2022,17 : 00,Group D,21,10,1,2,2,1,0,0,2,1,6,2,8,6,16,5,5,5,15,13,7,5,4,3,1,4,13,25,630,615,111,171,226,268,293,176,11,17,155,173,105,132,16,23,12,15,1,2,0,0,4,9,1,1,503,537,437,473,23,18,12,4,7,14,6,4,10,5,0,0,10,21,0,0,79,61,269,282
|
25 |
+
ARGENTINA,MEXICO,50%,36%,14%,2,0,26 NOV 2022,20 : 00,Group C,5,4,0,2,1,0,1,0,2,0,2,1,3,2,2,1,3,3,10,8,6,1,2,1,4,2,12,11,569,373,103,78,244,151,222,144,2,5,150,127,100,66,10,13,5,5,1,4,0,0,15,19,2,4,533,356,464,287,14,17,2,4,3,2,4,2,23,17,0,0,4,5,0,0,63,79,220,327
|
26 |
+
JAPAN,COSTA RICA,48%,39%,13%,0,1,27 NOV 2022,11 : 00,Group E,14,4,1,0,0,1,0,0,0,1,3,1,4,1,7,1,7,3,28,8,6,0,9,3,3,1,10,4,699,429,176,77,255,177,268,175,5,1,158,154,95,85,22,4,7,0,3,3,0,0,22,9,0,2,575,444,510,371,17,5,1,0,2,7,5,0,11,22,0,0,4,14,0,0,47,66,300,294
|
27 |
+
BELGIUM,MOROCCO,56%,32%,12%,0,2,27 NOV 2022,14 : 00,Group F,10,11,2,0,0,2,0,0,0,2,4,4,6,6,5,6,5,5,12,10,8,3,3,2,4,1,9,11,732,441,144,109,211,173,377,159,4,7,149,125,104,89,13,11,3,8,1,1,0,0,10,14,3,3,671,317,598,275,19,9,3,4,6,10,9,1,17,13,0,0,11,10,0,0,38,78,194,360
|
28 |
+
CROATIA,CANADA,41%,46%,13%,4,1,27 NOV 2022,17 : 00,Group F,13,9,1,4,3,1,1,0,4,1,10,2,2,3,9,2,4,7,7,8,3,4,3,3,3,4,3,13,573,592,113,121,256,247,204,224,15,6,193,201,124,134,24,15,10,6,2,2,0,0,13,5,1,3,462,511,391,434,22,15,5,5,6,7,5,2,8,14,0,0,9,13,0,0,87,72,347,316
|
29 |
+
SPAIN,GERMANY,56%,33%,11%,1,1,27 NOV 2022,20 : 00,Group E,7,10,1,1,1,1,0,0,1,1,3,4,4,5,3,7,4,3,12,3,3,3,2,4,1,3,5,8,633,440,90,108,270,177,273,155,16,9,186,143,146,83,19,17,13,7,1,3,0,0,13,11,2,5,647,352,565,281,9,13,2,1,9,2,6,5,16,15,0,0,11,7,0,0,79,101,275,387
|
30 |
+
CAMEROON,SERBIA,38%,49%,13%,3,3,28 NOV 2022,11 : 00,Group G,13,16,3,3,3,2,0,1,3,3,8,6,3,8,9,11,4,5,5,20,3,4,5,16,4,5,15,12,419,583,103,124,149,261,167,198,15,11,173,184,78,122,22,22,12,12,2,2,0,0,8,13,0,4,364,513,271,433,20,23,1,4,5,5,4,3,17,8,0,0,16,13,0,0,83,81,285,234
|
31 |
+
KOREA REPUBLIC,GHANA,53%,32%,15%,2,3,28 NOV 2022,14 : 00,Group H,21,8,3,2,2,3,0,0,2,2,6,3,8,3,15,7,6,1,22,8,5,3,6,4,8,3,27,7,695,389,175,72,234,157,286,160,19,5,201,122,148,66,24,12,19,5,2,2,0,0,13,9,1,1,540,319,477,260,46,13,16,4,16,3,12,5,10,14,0,0,8,21,0,0,53,75,220,324
|
32 |
+
BRAZIL,SWITZERLAND,51%,40%,9%,1,0,28 NOV 2022,17 : 00,Group G,9,4,0,1,1,0,0,0,1,0,5,0,2,1,6,2,3,2,19,7,12,3,5,4,5,6,11,10,659,568,154,128,218,212,287,228,16,4,164,173,114,100,20,17,11,4,1,1,0,0,10,17,3,1,565,488,498,415,26,11,3,3,6,2,8,3,18,13,0,0,4,9,0,0,85,80,282,344
|
33 |
+
PORTUGAL,URUGUAY,53%,35%,12%,2,0,28 NOV 2022,20 : 00,Group H,14,10,0,2,1,0,1,0,0,0,4,3,7,6,4,6,10,4,17,13,9,8,4,4,9,5,11,9,752,413,142,115,327,155,283,143,11,6,170,150,112,86,11,17,7,11,3,2,0,0,10,16,2,0,596,390,517,306,16,18,4,5,9,2,6,2,15,13,1,0,11,14,0,0,68,81,226,362
|
34 |
+
NETHERLANDS,QATAR,54%,38%,8%,2,0,29 NOV 2022,16 : 00,Group A,13,6,0,2,2,0,0,0,1,0,4,4,5,2,10,2,3,4,25,10,9,7,8,5,11,4,21,6,785,574,157,100,322,245,306,229,16,11,185,161,165,107,13,15,10,10,1,0,0,0,19,9,4,0,795,459,740,394,11,16,1,4,1,10,4,2,9,24,0,0,5,14,0,0,62,52,319,322
|
35 |
+
ECUADOR,SENEGAL,51%,32%,17%,1,2,29 NOV 2022,16 : 00,Group A,8,15,2,1,1,2,0,0,1,0,4,5,3,8,5,11,3,4,13,14,3,0,1,2,6,7,6,10,453,268,83,76,174,115,196,77,2,12,146,153,77,84,10,20,2,12,0,1,0,0,23,11,0,3,432,269,353,198,19,20,6,5,1,6,3,6,14,22,0,1,15,8,0,0,59,62,190,243
|
36 |
+
WALES,ENGLAND,33%,58%,10%,0,3,29 NOV 2022,20 : 00,Group B,7,17,3,0,0,2,0,1,0,2,1,7,3,6,1,13,6,4,7,10,1,4,2,7,0,12,4,9,388,777,71,140,138,310,179,327,1,9,104,167,55,131,4,13,1,8,2,0,0,0,16,9,1,1,325,588,261,529,4,17,1,7,1,6,1,6,10,17,0,0,17,8,0,0,49,56,328,167
|
37 |
+
IRAN,UNITED STATES,42%,45%,13%,0,1,29 NOV 2022,20 : 00,Group B,6,12,1,0,0,1,0,0,0,1,2,5,4,4,5,8,1,4,12,11,2,7,5,7,3,5,4,17,492,697,94,133,223,262,175,302,9,17,195,185,102,133,23,27,8,16,3,1,0,0,13,10,2,1,463,470,379,413,18,22,3,2,11,8,1,5,11,15,0,0,13,6,0,0,63,74,295,302
|
38 |
+
AUSTRALIA,DENMARK,24%,60%,16%,1,0,30 NOV 2022,16 : 00,Group D,8,14,0,1,1,0,0,0,1,0,4,3,2,7,3,11,5,3,9,27,2,5,2,4,1,6,11,19,302,640,88,146,114,259,100,235,8,17,166,241,81,172,17,21,7,17,2,1,0,0,11,10,1,3,286,650,187,567,11,32,2,5,1,9,2,6,13,12,0,0,14,8,0,0,90,74,341,161
|
39 |
+
TUNISIA,FRANCE,30%,56%,14%,1,0,30 NOV 2022,16 : 00,Group D,5,9,0,1,0,0,1,0,1,0,3,3,2,4,2,4,3,5,11,14,3,6,4,5,0,3,10,21,381,630,99,96,175,212,107,322,9,11,153,138,96,99,21,10,7,4,1,0,0,0,14,6,3,2,328,636,266,566,27,20,4,5,4,3,7,8,8,17,0,0,11,6,0,0,68,80,400,202
|
40 |
+
POLAND,ARGENTINA,24%,67%,9%,0,2,30 NOV 2022,20 : 00,Group C,4,25,2,0,0,2,0,0,0,2,0,13,2,8,2,21,2,4,6,25,2,8,1,7,2,10,3,26,328,907,62,175,126,282,140,450,2,21,117,214,66,188,5,25,1,19,1,1,0,0,6,11,0,0,321,862,261,814,5,22,2,5,8,11,1,9,12,5,0,0,25,4,0,0,67,48,438,141
|
41 |
+
SAUDI ARABIA,MEXICO,29%,55%,17%,1,2,30 NOV 2022,20 : 00,Group C,10,25,2,1,1,1,0,1,1,1,2,10,8,8,6,10,4,15,5,16,3,5,4,3,3,7,11,16,337,492,100,194,162,158,75,140,6,17,178,198,86,121,17,33,5,16,6,1,0,0,20,18,2,6,297,412,197,336,9,34,2,6,1,4,1,8,23,22,0,0,26,10,0,0,82,76,269,229
|
42 |
+
CROATIA,BELGIUM,43%,47%,10%,0,0,01 DEC 2022,16 : 00,Group F,11,15,0,0,0,0,0,0,0,0,4,4,5,7,7,12,4,3,23,18,7,5,3,7,2,4,12,9,650,581,124,123,338,181,188,277,17,12,204,177,159,115,23,26,17,14,0,1,0,0,7,9,4,0,578,596,504,531,24,24,6,8,18,4,2,4,9,11,0,0,16,11,0,0,70,68,328,346
|
43 |
+
CANADA,MOROCCO,52%,36%,12%,1,2,01 DEC 2022,16 : 00,Group F,5,7,2,1,0,1,0,1,0,1,0,2,4,2,4,4,1,3,22,6,4,0,2,3,6,4,11,5,703,493,189,78,211,227,303,188,8,8,153,147,91,85,21,16,8,7,4,0,0,0,14,14,4,4,539,384,472,308,20,7,4,1,3,14,6,2,18,18,0,0,7,7,0,1,66,72,224,324
|
44 |
+
JAPAN,SPAIN,14%,78%,8%,2,1,01 DEC 2022,20 : 00,Group E,6,14,1,2,1,1,1,0,2,1,3,5,2,3,4,7,2,7,2,30,3,9,1,6,2,11,5,22,315,1138,77,174,106,286,132,678,10,17,104,190,57,140,14,21,8,15,3,0,0,0,9,6,2,2,225,1070,167,992,6,20,3,2,2,9,0,2,8,11,0,0,14,6,0,0,85,49,637,150
|
45 |
+
COSTA RICA,GERMANY,27%,60%,13%,2,4,01 DEC 2022,20 : 00,Group E,8,32,4,2,2,4,0,0,0,4,6,11,1,17,6,24,2,8,7,29,5,13,3,13,1,12,1,15,344,747,100,217,156,272,88,258,10,28,154,193,103,159,13,34,7,25,1,0,0,0,3,9,4,3,347,727,269,661,12,38,3,12,4,5,1,14,12,7,0,0,32,8,0,0,79,77,378,230
|
46 |
+
GHANA,URUGUAY,46%,39%,15%,0,2,02 DEC 2022,16 : 00,Group H,9,12,2,0,0,2,0,0,0,1,4,7,4,5,4,7,5,5,12,7,5,2,8,13,4,3,12,17,597,424,154,117,247,157,196,150,8,14,188,186,111,124,13,24,5,14,2,5,0,0,18,11,2,2,460,446,377,361,20,15,2,4,3,6,5,2,12,20,0,0,12,9,0,0,92,84,248,293
|
47 |
+
KOREA REPUBLIC,PORTUGAL,34%,55%,11%,2,1,02 DEC 2022,16 : 00,Group H,12,12,1,2,2,1,0,0,1,1,6,4,4,6,6,5,6,7,9,23,7,7,5,5,2,8,7,12,470,740,93,159,186,195,191,386,8,12,139,178,87,123,11,21,6,12,2,0,0,0,9,11,1,5,359,606,304,541,13,22,3,6,9,11,5,4,15,10,0,0,14,12,0,0,54,50,359,233
|
48 |
+
SERBIA,SWITZERLAND,45%,41%,14%,2,3,02 DEC 2022,20 : 00,Group G,11,14,3,2,2,3,0,0,1,3,4,7,6,3,10,10,1,4,17,14,6,7,4,3,4,1,10,12,577,456,92,108,214,193,271,155,7,10,157,157,95,95,10,20,5,8,7,4,0,0,18,13,0,0,476,403,390,325,23,13,6,4,7,9,2,0,14,18,0,0,14,10,0,0,74,82,276,253
|
49 |
+
CAMEROON,BRAZIL,31%,56%,13%,1,0,02 DEC 2022,20 : 00,Group G,7,19,0,1,1,0,0,0,1,0,3,6,3,11,5,14,2,5,8,20,8,5,4,6,4,7,9,13,397,643,88,145,144,328,165,170,9,9,144,181,92,145,16,15,7,9,5,2,1,0,14,14,0,1,295,548,239,491,12,28,3,8,4,3,3,11,15,14,0,0,20,7,0,0,78,54,321,226
|
50 |
+
NETHERLANDS,UNITED STATES,33%,54%,13%,3,1,03 DEC 2022,16 : 00,Round of 16,11,18,1,3,3,1,0,0,3,1,6,7,4,4,7,11,4,7,4,13,2,8,4,4,7,9,10,15,404,820,73,179,200,360,131,281,8,17,161,187,95,126,17,28,7,17,2,0,0,0,10,5,0,3,396,567,320,487,13,27,4,2,4,5,4,5,8,10,0,0,18,13,0,0,101,77,325,256
|
51 |
+
ARGENTINA,AUSTRALIA,53%,35%,12%,2,1,03 DEC 2022,20 : 00,Round of 16,14,5,1,2,2,0,0,0,1,0,5,2,7,2,11,3,3,2,15,8,6,1,11,2,2,6,17,9,869,538,131,105,337,184,401,249,8,8,181,146,135,92,16,12,8,7,0,2,0,0,8,15,4,0,711,450,635,381,6,15,1,2,5,8,1,3,15,11,0,0,5,14,1,0,67,73,240,453
|
52 |
+
FRANCE,POLAND,48%,42%,10%,3,1,04 DEC 2022,16 : 00,Round of 16,16,11,1,3,3,1,0,0,3,0,7,3,7,5,10,8,6,3,15,15,7,2,2,2,9,3,19,10,568,501,118,124,207,224,243,153,14,11,174,156,111,97,26,20,14,12,1,2,0,0,10,8,3,1,540,466,481,391,27,18,4,7,4,5,7,1,8,11,0,1,11,16,0,0,71,64,220,297
|
53 |
+
ENGLAND,SENEGAL,54%,35%,11%,3,0,04 DEC 2022,20 : 00,Round of 16,8,10,0,3,3,0,0,0,3,0,4,2,4,6,7,4,1,6,17,8,6,1,2,0,2,4,13,9,794,489,140,95,276,193,378,201,11,7,184,159,129,86,16,15,12,7,0,1,0,0,16,12,0,0,597,393,523,320,19,13,7,3,11,7,3,3,12,16,0,0,10,8,0,0,60,74,230,339
|
54 |
+
JAPAN,CROATIA,35%,51%,14%,1,1,05 DEC 2022,16 : 00,Round of 16,12,16,1,1,1,1,0,0,1,1,4,4,4,8,5,9,7,7,14,18,6,7,6,9,6,6,18,28,692,717,157,175,270,247,265,295,8,14,229,232,116,132,21,20,8,11,0,2,0,0,13,16,3,0,532,735,414,624,28,35,6,9,5,7,8,5,16,16,0,0,18,11,0,0,100,100,405,308
|
55 |
+
BRAZIL,KOREA REPUBLIC,47%,44%,9%,4,1,05 DEC 2022,20 : 00,Round of 16,18,10,1,4,4,0,0,1,3,0,9,6,8,2,14,6,4,4,20,19,5,4,5,3,7,5,15,21,666,547,149,116,257,270,260,161,17,15,193,188,145,137,21,20,17,14,0,1,0,0,8,13,0,5,616,548,556,486,18,14,4,1,9,13,5,4,16,8,1,0,10,18,0,0,73,81,310,329
|
56 |
+
MOROCCO,SPAIN,22%,68%,10%,0,0,06 DEC 2022,16 : 00,Round of 16,6,13,0,0,0,0,0,0,0,0,3,1,3,6,3,9,3,4,11,36,1,10,0,8,2,19,8,29,438,896,103,182,176,279,159,435,10,27,164,219,86,158,22,37,9,25,1,1,0,0,15,14,5,4,323,1041,229,967,10,27,4,4,4,8,0,8,18,20,0,0,14,6,0,0,100,66,573,217
|
57 |
+
PORTUGAL,SWITZERLAND,43%,48%,9%,6,1,06 DEC 2022,20 : 00,Round of 16,14,10,1,6,6,1,0,0,5,0,9,1,2,7,9,5,5,5,8,18,3,2,6,6,6,2,8,8,614,617,134,115,241,240,239,262,9,8,165,167,98,107,16,17,8,7,0,2,0,0,12,10,3,3,461,512,392,436,14,15,6,1,7,3,6,6,13,15,0,0,10,15,0,0,71,54,357,240
|
58 |
+
CROATIA,BRAZIL,45%,45%,10%,1,1,09 DEC 2022,16 : 00,Quarter-final,9,20,1,1,1,1,0,0,1,1,1,11,4,4,5,12,4,8,19,25,4,10,2,15,5,8,27,20,674,737,156,153,250,239,268,345,10,11,240,185,180,121,16,19,10,10,2,3,0,0,22,24,3,3,715,695,632,625,22,25,5,6,13,4,3,7,27,25,0,0,21,9,0,0,95,77,365,423
|
59 |
+
NETHERLANDS,ARGENTINA,45%,44%,11%,2,2,09 DEC 2022,20 : 00,Quarter-final,5,15,2,2,2,2,0,0,2,1,2,6,2,8,3,5,2,10,11,7,7,7,9,13,3,6,15,17,722,644,117,97,278,278,327,269,5,7,194,203,130,122,15,24,6,8,8,8,1,0,30,18,1,2,651,603,557,511,22,16,4,4,5,4,2,8,20,30,0,1,15,5,0,0,91,79,401,323
|
60 |
+
MOROCCO,PORTUGAL,22%,65%,13%,1,0,10 DEC 2022,16 : 00,Quarter-final,9,11,0,1,1,0,0,0,1,0,3,3,6,6,5,7,4,4,4,27,1,10,4,8,1,7,3,20,339,780,68,205,150,208,121,367,6,19,128,167,63,118,13,23,3,18,3,1,1,0,15,9,2,2,229,678,171,592,8,33,3,7,4,9,3,9,11,17,0,0,11,10,0,0,88,44,373,165
|
61 |
+
ENGLAND,FRANCE,54%,36%,10%,1,2,10 DEC 2022,20 : 00,Quarter-final,14,9,2,1,1,1,0,1,0,2,6,5,4,3,6,6,8,3,17,15,6,2,4,7,2,2,10,13,661,401,127,84,312,136,222,181,8,7,147,136,108,87,13,14,10,8,1,3,0,0,10,14,1,2,508,369,453,310,22,13,5,6,5,2,5,2,14,11,1,0,9,15,0,0,49,54,193,308
|
62 |
+
ARGENTINA,CROATIA,34%,54%,12%,3,0,13 DEC 2022,20 : 00,Semi-final,10,12,0,3,3,0,0,0,1,0,7,3,2,7,7,6,3,6,8,18,9,6,7,7,3,4,2,8,349,643,89,136,122,291,138,216,7,3,147,182,91,129,17,9,7,1,2,2,0,0,15,8,1,0,408,624,344,551,8,20,2,4,4,8,2,4,6,16,1,0,12,10,0,0,85,63,321,260
|
63 |
+
FRANCE,MOROCCO,34%,55%,11%,2,0,14 DEC 2022,20 : 00,Semi-final,14,13,0,2,2,0,0,0,0,0,2,1,8,6,12,8,2,5,9,10,6,4,3,6,2,6,6,19,330,702,82,136,99,314,149,252,8,15,126,141,85,95,12,18,8,11,0,1,0,0,11,11,4,3,358,583,307,518,5,22,2,1,1,8,2,3,13,15,0,0,13,14,0,0,72,47,328,218
|
64 |
+
CROATIA,MOROCCO,45%,45%,10%,2,1,17 DEC 2022,16 : 00,Play-off for third place,14,7,1,2,2,1,0,0,2,0,4,2,8,5,7,5,7,2,20,13,8,1,3,3,2,7,7,16,519,609,117,127,198,202,204,280,15,10,164,150,114,97,23,14,12,8,0,2,0,0,13,11,2,2,491,494,430,428,21,20,3,5,7,12,6,3,13,15,0,0,7,14,0,0,75,72,288,277
|
65 |
+
ARGENTINA,FRANCE,46%,40%,14%,3,3,18 DEC 2022,16 : 00,Final,21,10,3,3,3,3,0,0,1,1,9,5,9,3,10,7,11,3,13,15,6,7,8,5,9,4,9,12,607,507,146,105,257,207,204,195,43,10,223,163,151,99,38,14,23,9,4,3,0,0,26,19,4,4,648,516,544,419,20,24,4,3,6,5,6,5,22,28,1,2,11,21,0,0,87,104,280,409
|
FIFA_World_Cup_2022_Soundtrack.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5987f4f95460f6a1fee0612c4220ffd14bda3c1be7264b67e7504ab14b710ba8
|
3 |
+
size 14856689
|
Fifa World Cup Opening Shows for Concept K.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:978f339f04f1e90943c7c786bce8a06e182fd9ae6c3bd886c119e6896cfb1d02
|
3 |
+
size 19262106
|
Image_6.jpg
ADDED
![]() |
Image_7.jpg
ADDED
![]() |
hayya-hayya-better-together-fifa-world-cup-2022-8d-audio-version-use-headphones-8d-music-song-128-ytshorts.savetube.me.mp3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1bd29836476bb69f65a4149c7c0bc9258391c4dd6c156df148999157d26393f
|
3 |
+
size 3221981
|
k-naan-waving.mp3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d570c95588c63a131d145074b516742e388763fcf7f081a2d2f8b2a6aaac4f26
|
3 |
+
size 3597165
|
quatar2022.jpeg
ADDED
![]() |
requirements.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit
|
2 |
+
pandas
|
3 |
+
Pillow
|
4 |
+
matplotlib
|
5 |
+
seaborn
|
6 |
+
numpy
|
7 |
+
plotly>=5.0.0
|
8 |
+
shapash
|
9 |
+
scikit-learn
|
10 |
+
tensorflow
|
11 |
+
codecarbon
|
12 |
+
mlflow
|
shakira-la-la-la.mp3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d6882c0a1695b66c96e51cdf371a3a5fef4e2ea5db59abb224befc00a8f8652
|
3 |
+
size 3365997
|
shakira-waka-waka.mp3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1136239b345d6f3d88b28cc4005aa0d966391975c0ae8a974bcc7475a593296
|
3 |
+
size 3371757
|
sound_effect.mp3
ADDED
Binary file (104 kB). View file
|
|
vecteezy_qatar-fifa-world-cup-2022-animation-de-particules-intro_14441286.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:10ac056e755a8334d07bbbdd542585128837194daf2f4b147e3a0c1c43fc2af9
|
3 |
+
size 56566037
|
we-are-one-ole-ola.mp3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:74501021101aa9df9a5e32ab6d4a46bdacaa9ced747e23635f82494f255abf5e
|
3 |
+
size 3933549
|