Skip to content

This project analyzes the average consumer prices of essential items across major Pakistani cities, using weekly data published by the Pakistan Bureau of Statistics (PBS). The goal is to visualize price changes week-on-week and highlight trends in essential items.

Notifications You must be signed in to change notification settings

faraz-abbasi/Consumer_Prices_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Weekly Consumer Prices Analysis - Pakistan

This project analyzes the average consumer prices of essential items across major Pakistani cities, using weekly data published by the Pakistan Bureau of Statistics (PBS). The goal is to visualize price changes week-on-week and highlight trends in essential items.


Dataset

Two Excel files are used in this analysis:

  • Annex_07.08.2025.xlsx – Prices for the week ending 07-08-2025
  • SPI-Annex_24.04.2025.xlsx – Prices for the week ending 24-04-2025

Each file contains average prices of essential items across various cities.


Project Structure

  • Consumer_Prices_Analysis.ipynb – Jupyter Notebook containing:

    1. Data cleaning and preparation
    2. Heatmap of previous week's prices
    3. Heatmap of current week's prices
    4. Week-on-week comparison heatmap
    5. Bar-plot showing max price increases and decreases per item
  • data/ – Folder containing the Excel files

  • images/ – Folder containing visualizations:

    • previous_week.png
    • current_week.png
    • price_changes.png
    • highlight.png

Libraries Used

  • pandas – For data cleaning, manipulation, and combining multiple sheets
  • matplotlib – For creating plots and heatmaps
  • seaborn – For enhanced visualization and color-coded heatmaps

Features

  1. Heatmap of Previous Week – Shows average prices of essential items with highest prices highlighted.
    Previous Week

  2. Heatmap of Current Week – Same as above but for the latest week.
    Current Week

  3. Week-on-Week Comparison – Highlights price increases (green) and decreases (red) for easy insight.
    Price Changes

  4. Bar Plot of Max-Min Prices – Shows the max price increases and decreases per item.
    Bar Plot


How to Run

  1. Clone the repository:
git clone https://github.com/faraz-abbasi/Consumer_Prices_Analysis.git
  1. Open the Jupyter Notebook (Consumer_Prices_Analysis.ipynb) in Jupyter Lab or VS Code.
  2. Install the required Python libraries (if not already installed):
pip install pandas matplotlib seaborn openpyxl
  1. Update the Excel file paths in the notebook if necessary.
  2. Run the notebook cell by cell to view the visualizations and insights.

About

This project analyzes the average consumer prices of essential items across major Pakistani cities, using weekly data published by the Pakistan Bureau of Statistics (PBS). The goal is to visualize price changes week-on-week and highlight trends in essential items.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published