This project analyzes a user's YouTube watch history data downloaded from Google Takeout. It provides insights into watch patterns, content preferences, and overall YouTube consumption.
- Go to the Google Takeout website: Google Takeout
- Sign in with your Google account.
- Select "YouTube History" under "Choose data to export".
- Choose JOSN file type and delivery options.
- Click "Create export".
- Wait for the export process to complete and download the file.
Or refer to this blog at dev.to.
- Gain valuable insights into your YouTube viewing habits.
- Discover your content preferences and identify areas of interest.
- Track your progress towards achieving your YouTube goals.
- Make informed decisions about your YouTube consumption.
If you want to see my π notebooks where I have done some interesting analysis on the datasets which I have used in this project then you can se them in my @arv-anshul/notebooks github repository.
This guide helps you set up and run this project using Docker Compose. The project consists of a frontend and backend service.
-
Clone the Repository:
git clone https://github.com/arv-anshul/yt-watch-history
-
Configuration:
-
Open the
docker-compose.yml
file in the project root. -
Set the following environment variables in the
frontend
service:YT_API_KEY
: Replacenull
with your YouTube API key.API_HOST
: Should match the name of the backend service (backend
in this case).API_PORT
: Port number for the backend service (default is8001
).LOG_LEVEL
: Logging level (default isINFO
).
-
Set the following environment variables in the
backend
service:MONGODB_URL
: Replacenull
with your MongoDB URL.API_PORT
: Port number for the backend service (default is8001
).API_HOST
: Set to"0.0.0.0"
.LOG_LEVEL
: Logging level (default isINFO
).
-
-
Build and Run:
docker-compose up --build
-
Access the application:
- Frontend: Open a browser and go to
http://localhost:8501
. - Backend: Accessed internally via the configured API endpoints. Or access locally at
http://0.0.0.0:8001
.
- Frontend: Open a browser and go to
Note
- Frontend service runs on port
8501
locally. - Backend service runs on port
8001
locally. - Make sure no other services are running on these ports.
/frontend
and/backend
directories are mounted as volumes for the respective services./frontend/data
and/backend/ml_models
directories are mounted for persistent data storage.