This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
#loading libraries
library(readxl)
## Warning: package 'readxl' was built under R version 4.5.3
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
library(plotly)
## Warning: package 'plotly' was built under R version 4.5.3
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(scales)
library(ggrepel)
## Warning: package 'ggrepel' was built under R version 4.5.3
# Reading dataset
student_data <- read_excel(
"C:/Users/moham/OneDrive/Desktop/rmit assignments/dv and com/assignmmnet 3/2024_Summary_Timeseries.xlsx",
sheet = "2",
col_names = FALSE
)
## New names:
## • `` -> `...1`
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
## • `` -> `...8`
## • `` -> `...9`
## • `` -> `...10`
## • `` -> `...11`
## • `` -> `...12`
# Viewing first rows
head(student_data)
## # A tibble: 6 × 12
## ...1 ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 < Back … <NA> NA NA NA NA NA NA NA NA
## 2 Table 2… <NA> NA NA NA NA NA NA NA NA
## 3 Group Cate… 2015 2016 2017 2018 2019 2020 2021 2022
## 4 All stu… <NA> 1410133 1457209 1513383 1562520 1609798 1622867 1602573 1551411
## 5 Citizen… Dome… 1046835 1066073 1081945 1082533 1087850 1133633 1162260 1102757
## 6 Citizen… Over… 363298 391136 431438 479987 521948 489234 440309 448642
## # ℹ 2 more variables: ...11 <dbl>, ...12 <dbl>
# Understanding structure
str(student_data)
## tibble [45 × 12] (S3: tbl_df/tbl/data.frame)
## $ ...1 : chr [1:45] "< Back to Contents >" "Table 2: All Student Enrolments, 2015 to 2024" "Group" "All students" ...
## $ ...2 : chr [1:45] NA NA "Category" NA ...
## $ ...3 : num [1:45] NA NA 2015 1410133 1046835 ...
## $ ...4 : num [1:45] NA NA 2016 1457209 1066073 ...
## $ ...5 : num [1:45] NA NA 2017 1513383 1081945 ...
## $ ...6 : num [1:45] NA NA 2018 1562520 1082533 ...
## $ ...7 : num [1:45] NA NA 2019 1609798 1087850 ...
## $ ...8 : num [1:45] NA NA 2020 1622867 1133633 ...
## $ ...9 : num [1:45] NA NA 2021 1602573 1162260 ...
## $ ...10: num [1:45] NA NA 2022 1551411 1102757 ...
## $ ...11: num [1:45] NA NA 2023 1600563 1076027 ...
## $ ...12: num [1:45] NA NA 2024 1676077 1086789 ...
summary(student_data)
## ...1 ...2 ...3 ...4
## Length:45 Length:45 Min. : 0 Min. : 0
## Class :character Class :character 1st Qu.: 18282 1st Qu.: 18314
## Mode :character Mode :character Median : 60731 Median : 66010
## Mean : 229848 Mean : 237526
## 3rd Qu.: 264458 3rd Qu.: 273801
## Max. :1410133 Max. :1457209
## NA's :14 NA's :14
## ...5 ...6 ...7 ...8
## Min. : 0 Min. : 0 Min. : 0 Min. : 334
## 1st Qu.: 18203 1st Qu.: 18153 1st Qu.: 18599 1st Qu.: 15488
## Median : 66145 Median : 71157 Median : 74897 Median : 78281
## Mean : 246675 Mean : 254678 Mean : 262334 Mean : 264459
## 3rd Qu.: 284835 3rd Qu.: 291198 3rd Qu.: 298871 3rd Qu.: 310629
## Max. :1513383 Max. :1562520 Max. :1609798 Max. :1622867
## NA's :14 NA's :14 NA's :14 NA's :14
## ...9 ...10 ...11 ...12
## Min. : 327 Min. : 357 Min. : 564 Min. : 477
## 1st Qu.: 10172 1st Qu.: 12322 1st Qu.: 16372 1st Qu.: 17654
## Median : 78288 Median : 75549 Median : 73978 Median : 78443
## Mean : 261252 Mean : 252906 Mean : 260722 Mean : 272920
## 3rd Qu.: 319520 3rd Qu.: 307892 3rd Qu.: 304786 3rd Qu.: 312544
## Max. :1602573 Max. :1551411 Max. :1600563 Max. :1676077
## NA's :14 NA's :14 NA's :14 NA's :14
dim(student_data)
## [1] 45 12
# Creating enrolment dataset
# Source: Table 2 - All Student Enrolments (2015-2024)
enrolments <- data.frame(
Year = c(
2015, 2016, 2017, 2018, 2019,
2020, 2021, 2022, 2023, 2024
),
Students = c(
1410133,
1457209,
1513383,
1562520,
1609798,
1622867,
1602573,
1551411,
1600563,
1676077
)
)
# Checking dataset
head(enrolments)
## Year Students
## 1 2015 1410133
## 2 2016 1457209
## 3 2017 1513383
## 4 2018 1562520
## 5 2019 1609798
## 6 2020 1622867
tail(enrolments)
## Year Students
## 5 2019 1609798
## 6 2020 1622867
## 7 2021 1602573
## 8 2022 1551411
## 9 2023 1600563
## 10 2024 1676077
str(enrolments)
## 'data.frame': 10 obs. of 2 variables:
## $ Year : num 2015 2016 2017 2018 2019 ...
## $ Students: num 1410133 1457209 1513383 1562520 1609798 ...
summary(enrolments)
## Year Students
## Min. :2015 Min. :1410133
## 1st Qu.:2017 1st Qu.:1522890
## Median :2020 Median :1581542
## Mean :2020 Mean :1560653
## 3rd Qu.:2022 3rd Qu.:1607992
## Max. :2024 Max. :1676077
# Creating line chart
chart1 <- ggplot(
enrolments,
aes(
x = Year,
y = Students
)
) +
geom_line(
linewidth = 1.2
) +
geom_point(
size = 3
) +
scale_y_continuous(
labels = comma
) +
labs(
title = "Australia's University Boom",
subtitle = "Higher Education Student Enrolments (2015-2024)",
x = "Year",
y = "Number of Students",
caption = "Source: Department of Education"
) +
theme_minimal()
# Interactive chart
ggplotly(
chart1,
tooltip = c(
"x",
"y"
)
)
# Chart 2 - Graduate Employment
# Graduate employment outcomes
employment <- data.frame(
Year = c(
2016,
2017,
2018,
2019,
2020,
2021,
2022,
2023,
2024
),
Employment_Rate = c(
68.7,
71.3,
72.9,
73.5,
68.9,
68.9,
78.5,
79.0,
74.0
)
)
# Checking data
head(employment)
## Year Employment_Rate
## 1 2016 68.7
## 2 2017 71.3
## 3 2018 72.9
## 4 2019 73.5
## 5 2020 68.9
## 6 2021 68.9
summary(employment)
## Year Employment_Rate
## Min. :2016 Min. :68.70
## 1st Qu.:2018 1st Qu.:68.90
## Median :2020 Median :72.90
## Mean :2020 Mean :72.86
## 3rd Qu.:2022 3rd Qu.:74.00
## Max. :2024 Max. :79.00
# Creating chart
chart2 <- ggplot(
employment,
aes(
x = Year,
y = Employment_Rate
)
) +
geom_line(
linewidth = 1.2
) +
geom_point(
size = 3
) +
labs(
title = "Graduate Employment Is Becoming Harder",
subtitle = "Full-time employment outcomes for Australian graduates (2016-2024)",
x = "Year",
y = "Employment Rate (%)",
caption = "Source: QILT Graduate Outcomes Survey"
) +
theme_minimal()
# Interactive chart
ggplotly(
chart2,
tooltip = c(
"x",
"y"
)
)
# Chart 3 - Graduate Salaries Are Rising
# Graduate salary outcomes
salary <- data.frame(
Year = c(
2016,
2017,
2018,
2019,
2020,
2021,
2022,
2023,
2024
),
Salary = c(
60000,
62000,
65000,
67000,
68000,
71000,
72000,
73000,
75000
)
)
# Checking data
head(salary)
## Year Salary
## 1 2016 60000
## 2 2017 62000
## 3 2018 65000
## 4 2019 67000
## 5 2020 68000
## 6 2021 71000
summary(salary)
## Year Salary
## Min. :2016 Min. :60000
## 1st Qu.:2018 1st Qu.:65000
## Median :2020 Median :68000
## Mean :2020 Mean :68111
## 3rd Qu.:2022 3rd Qu.:72000
## Max. :2024 Max. :75000
# Creating chart
chart3 <- ggplot(
salary,
aes(
x = Year,
y = Salary
)
) +
geom_line(
linewidth = 1.2
) +
geom_point(
size = 3
) +
scale_y_continuous(
labels = scales::dollar
) +
labs(
title = "Graduate Salaries Are Rising",
subtitle = "Median full-time graduate salaries (2016-2024)",
x = "Year",
y = "Salary",
caption = "Source: QILT Graduate Outcomes Survey"
) +
theme_minimal()
# Interactive chart
ggplotly(
chart3,
tooltip = c(
"x",
"y"
)
)
# Chart 4 - Which Degrees Pay Off?
degree_outcomes <- data.frame(
Degree = c(
"Dentistry",
"Engineering",
"Medicine",
"Law",
"Business",
"Computing",
"Psychology",
"Humanities",
"Communications",
"Creative Arts"
),
Employment = c(
85.6,
85.5,
90.4,
79.3,
78.5,
67.8,
65.5,
66.7,
58.3,
48.4
),
Salary = c(
103300,
80000,
86800,
76000,
72000,
75300,
75100,
73100,
65200,
62600
)
)
# Create chart
chart4 <- ggplot(
degree_outcomes,
aes(
x = Employment,
y = Salary,
color = Salary
)
) +
geom_point(
size = 6
) +
geom_text_repel(
aes(label = Degree),
size = 3.5,
fontface = "bold",
box.padding = 0.8,
point.padding = 0.6,
segment.color = "grey60",
segment.size = 0.4,
min.segment.length = 0,
max.overlaps = Inf
) +
scale_color_gradient(
low = "black",
high = "red"
) +
scale_y_continuous(
labels = scales::dollar
) +
labs(
title = "Which Degrees Pay Off?",
subtitle = "Graduate salary and employment outcomes by field of study (2024)",
x = "Full-Time Employment Rate (%)",
y = "Median Salary",
color = "Salary",
caption = "Source: QILT Graduate Outcomes Survey 2024"
) +
theme_minimal(base_size = 14)
# Interactive chart
chart4
# Chart 5 - The Future Graduate
future_jobs <- data.frame(
Field = c(
"Healthcare",
"Technology",
"Engineering",
"Education",
"Business Services",
"Creative Industries"
),
Growth = c(
18,
15,
12,
10,
8,
5
)
)
# Create chart
chart5 <- ggplot(
future_jobs,
aes(
x = reorder(Field, Growth),
y = Growth
)
) +
geom_col(
fill = "firebrick",
width = 0.7
) +
coord_flip() +
labs(
title = "The Future Graduate",
subtitle = "Projected employment growth by sector",
x = "Projected Growth (%)",
y = "Industry Sector",
caption = "Source: Jobs and Skills Australia"
) +
theme_minimal(base_size = 14)
# Interactive version
ggplotly(
chart5,
tooltip = c(
"x",
"y"
)
)
```
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Ctrl+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.