Learn R Programming

moderndive (version 0.7.0)

spotify_by_genre: Spotify by Genre Dataset

Description

This dataset contains information on 6,000 tracks from Spotify, categorized by one of six genres. It includes various audio features, metadata about the tracks, and an indicator of popularity. The dataset is useful for analysis of music trends, popularity prediction, and genre-specific characteristics.

Usage

spotify_by_genre

Arguments

Format

A data frame with 6,000 rows and 21 columns:

track_id

character. Spotify ID for the track. See: https://developer.spotify.com/documentation/web-api/

artists

character. Names of the artists associated with the track.

album_name

character. Name of the album on which the track appears.

track_name

character. Name of the track.

popularity

numeric. Popularity score of the track (0-100). See: https://developer.spotify.com/documentation/web-api/reference/#/operations/get-track

duration_ms

numeric. Duration of the track in milliseconds.

explicit

logical. Whether the track has explicit content.

danceability

numeric. Danceability score of the track (0-1). See: https://developer.spotify.com/documentation/web-api/reference/#/operations/get-audio-features

energy

numeric. Energy score of the track (0-1).

key

numeric. The key the track is in (0-11 where 0 = C, 1 = C#/Db, etc.).

loudness

numeric. The loudness of the track in decibels (dB).

mode

numeric. Modality of the track (0 = minor, 1 = major).

speechiness

numeric. Speechiness score of the track (0-1).

acousticness

numeric. Acousticness score of the track (0-1).

instrumentalness

numeric. Instrumentalness score of the track (0-1).

liveness

numeric. Liveness score of the track (0-1).

valence

numeric. Valence score of the track (0-1), indicating the musical positiveness.

tempo

numeric. Tempo of the track in beats per minute (BPM).

time_signature

numeric. Time signature of the track (typically 3, 4, or 5).

track_genre

character. Genre of the track (country, deep-house, dubstep, hip-hop, metal, and rock).

popular_or_not

character. Indicates whether the track is considered popular ("popular") or not ("not popular"). Popularity is defined as a score of 50 or higher which corresponds to the 75th percentile of the popularity column.

Examples

Run this code
data(spotify_by_genre)
head(spotify_by_genre)

Run the code above in your browser using DataLab