I am currently trying to make a parallel coordinate plot in R with the GGally
package. Below is my code (I have deleted the aesthetic changes such as theme()
).
ggparcoord(ts, # dataframe
columns = c(3:4, 9, 11:12), # Selecting the variables listed in the plot (x-axis)
groupColumn = 20, # Grouping by album
alphaLines = .75,
showPoints = TRUE)
This plots a fine graph, except it shows incorrect values. I have attached the plot below. I also ran a summary()
function on the different variables and noted the discrepancies. When I run:
summary(ts$danceability)
I get:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.2920 0.5155 0.5940 0.5846 0.6455 0.8970
These values are clearly not reflected accurately in the plot. What is going wrong here? Also, in order to clean the graph up, how could I make it interactive on HTML to where someone could select whichever album they would prefer to analyze on its own?