Skip to content

gpiren/gender-violence-lyrics-analysis

 
 

Repository files navigation

gender-violence-lyrics-analysis

This project analyzes the language of gender-based violence in hit song lyrics across Spanish, German, and Turkish music charts. The goal is to collect, clean, and analyze lyrics to identify linguistic patterns and differences across these languages.

gender-violence-lyrics-analysis

Spotify & Genius API Integration

This project utilizes the Spotify API to retrieve song data and the Genius API to fetch corresponding lyrics. The goal is to seamlessly integrate both services for analyzing music and lyrics.

Collaborators:

🚀 Getting Started

To use the Spotify and Genius APIs, follow these steps:

🔹 Step 1: Create a Spotify Developer Account

Sign Up or Log In:

Create an Application:

  • Click Dashboard → Create an App.
  • Enter an App Name, Description, and a Redirect URL (e.g., http://localhost:8080).
  • Select the Web API option, agree to the Developer Terms of Service, and click Create.

Obtain API Credentials:

  • In your app's dashboard, go to Settings.
  • Copy your Client ID and Client Secret.

🔹 Step 2: Create a Genius Developer Account

Sign Up or Log In:

Obtain API Credentials:

  • Once approved, navigate to your app settings.
  • Copy your Client ID and Client Secret.

🔹 Step 3: Environment Setup

To securely store API credentials, create a .env file in your project directory and add the following lines:

SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret GENIUS_ACCESS_TOKEN=your_genius_access_token

Install Required R Packages: Before making API requests, install the necessary R packages:

install.packages(c("httr", "jsonlite", "dplyr", "dotenv")) library(httr) library(jsonlite) library(dplyr) library(dotenv)

Load API Credentials in R Your .Rmd file will use the .env file to load credentials securely run these in an R chunk load_dot_env() spotify_client_id <- Sys.getenv("SPOTIFY_CLIENT_ID") spotify_client_secret <- Sys.getenv("SPOTIFY_CLIENT_SECRET") genius_access_token <- Sys.getenv("GENIUS_ACCESS_TOKEN")

Enjoy exploring music data and lyrics with this integration! 🎶

About

Analyzing gender violence language in Spanish, German, and Turkish hit songs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%