Video summary
COMPLETE Data Analytics Portfolio Project in 6 EASY Steps | Python + SQL + Power BI
Main summary
Key takeaways
Main ideas / lessons conveyed (end-to-end workflow)
- The video demonstrates an advanced, company-standard, end-to-end data analytics project suitable for a portfolio/resume.
-
Real projects start with a business problem statement, then move through:
- Python (data cleaning + EDA + feature engineering)
- PostgreSQL/SQL (deeper analysis with advanced queries)
- Power BI (interactive dashboard with KPI visuals)
- Project documentation (project report)
- Stakeholder communication (client-ready presentation deck)
- Public showcase (GitHub repository + README, plus LinkedIn sharing)
-
It emphasizes practical corporate realities:
- You rarely get perfect data; you must work with what’s available.
- Cleaning should be done “properly,” not with simplistic shortcuts.
- Managers/clients may not read full reports; presentations are more important.
- Versioned/public work (GitHub) helps recruiters.
Methodology / step-by-step instructions
1) Define the business problem
- Formulate a problem statement based on what stakeholders actually care about.
- Example business question used:
- How to leverage customer shopping data to identify trends, improve engagement, and optimize marketing/product strategies.
2) Data understanding (dataset walkthrough)
- The dataset structure is described as:
- One row per customer, representing their latest purchase.
- Key columns include:
customer ID,age,gender,item purchased,category,purchase amount,location,size,color,season,review rating,subscription status,shipping type,discount applied,promo code used,previous purchases,payment method,frequency of purchases.
- Important limitation discussed:
previous purchasesandfrequency of purchasesare counts/labels, not full transaction histories.
3) Python workflow (Jupyter Notebook)
A. Load and inspect data
- Import pandas and read CSV:
pd.read_csv(...)
- Inspect:
df.head()for previewdf.info()for row/column counts + data typesdf.describe()for summary statistics- Use
include='all'to include categorical stats too
- Use
- Check missing values:
- Identify nulls (example:
review ratinghas 37 null values)
- Identify nulls (example:
B. Handle missing values correctly (recommended approach)
- Consider why not to use mean/overall median:
- Mean is sensitive to outliers.
- Overall median can introduce bias by ignoring category differences.
- Instruction implemented:
- Impute
review ratingwith the median within eachcategory
- Impute
- Steps:
- Group by
category - Fill nulls using category-specific median values
- Verify nulls are resolved afterward
- Group by
C. Standardize column names (“snake casing”)
- Problem: mixed uppercase/lowercase and spaces/special characters make code error-prone.
- Instruction:
- Convert column names to lowercase
- Replace spaces with underscores
- Rename problematic columns (example:
purchase amount USD→purchase_amount)
- Implement with functions like
lower()andreplace(via renaming steps).
D. Feature engineering
- Create an age group feature:
- Use
pd.qcutto split ages into 4 equal-sized groups - Assign labels: young adult, adult, middle-aged, senior
- Use
- Create numeric purchase frequency days:
- Map text frequency labels (e.g., weekly/monthly) to days
- Use a dictionary mapping +
.map(...)
- Remove redundancy:
- Check whether
discount appliedequalspromo code usedacross all rows - If identical, drop redundant column:
- Drop
promo code usedand keepdiscount applied
- Drop
- Check whether
4) Move data to SQL (PostgreSQL as the example)
A. Create database and connect
- Use pgAdmin to:
- Create a database (example name:
customer behavior)
- Create a database (example name:
- Install required packages in Python environment:
psycopg2SQLAlchemy
- Connect using credentials:
- username, password, host, port, database name
- Create/Load a table from the pandas DataFrame:
- Send DataFrame to PostgreSQL as a new table (example:
customer)
- Send DataFrame to PostgreSQL as a new table (example:
B. SQL portability note
- If using other DBs:
- MySQL: install
PyMySQL - SQL Server: install
pyodbc
- MySQL: install
- Core steps remain similar (change credentials + driver).
C. Answer business questions using SQL (examples shown)
The video presents a list of SQL analyses; main concepts include:
-
Revenue by gender
- Aggregate
purchase amountgrouped bygender
- Aggregate
-
Customers using discounts but still spending above average
- Filter rows where
discount applied = yes - Use subquery to compare
purchase amountto overall average
- Filter rows where
-
Top 5 products by highest average review rating
- Group by
item purchased - Compute
AVG(review rating) - Order descending + limit 5
- Note: casting may be needed to use
ROUNDproperly (double precision → cast to numeric)
- Group by
-
Average spend comparison: standard vs express shipping
- Filter
shipping type IN ('standard','express') - Group by
shipping type - Compare averages
- Filter
-
Subscription impact: average spend + total revenue
- Group by
subscription status - Compute counts, average purchase amount, and sum revenue
- (Interpretation: subscribers vs non-subscribers behavior)
- Group by
-
Products with highest discount reliance (discount rate)
- Compute percentage of purchases where discount was applied per product:
SUM(CASE WHEN discount applied='yes' THEN 1 ELSE 0 END) / COUNT(*) * 100
- Order by discount rate desc + limit 5
- Compute percentage of purchases where discount was applied per product:
-
Customer segmentation: new vs returning vs loyal
- Use rules based on
previous purchases:previous purchases = 1→ new2 to 10→ returning> 10→ loyal
- Implement using a CTE + CASE, then count per segment
- Use rules based on
-
Top 3 most purchased products within each category
- Use window functions and ranking:
- Window rank with
ROW_NUMBER()partitioned bycategory
- Window rank with
- Return rows where rank ≤ 3
- Rationale:
ROW_NUMBERavoids issues with ties that affectRANK/DENSE_RANKbehavior when selecting top-N distinct rows
- Use window functions and ranking:
-
Do repeat buyers also subscribe?
- Repeat buyers defined as
previous purchases > 5 - Group by
subscription statusafter filtering repeat buyers - Compare counts for subscribed vs not subscribed
- Repeat buyers defined as
-
Revenue by age group
- Group by
age group - Sum
purchase amount - Order by total revenue desc
- Group by
5) Power BI dashboard build
A. Connect Power BI to the SQL database
- Create a blank report
- Get Data → connect to PostgreSQL (or other DB types)
- Provide:
- server/host, port
- database name (
customer behavior)
- Load table(s) and verify columns.
B. Create measures (core KPIs)
number of customers=count(customer ID)- (The video notes distinct count isn’t needed because each row is a customer)
average purchase amount=AVERAGE(purchase amount)average review rating=AVERAGE(review rating)
C. Visuals and formatting instructions (high-level)
- Use a card visual (multi-card layout) for KPI display:
- Configure formatting: alignment, font size, shapes, colors, glow/shadow
- Correct misleading units:
- Show
3.9Kinstead of an incorrect4K
- Show
- Set currency formatting to USD
- Add a donut chart for subscription distribution:
- Values: count of customer IDs by
subscription status - Show
percent of total, update labels and title - Remove legend to reduce clutter
- Values: count of customer IDs by
- Add charts:
- Revenue by category (clustered column chart using
purchase amountaggregated) - Sales by category (clustered column chart using
count(customer ID)) - Revenue by age group
- Sales by age group
- Revenue by category (clustered column chart using
- Add slicers for interactivity (filtering dashboard):
- Subscription status slicer (button)
- Gender slicer (button)
- Category slicer (vertical button)
- Shipping type slicer (list)
D. Layout guidance
- Adjust canvas size in Power BI (custom height/width)
- Use shapes/containers to improve aesthetics and spacing
- Align/distribute elements horizontally
- Ensure visuals don’t render behind shapes (grouping/positioning fixes)
E. Save the dashboard
- Save as “customer behavior dashboard”.
6) Create project report and presentation deck
A. Project report (documentation)
- Write step-by-step what you did (e.g., loaded data, handled nulls, created new columns, ran SQL, etc.)
- Insert screenshots of code/outputs
- Add business recommendations
- Key lesson:
- Corporate stakeholders often won’t read the full report; it’s mainly documentation.
B. Stakeholder-ready presentation (recommended)
- Use an AI tool called Gamma to generate a professional presentation:
- Create new → import file → upload report
- Choose presentation + layout (minimal/concise)
- Generate in seconds
- Edit/tweak if needed
- Outcome:
- Produces charts/slides using provided screenshots and appears polished for stakeholders.
7) Publish on GitHub + marketing (portfolio visibility)
A. Create GitHub repository
- New repository → name it (example: customer behavior analysis)
- Add README
- Optionally add license (example: MIT)
- Upload project files and commit changes
B. Build README (using ChatGPT option)
- README is the “cover page” of the GitHub repo.
- Suggestion:
- Generate a professional README via ChatGPT using a prompt covering:
- dataset loading
- EDA & cleaning
- running SQL queries
- building Power BI dashboard
- Generate a professional README via ChatGPT using a prompt covering:
- Use sections like: Overview, Dataset, Tools, Dashboard, Results.
C. Share on LinkedIn for recruiter visibility
- Export presentation to PDF
- Create LinkedIn post:
- Add document (PDF)
- Include title like “customer behavior data analysis”
- Share GitHub link/PPT
- Tag the creator (example: @Amlan) for increased reach
Main concepts highlighted (what to learn from the project)
- Portfolio differentiation: one project that covers the whole pipeline (Python → SQL → Power BI → reporting/presentation → GitHub).
- Data cleaning correctness matters:
- Example: category-wise median imputation reduces bias.
- Schema consistency reduces errors:
- Snake casing avoids quoting/formatting issues in Python and SQL.
- Feature engineering improves analytical power:
- age grouping and numeric conversion of frequency.
- SQL depth:
- subqueries, conditional aggregation (CASE), CTEs, window functions.
- Dashboard interactivity:
- slicers + charts built around KPIs and segmentation.
- Communication strategy:
- report = documentation (nice to have)
- presentation = what stakeholders actually use
- Distribution strategy:
- GitHub + LinkedIn sharing makes work visible to recruiters.
Speakers / sources featured
- Speaker (primary): The video’s narrator/instructor, referred to by name Amlan (spoken in the subtitles: “but Amlan, we don’t know…”).
- Tools mentioned as sources: Gamma (AI presentation generator), ChatGPT (for README generation).
- Software platforms mentioned: Python, Jupyter Notebook, PostgreSQL/pgAdmin, MySQL/MS SQL Server (alternatives), Power BI, GitHub, LinkedIn.