https://github.com/buildwithlal/youtube-trending-video-analytics
This repository shows some interesting video analytics from YouTube based in United States for the year 2017 and 2018. These analytics are based on the stats file from Kaggle. The repository has Jupyter Notebook to visualize the stats in browser and also has a FastAPI app to serve some interesting stats using REST endpoints.
https://github.com/buildwithlal/youtube-trending-video-analytics
Last synced: 2 months ago
JSON representation
This repository shows some interesting video analytics from YouTube based in United States for the year 2017 and 2018. These analytics are based on the stats file from Kaggle. The repository has Jupyter Notebook to visualize the stats in browser and also has a FastAPI app to serve some interesting stats using REST endpoints.
- Host: GitHub
- URL: https://github.com/buildwithlal/youtube-trending-video-analytics
- Owner: BuildWithLal
- Created: 2023-12-26T17:42:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-27T11:39:55.000Z (over 1 year ago)
- Last Synced: 2025-01-02T00:42:30.296Z (4 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 28.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### YouTube Trending Video Analytics
This repository shows some interesting video analytics from YouTube based in United States for the year 2017 and 2018.
These analytics are based on the stats file from Kaggle [here](https://www.kaggle.com/datasets/datasnaek/youtube-new)The repository has Jupyter Notebook to visualize the stats in browser and also has a FastAPI app to serve some interesting stats using REST endpoints.
Both the Jupyter and FastAPI source code is dockerized and could be run through docker compose to avoid running manual steps for installing dependencies, CLIs and servers.#### Tech Stack
* Python 3.11
* Pandas
* Matplotlib
* Numpy
* FastAPI
* SQLAlchemy
* SQLite
* Jupyter
* Uvicorn
* Docker#### Setup and Run project
Follow these steps to setup and run both FastAPI app and Jupyter notebookClone this repo
```
git clone https://github.com/lalatgithub/youtube-trending-video-analytics.git
```Switch to cloned dir and run.
```
cd youtube-trending-video-analytics
```*NOTE: If you want to run FastAPI app and Jupyter on a different port, Please update `.env` accordingly in root dir.*
```
docker compose up
```
once docker compose runs successfully, you should be able to fetch data from REST endpoints here [http://localhost:8000/](http://localhost:8000/). You can see that you have a `./analytics.db` file in the project root dir.
The analytics are loaded from `./datasets/USVideos.csv` during the app startup.The Jupyter notebook can be access here
[http://localhost:8888/notebooks/YouTube%20Trending%20Videos.ipynb](http://localhost:8888/notebooks/YouTube%20Trending%20Videos.ipynb)