This coding example is part of a Udemy Python course using Python Pandas library with JustPy to plot graphs from DataFrames onto web pages for interactive data visualisation. The source data is imported into a Pandas DataFrame from a .csv file and presented on a web page using JustPy Quasar pages and HighCharts.
- Python3
- Used to create the main application functionality
- Pandas
- Used to manipulate raw data from a csv file in a DataFrame
- JustPy
- Quasar WebPages are used to render http output pages
- HighCharts JS code is used to render the charts within the WebPage.
- Jupyter Notebook
- Used to create the code and explanation
The website was developed using Gitpod using Git pushed to GitHub, which hosts the repository. I made the following steps to deploy the site:
Ensure the following are installed locally on your computer:
- Python 3.6 or higher
- PIP3 Python package installer
- Git Version Control
- navigate to simonjvardy/Data_Analysis_and_Visualisation GitHub repository.
- Click the Code button
- Copy the clone url in the dropdown menu
- Using your favourite IDE open up your preferred terminal.
- Navigate to your desired file location.
Copy the following code and input it into your terminal to clone Sportswear-Online:
git clone https://github.com/simonjvardy/Data_Analysis_and_Visualisation.git
Note: The process may be different depending upon your own OS - please follow this Python help guide to understand how to create a virtual environment.
- In your IDE terminal window, install the dependencies from the requirements.txt file with the following command:
pip3 install -r requirements.txt
- In your IDE terminal window, enter:
python3 1-average-rating-day.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Day graph.
python3 2-average-rating-week.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Week graph.
python3 3-average-rating-month.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Month graph.
python3 4-average-rating-month-course.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Month by Course graph.
python3 5-average-rating-month-course-stream.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Month by Course graph.
python3 6-happiest-day-of-week.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Average Rating by Day of the Week graph indicating when the Students are happiest to leave a good review.
python3 7-rating-count-by-course-pie.py
Output runs locally in a web browser using URL http://127.0.0.1:8000/ to show the Rating Count by Course pie chart.
- Udemy: The Python Mega Course - Build 10 Real World Applications Credit: Ardit Sulce