I've got a Statistics class that I need to show a set of statistics for (doesn't necessarily have to be related or correlated). So I wanted to show a plot describing the comparison of wins to number of laps lead by F1 drivers in the last 20 years. What I've got using ggplot2 is attached and my code is as follows:
graphics.off()
rm(list=ls())
setwd("mypwd")
library(ggplot2)
data <- read.table("F1 Drivers Lead by win.csv", sep = ",", col.names = c("Driver", "Laps lead", "Wins"))
p <- ggplot(data, aes(x = Wins, y = Laps.lead)) +
geom_point() +
geom_text(aes(label = Laps.lead), vjust = -1) +
facet_wrap(~Driver) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
p
I'd like to make the comparison a bit more obvious instead of burying the data in a million facets. I was thinking something along the lines of a double-y-axis graph with two lines connecting the relevant data points, one for fastest laps and one for wins. I know it's not generally good practice, but the people that are going to be viewing this aren't data scientists insisting on good practice. I just need something that is easy to see at a glance. Anyone care to help me out? It's been a long time since I've done anything like this and I'm struggling.