App Deployed Here ---> https://footballapp.streamlit.app/
Incase the App malfunctions here's a demo:
(https://www.youtube.com/watch?v=MqCAH1u2aao&ab_channel=Sasi)
This code is a Streamlit app for exploring English Premier League (EPL) football team statistics.
For the Data Visualisation UI, the package used is PygWalker Check it out here: https://kanaries.net/home/pygwalker
Let me break down the key components for you:
1/ Imports
These are Python libraries used for creating the web app (Streamlit for the app interface), handling data (Pandas, NumPy), and creating visualizations (PygWalker).
StreamlitRender is for rendering the Dashboard UI
init_streamlit_com is for initiating communication between pygwalker and streamlit
GlobalVarManager is to set the Kanaries API for the chat feature.
2/ App Title and Description:
It sets the title of the app and provides a brief description of what the app does, including the Python libraries used and the data source.
3/ User Input Sidebar
The sidebar allows users to select the year for which they want to explore EPL stats.
4/ Data Source and Web Scraping
The load_data function retrieves EPL team stats for the selected year by scraping data from the provided URL. The data is stored in a Pandas DataFrame.
5/ User Input for Team Selection
Users can select one or more teams from the sidebar.
The data is filtered based on the selected teams, and the resulting DataFrame is displayed.
6/ Visualization
A button is provided to generate a visualization using the PygWalker library.
The button triggers the creation and rendering of a PyGWalker visualization using a cached instance of the StreamlitRenderer class.