# Ethiopian Medical Telegram Data Pipeline
This project is an end-to-end data platform that scrapes public Telegram channels related to Ethiopian medical businesses, stores the data in a structured raw format (data lake), and prepares it for transformation and enrichment in a modern ELT pipeline. The goal is to analyze product mentions, image content, pricing trends, and posting activity.
---
## π Project Objectives
- Scrape messages and images from public Telegram channels.
- Store raw, partitioned data in a data lake.
- Load the raw data into PostgreSQL for transformation.
- Prepare for YOLOv8 image enrichment and analytical API deployment using FastAPI.
---
## π Project Structure
```bash
.
βββ data/
β βββ raw/
β βββ telegram_messages/
β βββ YYYY-MM-DD/
β βββ channel_name.json
β βββ images/
β βββ channel_name/
βββ scripts/
β βββ scrape_telegram.py # Scrapes messages and images from Telegram
β βββ load_raw_to_postgres.py # Loads JSON data into raw.telegram_messages table
β βββ test.py # One-time login script for Telegram (session setup)
βββ Dockerfile
βββ docker-compose.yml
βββ .env # Environment variables (not committed)
βββ .gitignore
βββ requirements.txt
βββ README.md
β
Tasks Completed
π§ Task 0: Project Setup & Environment Management
β
Initialized Git repository
β
Created requirements.txt with all dependencies (Telethon, dbt, FastAPI, YOLO, Dagster, etc.)
β
Wrote Dockerfile and docker-compose.yml to containerize the app and database
β
Configured .env file for secrets (Telegram API credentials, DB settings)
β
Verified reproducible local setup
π₯ Task 1: Data Scraping and Collection
β
Used Telethon to scrape messages and images from public channels like:
@lobelia4cosmetics
@tikvahpharma
β
Stored raw message data in:
bash
Copy
Edit
data/raw/telegram_messages/YYYY-MM-DD/channel_name.json
β
Downloaded image content to:
swift
Copy
Edit
data/raw/tel β¦