Would you mind taking a look at this?
https://docs.google.com/spreadsheets/d/14vVWxhaQynPmnAsZHlrkkdeJTt0XlDzHc5JSd4DNF-Y/edit?usp=sharing
I have three variables; first one for Year from 2000 - 2017, second one for each country's GDP over the 2000-2017 and the third for soccer ranking over the 2000-2017.
I would like to draw one giant scatter plot; Year 2000-2017 on X-axis, Rank reversed starting from 200 on bottom to 1 on top on Y-axis while each scatter point size vary with GDP size.
All I can come up with is plotting a scatter plot for one country only:
rank <- read.csv("Test1.csv", sep=",", header=TRUE)
library(ggplot2)
qplot(Year, Rank , data = rank, size = Aruba)
But I would like to fit all the countries into one scatter plot while y-axis being reversed and draw a linear regression of all scatter points if possible.
Can someone help me on this?
str()
,head()
or screenshot)? You can use thereprex
anddatapasta
packages to assist you with that. See also Help me Help you & How to make a great R reproducible example? – Tungdput
or one of the packages suggested above, rather than linking folks to a third-party download – camille