song_plot: song_plot

Description Usage Arguments Value Examples

View source: R/fct_song_plot.R

Description

song_plot is a function that will take inputs for data and axis variables and return a ggplot.

Usage

1
song_plot(artist_data, plot_xaxis, plot_yaxis, color)

Arguments

artist_data

Data that is retrieved from spotifyr::get_artist_audio_features(). Each row of the data is a specific song. This plot will only utilize the numeric columns of the dataset.

plot_xaxis, plot_yaxis

Specify the x-axis and y-axis of the plot. Must be a numeric variable from artist_data.

color

Sets the color of the points in the plot. Should be a factor or character variable from the data. Numeric colors will give the plot a continuous color scale.

Value

Returns a formatted ggplot object.

Examples

1
song_plot(spotifyr::get_artist_audio_features('Adele'),'Valence','Energy','album_name')

gtdoering/harmony documentation built on Dec. 20, 2021, 1:47 p.m.