Skip to main content

Twitch chat analyzer from past broadcasts, designed for Jupyter notebook

Project description

twitch-chat-analyzer-py

Twitch chat analyzer from past broadcasts, designed for Jupyter notebook.

Getting Started

Installation

The package can be installed by pip command in terminal

pip install --upgrade twitch-chat-analyzer

Run Jupyter Notebook

The package is mainly intended to be used in Jupyter notebook, but it can still be used in standard Python environment

Instruction to install Jupyter notebook (or newer JupyterLab) is here

After installation, run the following command in terminal to start Jupyter

jupyter notebook or jupyter-lab

Download chats from past broadcast

notebook.ipynb has examples of statistics functions.

from twitch_chat_analyzer import analyzer

# Create an analyzer object from video ID.
# If the chat log was not downloaded before, it will download automatically and create an analyzer.
ann = analyzer.FromVideoId('REPLACE_HERE_TO_VIDEO_ID')

# Some pre-built statistics functions to draw graph
ann.DrawChatPerMinutes(10)  # Chat counts for each 10-minute interval
ann.DrawTopChatters(20)  # Top 20 viewers with most chats
ann.DrawTopEmotes(15)  # Top 15 most used emotes

# If you want to handle dataframe yourself
df = ann.ToDataFrame()

DataFrame

The dataframe returned from ToDataFrame() has the following columns

Column name type meaning
offset float Time of the chat, in seconds after stream started
username str Twitch login username
display_name str Display name in chat, which may not be in English
name str Combined name of username and display_name, as displayed in Twitch chat
body str Raw chat content, including emote text
text_body str Chat content excluding emotes
is_subscriber bool if the chatter is a subscriber
bits int Amount of bits spent in the chat
is_sub_notice bool if the chat is new/renew subscription notice

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twitch-chat-analyzer-0.0.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

twitch_chat_analyzer-0.0.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file twitch-chat-analyzer-0.0.3.tar.gz.

File metadata

  • Download URL: twitch-chat-analyzer-0.0.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.0

File hashes

Hashes for twitch-chat-analyzer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fd92aaefad56319ba01f274882dcaed3f7f2ec4f0b01015504ded3f00be4d47a
MD5 58ffd22a2cbf131b503fec98eb1778a1
BLAKE2b-256 3c0a179af197ef06f25769be9ef45cde9e9e37e0a6e928289c70cef45cb785d8

See more details on using hashes here.

File details

Details for the file twitch_chat_analyzer-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: twitch_chat_analyzer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.0

File hashes

Hashes for twitch_chat_analyzer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28b8870446832602953f814b245e353ee7dec3bf7618d3b34f452bc8ae0d5fe6
MD5 73c17a8ad9c81d9a23e02823b76cd857
BLAKE2b-256 0dab1abbe6cd293e922bc31a1219bae750b14d4e44cd65a9a4f28f8037f5e1c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page