Giter Site home page Giter Site logo

csulbdataday24m's Introduction

Sentiment Analysis Visualization

Musical Artist Sentiment Analysis

Authors

Table of Contents

Getting Started

The focus of this project will be on Sentiment Analysi on music data(spotify).

Library Installation

Ensure you have R and RStudio installed on your computer. RStudio provides an integrated development environment (IDE) that makes coding in R easier. Or Posit Cloud

Data Source

Data was extracted using a Token API using spotify access. For further replication on the use of an Spotify API.

For Posit Cloud :

  • Click here
  • Quick Glance

    Sentiment Analysis Visualization

    Sentiment Analysis Visualization

    Steps

    Step 1: Setting Up Your Environment

    Install R and RStudio. Use RStudio's IDE for ease of development.

    Install required libraries with the command:

        install.packages(c("tidyverse", "tidytext", "ggwordcloud", "ggtext", "showtext", "gt"))
    

    Step 2: Load the Libraries

    Load the necessary libraries in R:

        
    library(tidyverse)
    library(tidytext)
    library(ggwordcloud)
    library(ggtext)
    library(showtext)
    library(gt)
        
    

    Step 3: Getting and Preparing Your Data

    • Choose your data source, focusing on the musical artist and songs for analysis.
    • Load your data with read_csv("path/to/your/data.csv").
    • Clean your data to prepare it for analysis.

    Step 4: Text Processing

    Tokenize the lyrics into individual words using tidytext::unnest_tokens() and filter out common stop words.

    Step 5: Sentiment Analysis

    Choose a sentiment lexicon and match words to sentiments. Example:

        
    bing_sentiments <- tidy_df %>%
      inner_join(get_sentiments("bing")) %>%
      count(word, sentiment, sort = TRUE)
        
    

    Step 6: Visualization and Interpretation

    • Visualize common words with word clouds.
    • Plot frequency of sentiments with ggplot2.
    • Analyze results for trends in sentiment.

    Sentiment Analysis Visualization

    Step 7: Share Your Findings

    Compile your analysis into a report using Quattro or R markdown. Share on Github. Use as a project for resume.

    Sentiment Analysis Visualization

    End Goal

    This project aims to inspire both students and data science enthusiasts to undertake their own projects, with the aspiration that through continued practice, they'll gain a deeper appreciation for the boundless creativity and narrative potential inherent in data and visualizations. For more insights and inspiration, consider exploring Andres's Medium post on the sentiment analysis of The Smiths, a quintessential English band that dominated the 80s: https://medium.com/@gonzalez_afc/sentiment-analysis-of-the-the-smiths-a-quintessential-english-band-that-ruled-the-80s-173266b1d697

    THANK YOU!

    csulbdataday24m's People

    Contributors

    dsrichard97 avatar okcomputer626 avatar

    Stargazers

     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.