Giter Site home page Giter Site logo

nirmal-25 / youtube-analytics-and-sentiment-analysis Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 4.39 MB

Interactive data visualizations for trending YouTube videos using Sentiment Analysis in D3.js and Tableau

Home Page: https://observablehq.com/@table6/trending-youtube-videos-visualizations

License: MIT License

JavaScript 91.43% HTML 0.43% Python 8.13%
d3js data-analysis sentiment-analysis tableau youtube-api javascript

youtube-analytics-and-sentiment-analysis's Introduction

YouTube Trending Video Analytics

The repo consists of visualizations in D3.js (Observable) and Tableau for videos from YouTube's API for trending videos in the US. Refer to this repository to scrape data using the public API. The visualizations are created using raw statistics from the dataset, along with derived attributes like sentiment scores to gain more insight.

Motivation

  • Visualizations on trending YouTube video data that help narrow down key indicators that makes a video popular, and helps stay on YouTube's trending list.

  • What makes trending YouTube videos more engaging than others? How can content creators better make use of data to create high-performing videos that go viral?

Dataset

Download the CSV file for the dataset from here.

This is a cleaned version of the scraped data, and NLTK's SentimentAnalyzer is used to derive sentiment scores (ranging from -1 to 1) for videos, which are added to the CSV file as an additional feature.

Each entry in the dataset corresponds to trending videos (2020 to 2022) with features such as the title, trending date, published date, channel title, category, tags, description, views, likes, dislikes, comments, and comment count.

Visualizations

  • Net popularity vs. sentiment score
  • Category based interactive visualization
  • Category-wise analysis of sentiment scores
  • Trend analysis of sentiment scores
  • Correlation for raw video statistics ...

For more details on these visualizations and helper scripts, go to misc/

Follow the steps given below to run the Observable notebook.

The Tableau visualizations can be found here.

Screenshots for sample visualizations are shown below.

Trend analysis of sentiment scores
Trend analysis of sentiment scores
Trending vs. published date
Trend analysis of sentiment scores
Sentiment category distribution for top-n categories (3-level nested pie chart)
Sentiment category distribution for top-n categories based on popularity
Average sentiment scores trend (per day)
Average sentiment scores trend (per day)

Observable

To run the Observable notebook, upload the CSV file to the notebook

https://observablehq.com/d/dbd2e89e6a968b57@790

Alternatively, clone the repo and view this notebook in your browser by running a web server in this folder. For example:

npx http-server

Or, use the Observable Runtime to import this module directly into your application. To npm install:

npm install @observablehq/runtime@5
npm install https://api.observablehq.com/d/[email protected]?v=3

Then, import your notebook and the runtime as:

import {Runtime, Inspector} from "@observablehq/runtime";
import define from "dbd2e89e6a968b57";

youtube-analytics-and-sentiment-analysis's People

Contributors

nirmal-25 avatar

Stargazers

Anton Polishko avatar Dharneeshkar Jayaprakash avatar Ayush Varma avatar

Watchers

Kostas Georgiou avatar  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.