I'm trying to use ggplot to create a scatter plot of player data with a pop up that includes the players name. The data is from here. My code is below.
x <- Player_Stats %>%
ggplot(aes(x=PTS, y=`ThreeP%`,color=Tm, text=paste("Player:", Player)))+
geom_point()
ggplotly(x, tooltip = "text")
When I run the code I receive an error that says Error in gsub("\n", br(), a, fixed = TRUE) : input string 16 is invalid in this locale.
My current popup just includes PTS, 3p% and Team. How can I add the player name to the popup?