Tidyverse Portfolio

library(tidyverse) library(plotly) library(forcats) library(reshape2) library(magrittr) Spotify: Genre Popularity by Artist Import the spotify data an drop index column cause it contains redundant information. spotify <- read_csv("top50.csv", col_names=c( "index", "Song", "Artist", "Genre", "BPM", "Energy", "Danceability", "Loudness", "Liveness", "Valence", "Length", "Acousticness", "Speechiness", "Popularity"), col_types=cols( index=col_double(), Song=col_factor(), Artist=col_factor(), Genre=col_factor()), skip=1) # Index column contains row_numbers spotify <- spotify %>% select(-c("index")) For brevity, will change the name of the genres and change one of the artists cause it has a non utf-8 name.

Continue reading

Author's picture

Mauro Camara Escudero

PhD student in Computational Statistics and Data Science at the University of Bristol

COMPASS PhD Student

Bristol, United Kingdom