This project demonstrates data visualization techniques using Python, Pandas, and Matplotlib. It analyzes Shoprite's profit data over an 8-year period (2017-2024) and presents the data through multiple visualization methods including pie charts, bar graphs, horizontal bar charts, and line graphs.
- Purpose: Visualize profit trends for Shoprite over 8 years
- Data Period: 2017-2024
- Visualizations: 4 different chart types on a single figure
- Technologies: Python, Pandas, Matplotlib
- Python 3.x installed on your system
Install the required packages using pip:
pip install matplotlib pandasOr install from requirements.txt:
pip install -r requirements.txt-
Clone or download the repository
-
Navigate to the project directory
-
Run the Python script:
python shoprite_analysis.py
-
View the output:
- A table showing the profit data will be printed to the console
- A figure with 4 subplots will be displayed showing different visualizations
The project uses the following data:
- Years: 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024
- Profit Values: [4000000, 800000, 7000000, 6000000, 7000000, 6327823, 7820200, 8000000]
- Pie Chart - Shows the proportion of profit for each year
- Bar Graph - Displays profit as vertical bars for each year
- Horizontal Bar Graph - Shows profit as horizontal bars
- Line Graph - Illustrates profit trends over time
This project demonstrates:
- How to work with Python dictionaries and Pandas DataFrames
- Creating multiple subplots in Matplotlib
- Various chart types and their appropriate uses
- Data visualization best practices
- Basic data analysis with Python
Perfect for:
- Information Management students learning data visualization
- Business analysts studying profit trends
- Python learners practicing Matplotlib and Pandas
- Portfolio building for data analysis roles
Created as a learning project for Information Management studies at University of Johannesburg (UJ)
This project is open for educational use.
- Add more years of data
- Include statistical analysis (mean, median, trend lines)
- Add interactivity with Plotly
- Create a dashboard with additional metrics
- Add data export functionality (CSV, Excel)
Feel free to fork this repository, make improvements, or share suggestions!