Giter Site home page Giter Site logo

xmaster6y / twitch_analysis Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.8 MB

Little study of the Twitch network from the point of vie of complex systems and graphs.

License: Apache License 2.0

Python 0.77% Jupyter Notebook 99.23%
twitch twitch-api graphs complex-networks python3 jupyter-notebook

twitch_analysis's Introduction

Twitch Analysis

This Analysis has the ambition to study the Twitch network. This repository was refactorized to be lighter (with compressed files).

Read Before Using

  • For all the files (python and notebook) to run properly you should first unzip the files graphs.zip, Streamers_fr_1D.zip and Streamers_fr_1W.zip see git-lfs for retrieving them.*

  • Make a directory Streamer_fr in which the data from the requests will be dumped. If you want another name of directory do not forget to change the variables in the python files.

Gathering the Network Information

Twitch API

Getting the information through the Twitxh API really is the way to go! Yet it suffer from a major disadvantage: you can only get the top 100 streamers for your request.

Scraping the awesome Twitchtracker website is simple but not "cool". Since this website tracks Twitch it must possible to do it ourselves, surely by scraping the home page of twitch.tv.

Link Between Channels

  • Two channels will be consider linked if a viewer has watched both of them over a given amount of time. The more viewers the more stronger the links.

  • The precedent formulation is, in a sense, equivalent to keeping the viewers. Yet keeping the viewers is memory costly.

Results

Visualisation results can be found in the folder ./images, here is one:

One day graph

Flow Over Time

Another study could be on the time point of view and the flow of viewers. We try to give some insight for channel recommendation at the end of the notebook.

File description

The file api_req_streams.py is meant to order streamer request. By default it runs for a complete day and store the results in the folder Streamers_fr/.

The file scrape_streams.py is used to scrape the Twitchtracker website.

  • ⚠️ modularity is not guaranteed.

Contains the data of streamers for one given day. See the notebook for more inforamation.

The file build_network.py is used to build the network by default from the folder Streamers_fr/. It can be slightly modified to keep the viewers. It mainly use the librairy networkx.

  • The variant serve different purposes but are alike.

Graph used for the notebook and obtain from the data above.

The file twitch_analysis.ipynb is a notebook to analyse the Twitch network/data.

Python librairies requirements

Images of representation obtained with Gephi.

  • ⚠️ it correspond to the filtered graphs (see the notebook).

twitch_analysis's People

Contributors

xmaster6y avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.