Skip to content

Online Course Recommendation App (Data Science) || Tech Stack: Python 3.11+, Flask 3.x, Jinja2, Streamlit 1.x, pandas, numpy, scikit-learn, scipy, joblib, nltk, HTML5/CSS/Bootstrap

License

Notifications You must be signed in to change notification settings

AAdewunmi/Online-Course-Recommendation-App-Project

Repository files navigation

Online Course Recommendation App

A lightweight Flask application for searching Udemy courses by keyword and exploring dataset insights via an interactive dashboard. The app uses pandas for data wrangling and Chart.js for visualisations.

Python Flask pandas scikit-learn License


Table of Contents


Overview

The application has two main surfaces:

  1. Home – Keyword search across course_title (case-insensitive, literal match).

  2. Dashboard – Descriptive statistics, including:

    • Number of Subscribers Domain (Subject) Wise
    • Number of Courses Level Wise
    • Subscribers Year Wise
    • Profit Year Wise
    • Profit Month Wise
    • Subscribers Month Wise

The repo includes a ready-to-use CSV (UdemyCleanedTitle.csv) and simple Flask views that render Bootstrap-powered templates.


Features

  • πŸ”Ž Fast keyword search over course titles
  • πŸ“Š Interactive charts (Chart.js) for quick insights
  • 🧹 Robust CSV handling (column normalisation, safe parsing)
  • 🧩 Modular dashboard helpers (clean Pandas groupbys)
  • πŸ§ͺ Test-ready structure with pytest examples (optional)

Tech Stack

  • Backend: Flask (Python)
  • Data: pandas, numpy
  • ML/Text utils: scikit-learn (optional TF-IDF), neattext
  • Frontend: Bootstrap 4, Chart.js

Architecture

  • app.py

    • / (Home): reads CSV, performs keyword search in course_title, renders index.html
    • /dashboard: computes aggregates via dashboard.py, renders dashboard.html
  • dashboard.py

    • Pure-Python helpers that return dictionaries used by the charts
  • templates/

    • index.html – search form + results list
    • dashboard.html – six charts driven by injected dictionaries

Dataset

  • File: UdemyCleanedTitle.csv

  • Required columns: course_title, url, price, num_subscribers, level, published_timestamp, subject

  • Notes:

    • price is coerced to numeric (non-numeric like β€œFree/TRUE” become 0)
    • published_timestamp parsed as date (YYYY-MM-DD from YYYY-MM-DDTHH:MM:SSZ)

Quick Start

1) Clone

git clone https://github.com/AAdewunmi/Online-Course-Recommendation-App-Project.git
cd Online-Course-Recommendation-App-Project

2) Create & activate a virtual environment

python3 -m venv venv
source venv/bin/activate           # macOS/Linux
# .\venv\Scripts\activate          # Windows (PowerShell)

3) Install dependencies

pip install --upgrade pip
pip install -r requirements.txt

If you don’t have a requirements.txt, install the essentials:

pip install flask pandas numpy scikit-learn neattext

4) Run the app

export FLASK_APP=app.py            # macOS/Linux
export FLASK_ENV=development
flask run

# or simply
python app.py

Open: http://127.0.0.1:5000/


Project Structure

Online-Course-Recommendation-App-Project/
β”œβ”€ app.py
β”œβ”€ dashboard.py
β”œβ”€ UdemyCleanedTitle.csv
β”œβ”€ templates/
β”‚  β”œβ”€ index.html
β”‚  └─ dashboard.html
β”œβ”€ static/                      # (optional)
β”œβ”€ requirements.txt             # (recommended)
β”œβ”€ tests/
β”œβ”€ test_app_routes.py
β”œβ”€ test_dashboard_helpers.py
└─ conftest.py

Usage

Home (Search)

  • Navigate to /
  • Enter keywords (e.g. β€œexcel”, β€œpython”, β€œfinance”)
  • Results show course titles with a View Course button linking to url

Dashboard (Descriptive Stats)

  • Navigate to /dashboard

  • Six charts render using aggregated dictionaries injected by Flask:

    • valuecounts, levelcounts, subjectsperlevel
    • yearwiseprofitmap, subscriberscountmap
    • profitmonthwise, monthwisesub

Testing

Run tests:

pytest -q

Configuration

No environment variables are required for basic usage. Place UdemyCleanedTitle.csv in the repository root (or update the path in app.py).


Screenshots

Add your screenshots/gifs here once the app is running locally.

  • Home (Search)
Image
  • Dashboard (Charts)
Image

Roadmap

  • TF-IDF–based β€œSimilar Courses” recommendations as a secondary mode
  • Search over additional fields (e.g., subject, level)
  • Pagination / client-side filtering for large result sets
  • Dockerfile + Compose for one-command setup
  • GitHub Actions for CI (pytest, lint)

Troubleshooting

  • Black & white charts: ensure you’re using the latest dashboard.html with color palette (Chart.js dataset backgroundColor/borderColor explicitly set).
  • KeyError on columns: confirm the CSV contains required columns: course_title, url, price, num_subscribers, level, published_timestamp, subject
  • Unicode/CSV errors: try encoding="utf-8" in pd.read_csv or clean the CSV.

Contributing

Pull requests are welcome. For major changes, please open an issue to discuss what you’d like to change. If you add dependencies, update requirements.txt.

Suggested workflow

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/something
  3. Commit changes with clear messages
  4. Add/Update tests
  5. Open a PR

License

This project is licensed under the MIT License. See LICENSE for details.

About

Online Course Recommendation App (Data Science) || Tech Stack: Python 3.11+, Flask 3.x, Jinja2, Streamlit 1.x, pandas, numpy, scikit-learn, scipy, joblib, nltk, HTML5/CSS/Bootstrap

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages