https://github.com/dsrichard97/csulbdataday24m
Music Repo for sentiment analysis configuration
https://github.com/dsrichard97/csulbdataday24m
programming quatro r sentiment-analysis
Last synced: 7 months ago
JSON representation
Music Repo for sentiment analysis configuration
- Host: GitHub
- URL: https://github.com/dsrichard97/csulbdataday24m
- Owner: dsrichard97
- License: mit
- Created: 2024-03-22T05:38:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T09:39:59.000Z (over 1 year ago)
- Last Synced: 2025-01-23T10:31:06.405Z (over 1 year ago)
- Topics: programming, quatro, r, sentiment-analysis
- Language: HTML
- Homepage:
- Size: 11.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 :
Quick Glance
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.
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.