I am part of a Mario Kart league. I'm trying to create a visualization to compare the length of time each person was champion. I have a CSV with the following columns: name, date_won, days_as_champ.
Here is the code I initially tried:
ggplot(data=champs, aes(x=date_won, y=days_as_champ, group=1))+
geom_line()+
geom_point()
This produces the correct line, but the x-axis labels are (obviously) the dates, which aren't very useful.
I tried using 'name' for the x-axis, but that brings up two issues. First, the names are in alphabetical order instead of the order they are in the data frame. Secondly, instead of having a separate entry for each time the individual won, it places all points above the single instance of the name.
Which would be the better approach, using 'date_won' as the axis and remapping the labels to 'name' or using 'name' for the x-axis but reordering them based on the 'date_won' field? And how would I go about doing it?
I thought this would be something simple enough to do, but no amount of searching or documentation reading has produced any solutions.