Skip to content

yenatariys/etl-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 App Review ETL & Sentiment Analysis Pipeline

📖 Project Overview

Proyek ini bertujuan untuk membangun ETL pipeline (Extract, Transform, Load) yang memproses ulasan pengguna aplikasi dari Play Store, kemudian melakukan analisis sentimen otomatis menggunakan lexicon-based method dan machine learning (SVM) dengan dua metode ekstraksi fitur (TF-IDF & IndoBERT Embeddings).

Pipeline ini dirancang agar proses berjalan otomatis — mulai dari scraping data, cleaning, analisis sentimen, hingga menyimpan hasil akhir ke dalam database PostgreSQL.


🚀 Project Workflow

Berikut alur utama dari pipeline:

  1. Extract

    • Mengambil data ulasan dari Play Store (file: extract_scraper.py)
    • Hasilnya disimpan dalam format .csv
  2. Transform & Clean

    • Translasi bahasa ulasan (jika masih berbahasa asing)
    • Text preprocessing: cleaning, tokenization, stopword removal, dan stemming (file: transform_clean.py)
    • Pelabelan sentimen otomatis menggunakan InSet Lexicon (positive & negative word dictionary)
  3. Analyze & Visualize

    • Analisis statistik deskriptif dari data ulasan (file: analyze_statistics.py)
    • Visualisasi distribusi sentimen, frekuensi kata, dan pola ulasan (file: visualize_data.py)
  4. Model Training (Machine Learning)

    • Training model Support Vector Machine (SVM) untuk klasifikasi sentimen berdasarkan dataset yang sudah dilabeli (file: train_svm_model.py)
    • Menggunakan dua metode ekstraksi fitur (TF-IDF & IndoBERT Embeddings)
    • Menampilkan hasil dengan dan tanpa SMOTE
  5. Load to Database

    • Menyimpan hasil akhir ke PostgreSQL database menggunakan SQLAlchemy (file: load_to_sql.py)
  6. Pipeline Orchestrator

    • Semua langkah di atas dijalankan secara otomatis melalui file utama:
      👉 pipeline.py

🧱 Project Structure

APP REVIEW ETL Project/
├── Analysis/
│   └── statistik.py                   # Analisis tambahan dan eksplorasi data
│
├── ETL/ 
│   ├── InSet-master/                  # Lexicon (Indonesian Sentiment Lexicon)
│   │   ├── positive.tsv
│   │   ├── negative.tsv
│   │   └── README.md
│   │
│   ├── extract_scraper.py                 # Scraping ulasan dari Play Store
│   ├── transform_clean.py                 # Translasi, Cleaning, Tokenisasi, Stopword Removal, Stemming dan pelabelan sentimen
│   ├── analyze_statistics.py              # Analisis statistik deskriptif ulasan
│   ├── visualize_data.py                  # Visualisasi hasil analisis (grafik sentimen, distribusi, dll)
│   ├── train_svm_model.py                 # Training model klasifikasi SVM
│   ├── load_to_sql.py                     # Load hasil akhir ke database PostgreSQL
│   ├── inconsistency.py                   # Analisis inkonsistensi antara rating dan sentimen
│   └── pipeline.py                        # Pipeline utama untuk menjalankan seluruh proses ETL

│   ├── data/                              # Tempat menyimpan file .csv
│   │   ├── review_play_2020_2022.csv      # File ulasan 2020-2022
│   │   ├── review_play_2023_2025.csv      # File ulasan 2023-2025
│   │   ├── review_play_combined.csv       # File ulasan gabungan 
│   │   └── review_play_with_sentiment.csv # Hasil akhir
├── README.md                              # Dokumentasi utama proyek
├── requirements.txt                       # Dependency


🧰 Tech Stack & Libraries

Layer Tools / Libraries
Extract google-play-scraper
Transform pandas, googletrans, nltk, Sastrawi
Analyze & Visualize matplotlib, seaborn, wordcloud
Machine Learning scikit-learn, numpy
Load SQLAlchemy, psycopg2, PostgreSQL
Automation subprocess, os

⚙️ How to Run

  1. Clone repository
    git clone https://github.com/yenatariys/etl-project.git
    cd etl-project/ETL
  2. Install dependencies
    pip install -r requirements.txt
  3. Jalankan PostgreSQL (Via Docker)
    docker run -d --name postgres-db \
    -e POSTGRES_USER=myuser \
    -e POSTGRES_PASSWORD=mypassword \
    -e POSTGRES_DB=mydatabase \
    -p 5432:5432 postgres:15
  4. Run Pipeline Utama
    python pipeline.py
  5. Cek Hasil
    • File hasil akhir (file: review_play_with_sentiment.csv)
    • Tabel hasil di PostgreSQL: app_reviews

💡 Key Learnings

  • Mendesain alur ETL otomatis dari raw data hingga database.
  • Penerapan text preprocessing pipeline yang lengkap untuk Bahasa Indonesia.
  • Penggunaan InSet Lexicon dan SVM untuk klasifikasi sentimen.
  • Mengintegrasikan hasil analisis dengan PostgreSQL melalui SQLAlchemy.
  • Membangun pipeline terotomasi yang mudah dijalankan dengan satu perintah.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

End-to-end pipeline for collecting, preprocessing, and analyzing app reviews to determine user sentiment using Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages