Skip to content

T1218-SPEC/data-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Data Visualization Project

Description

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.

Project Overview

  • 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

Installation

Prerequisites

  • Python 3.x installed on your system

Required Libraries

Install the required packages using pip:

pip install matplotlib pandas

Or install from requirements.txt:

pip install -r requirements.txt

How to Run

  1. Clone or download the repository

  2. Navigate to the project directory

  3. Run the Python script:

    python shoprite_analysis.py
  4. 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

Data Structure

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]

Visualizations Included

  1. Pie Chart - Shows the proportion of profit for each year
  2. Bar Graph - Displays profit as vertical bars for each year
  3. Horizontal Bar Graph - Shows profit as horizontal bars
  4. Line Graph - Illustrates profit trends over time

Learning Outcomes

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

Use Cases

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

Author

Created as a learning project for Information Management studies at University of Johannesburg (UJ)

License

This project is open for educational use.

Future Improvements

  • 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)

Questions or Feedback?

Feel free to fork this repository, make improvements, or share suggestions!

About

"Data visualization project analyzing Shoprite's profit data over 8 years using Python, Pandas, and Matplotlib"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages