日本語の手順はこちらのブログを参照ください。
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
- 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.
- Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.
- In the Google Cloud Console, in the Vertex AI section, go to the Workbench page.
- Open "Managed Notebook" tab and create the new notebook instance(You can leave all settings options as default).
- After waiting few minutes, "Open JUPYTERLAB" link will appear so please open it. * Authentication needed at the first time
- In the notebook console, open "Git > Clone a Repository" and put this repository url(https://github.com/myoshimu/yt_chat_analysis).
- You will see "yt_chat_analysis" folder at the left side hand so please open it by double click.
- Open "chat_analysis.ipynb" and following notebook will shown at the right hand side.
- Notebook consists of code or markup cells. You can execute each cells by clicking the run icon or "Shift+Enter" key.
- Run all the cells in order of appearance from the start.
If above install section failed with error, please execute!pip install nlplot -- user
command, too. - This code example includes the sample live chat data which is regarding CAPCOM's Monster Hunter.
- This data includes sentiment and magnitude score for each comments. Following is visualize image of time series data.
- Looking at the word cloud, you will see some monster's name which were frequently talked at the Live chat.