Skip to content

This project analyzes monthly revenue data (Jan–Dec 2024) using Python (Google Colab) and PostgreSQL (Supabase). It automates data import from multiple Excel files, uploads to Supabase, and answers real business questions using SQL.

Notifications You must be signed in to change notification settings

shoaibahmed07/Automation_Python_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Automation_Python_script

📊 Monthly Revenue SQL Analysis (2024)

This project demonstrates an end-to-end data analytics workflow using Google Colab and Supabase. The goal is to analyze monthly revenue data (Jan–Dec 2024) stored in Excel/CSV format and answer real-world business questions using SQL.


🧰 Tech Stack

  • 🐍 Python (Google Colab)
  • 🧮 Pandas
  • 📁 CSV/Excel
  • 🌐 Supabase (PostgreSQL)
  • 📝 Supabase SQL Editor

📁 Dataset

12 monthly CSV files named in the format:
monthly_revenue_plan - Jan_2024.csv, ..., monthly_revenue_plan - Dec_2024.csv

Columns:

  • date
  • city_code
  • plans
  • plan_revenue_crores

📌 Project Workflow

  1. Data Upload
    Uploaded all 12 monthly files to Google Colab using files.upload().

  2. Data Processing

    • Read all CSVs into Pandas DataFrames
    • Concatenated into one final DataFrame
    • Cleaned and validated the data
  3. Supabase Connection

    • Used psycopg2 to connect to Supabase PostgreSQL instance
    • Created a table and uploaded the cleaned data
  4. SQL Queries & Analysis
    All queries were written and executed using the Supabase SQL Editor.


❓ Business Questions Solved

  1. Total Revenue Calculation
  2. Revenue Tracking by City and Date
  3. Top Revenue-Generating Plan
  4. Retrieve City Codes Using a Specific Plan
  5. Total Revenue Contribution for Plan P3

📚 Key Learnings

  • Cloud-based SQL workflow with Supabase
  • Writing ad-hoc SQL queries for business insights
  • Automating Excel import and upload to PostgreSQL
  • Handling real datasets in Python

📎 Folder Structure

.
├── notebooks/
│   └── monthly_revenue_analysis.ipynb  # Google Colab notebook
├── data/
│   └── monthly_revenue_plan - Jan_2024.csv
│   └── ...
├── README.md

About

This project analyzes monthly revenue data (Jan–Dec 2024) using Python (Google Colab) and PostgreSQL (Supabase). It automates data import from multiple Excel files, uploads to Supabase, and answers real business questions using SQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published