Visualising Music Sales
Intro This document presents possible solutions to the assignment given during the workshop on dataviz, Ph.D. retreat 2022. Preparation Libraries library(tidyverse) library(cowplot) library(gghighlight) library(knitr) library(MetBrewer) Loading data music <- read_csv("https://raw.githubusercontent.com/lescai-teaching/dataviz-rstudio/datasets/music_sales_history.csv", col_names = c("format", "metric", "year", "records", "value"), col_types = c(col_character(), col_character(), col_double(), col_double(), col_double()), skip = 1) Tidying the data simplifying the column name music$metric <- ifelse( music$metric == "Value (Adjusted)", "adjusted_value", music$metric ) some data are duplicated or missing...