Skip to content

myoshimu/yt_chat_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyze YouTube Live Chat with Google Cloud

日本語の手順はこちらのブログを参照ください。
This is a sample code which shows how to use YouTube Live Streaming API and analyze the chat data by Google cloud.

  • get_yt_chat.ipynb : Capture the chat data by YouTube Live Streaming API
  • chat_analysis.ipynb : Analyze chat data by Google Cloud
  • MCzITTAy8G8.csv : Sample data

Create a Google Cloud Project and Start Vertex AI Workbench instance

  1. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project. Please see this help page for detailed steps.
  2. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.
  3. In the Google Cloud Console, in the Vertex AI section, go to the Workbench page.
  4. Open "Managed Notebook" tab and create the new notebook instance(You can leave all settings options as default).
  5. After waiting few minutes, "Open JUPYTERLAB" link will appear so please open it. * Authentication needed at the first time

Copy the sample code at Vertex AI Workbench

  1. In the notebook console, open "Git > Clone a Repository" and put this repository url(https://github.com/myoshimu/yt_chat_analysis). image image
  2. You will see "yt_chat_analysis" folder at the left side hand so please open it by double click.

Analyze Live chat data

  1. Open "chat_analysis.ipynb" and following notebook will shown at the right hand side. image
  2. Notebook consists of code or markup cells. You can execute each cells by clicking the run icon or "Shift+Enter" key.
  3. Run all the cells in order of appearance from the start.
    image
    If above install section failed with error, please execute !pip install nlplot -- user command, too.
  4. This code example includes the sample live chat data which is regarding CAPCOM's Monster Hunter. image
  5. This data includes sentiment and magnitude score for each comments. Following is visualize image of time series data. image
  6. Looking at the word cloud, you will see some monster's name which were frequently talked at the Live chat. image

About

Analyze YouTube Live Chat with Google Cloud NLP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages