library(ggplot2)
library(ggrepel)
library(gridExtra)

Reading data into R

# Data were from 
# https://www.timeshighereducation.com/news/more-australian-vice-chancellors-earning-a1-million
# https://www.studymove.com/index.php/news/44-what-is-the-percentage-of-international-students-in-australia

vs = read.csv("~/Dropbox/Temp Files/VC salaries.csv")
vs = vs[, c("Uni", "S2018", "Students", "TStudents")]
vs
##          Uni   S2018 Students TStudents
## 1        ACU 1325000     11.0     25678
## 2        ANU  675100     34.2     20934
## 3        CQU  697500     26.7     18849
## 4        CDU  622500     19.3     10848
## 5        CSU  768781     20.2     39093
## 6     Curtin  975000     13.7     48263
## 7     Deakin 1105000     19.9     45900
## 8       ECU   825000     16.2     26441
## 9        Fed  755000     27.8     12941
## 10  Flinders 1175000     12.5     22807
## 11  Griffith 1067500     15.9     43196
## 12       JCU 1057500     14.6     21889
## 13   LaTrobe  975000     19.5     33892
## 14      Macq 1015000     25.2     38793
## 15    Monash 1105000     28.2     64479
## 16   Murdoch  935000      7.9     24138
## 17      QUT   898400     16.7     45580
## 18      RMIT 1105000     22.1     57433
## 19       SCU  817500     16.0     14369
## 20 Swinburne  975000     13.5     31786
## 21  Adelaide 1052500     27.0     26383
## 22 UCanberra  805000     15.6     16334
## 23        UD  285000      7.9      1600
## 24     UMelb 1582500     36.3     52257
## 25       UNE  735000      4.4     20912
## 26 Newcastle 1039000     11.7     36448
## 27        UQ 1192500     29.4     48771
## 28       USa 1095000     16.3     32948
## 29       USQ  652500      9.0     26719
## 30      USyd 1522500     35.0     54306
## 31      UTas 1034200     13.4     26812
## 32       UTS 1055000     29.9     37638
## 33       USC  785000     19.4     10756
## 34       UWA 1095000     20.1     25837
## 35       UW   935000     22.2     30554
## 36      UNSW 1292500     33.8     52326
## 37        VU  715000     19.2     27168
## 38      WSU   904181     12.4     41864

Plotting data with text

p = ggplot(data=vs, aes(x=TStudents, y=S2018, color=Uni))
p = p + geom_point(aes(col=Uni)) + geom_text_repel(aes(label=Uni)) + theme(legend.position="none")
p1 = p + xlab("Total students") + ylab("VC Earnings (2018)")
p1

p = ggplot(data=vs, aes(x=Students, y=S2018))
p = p + geom_point(col="blue") + geom_smooth(method="lm", formula=y~x+I(x^2)+I(x^3))
p2 = p + xlab("Proportion of overseas students (2017)") + ylab("VC Earnings (2018)")
p2