Skip to content

Web app to predict future followers on Youtube, Twitch, and Twitter.

License

Notifications You must be signed in to change notification settings

dzionek/social-media-predict

Repository files navigation

Build Status codecov Checked with mypy Language grade: JavaScript Language grade: Python

Social Media Predict

This web application uses Machine Learning to predict the future number of subscribers/followers of a YouTube, Twitch, or Twitter channel. Type the url of the channel and see an interactive chart containing statics of the channel in the last month and in the future.


Fig. 1   Prediction of Twitter followers for Bill Gates.


On the server side the app is powered by Python and Django. The frontend is built using React in TypeScript and SCSS styling, all bundled by Webpack.

Usage

Local development

You need to have Python package manager pip and JavaScript package manager npm from Node.JS.

You should optionally create a virtual environment for Python. Then, install the requirements.

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

Currently the project doesn't make use of any database. You can still make database migrations, though.

python manage.py makemigrations
python manage.py migrate

Then go to the frontend directory and install JS dependencies.

cd frontend
npm install --save

Bundle TypeScript React code and SCSS files.

npm run dev  # use npm run dev:watch to watch for any changes

Finally, go back to the main directory and run the server. The app will be present at 127.0.0.1:8000.

python manage.py runserver

Before each commit you should check whether CI is passing, make use of check.sh

bash check.sh

Production

Use Docker to build the image from Dockerfile and then run the container on port 8000. The website will be available at localhost:8000.

docker build --tag predict .
docker run --publish 8000:8000 predict

More screenshots


Fig. 2   The panel to choose a platform and type a username.




Fig. 3   Prediction of YouTube subscribers for Tech with Tim.




Fig. 4   Prediction of Twitch followers for Riot Games.