Code
pie(table(x=survey_filtered$student_type))This report found that in the DATA1001/1901 cohort, there was a disparity in the hours worked per week between domestic and international students, with most international students working less on average. However, both cohorts showed a positive skew, with most students working under 20 hours per week. The hours worked was then compared against stress levels on a linear model, which showed a weak negative correlation.
This data in this report was sampled from students in the University of Sydney Foundations of Data Science cohort (DATA1X01). Of the 2145 surveyed students, 1927 opted to take part in the study. This survey contained 28 variables; 13 of which were qualitative, and 15 of which were quantitative. In R, we re-classified 2 of these, resulting in 12 qualitative and 16 quantitative variables. In particular, our research involved the variables ‘Domestic/International Enrolment’, ‘Hours Worked’, and ‘Stress Level’; which we classified as ‘Qualitative Nominal’, ‘Quantitative Discrete’, ‘and ’Quantitative Discrete’ respectively.
Limitations discovered within the dataset include:
• Only 89.9% of students consented to the study - potentially impacting the accuracy of our findings
• Some individuals likely answered dishonestly, requiring further data cleaning, ultimately impacting the certainty of our findings
• Since the semester has only recently started, international students may not have had the opportunity to seek employment.
To ensure that our findings reflected honest, legitimate responses, the dataset had to be filtered for any impossible or blank answers, i.e. we assumed that it was impossible to work more than 60 hours a week and that the age of participants couldn’t be less than 14. Here are some graphs showing the age, student type and stress levels of DATA1X06 students:
pie(table(x=survey_filtered$student_type))library(ggplot2)
ggplot(survey_filtered, aes(x=age)) + geom_bar() + theme_classic()+labs(title = "Age of DATA1X01 Students", x="Age", y="Number of Students")ggplot(survey_filtered, aes(x=stress)) + geom_bar(fill="orange") + theme_classic()The structure of the dataset is shown below:
str(survey_filtered)'data.frame': 1865 obs. of 28 variables:
$ cohort : chr "2024S2" "2024S2" "2024S2" "2024S2" ...
$ consent : chr "I consent to take part in the study" "I consent to take part in the study" "I consent to take part in the study" "I consent to take part in the study" ...
$ age : int 18 21 25 24 22 20 22 21 20 18 ...
$ gender : chr "Female" "Female" "Male" "Male" ...
$ country_of_birth : chr "Australia" "Other Please Specify" "Australia" "Australia" ...
$ country_of_birth_5_TEXT: chr "" "Vietnam" "" "" ...
$ hours_work : num 40 0 12 7 12 2 0 5 0 0 ...
$ social_media_use : num 4 2 2 1.5 0.5 ...
$ rent : num 400 378 300 300 0 0 540 366 378 549 ...
$ friends_count : int 2 10 8 20 12 0 15 15 5 15 ...
$ stress : int 10 3 6 1 4 3 7 3 7 2 ...
$ highest_speed : num 150 80 280 170 150 10 7 110 100 120 ...
$ relationship_status : chr "In a relationship" "Single" "In a relationship" "In a relationship" ...
$ dates : num NA NA NA NA NA NA NA NA 3 0 ...
$ standard_drinks : num 6 0 12 10 0 20 0 0 1 0 ...
$ countries : int NA NA NA NA NA NA NA NA 8 15 ...
$ drug_use_q : chr "Have you ever used recreational drugs?" "Have you ever gotten high off recreational drugs?" "Have you ever used recreational drugs?" "Have you ever gotten high off recreational drugs?" ...
$ drug_use_ans : chr "Yes" "No" "Yes" "Yes" ...
$ student_type : chr "International" "International" "Domestic" "Domestic" ...
$ mainstream_advanced : chr "DATA1001" "DATA1001" "DATA1001" "DATA1001" ...
$ semesters : num 4 3 15 8 9 60 6 5 1 0 ...
$ commute : num 70 10 30 30 55 0.5 10 10 3 10 ...
$ data_interest : int 9 7 10 2 5 6 8 8 3 7 ...
$ mark_goal : int 50 88 8 100 99 90 90 90 80 70 ...
$ hours_studying : int 5 5 9 7 3 3 5 3 2 5 ...
$ lecture_mode : chr "Live in the Lecture Theatre" "Live in the Lecture Theatre" "Other" "Live in the Lecture Theatre" ...
$ study_type : chr "I work steadily all semester" "I leave things to the last minute" "I work steadily all semester" "I work steadily all semester" ...
$ learner_style : chr "Style 1" "Style 2" "Style 1" "Style 2" ...
ggplot(survey_filtered, aes(hours_work, student_type,colour=student_type)) + geom_boxplot()+ theme(axis.text.y = element_blank(),axis.ticks.y = element_blank())+ labs(title="Distribution of Weekly Working Hours of DATA1X01 Students", x="Hours of Work Per Week", y = "Student Type(International vs. Domestic)")+scale_fill_manual(values=c("afd8e3","fc5b53")) + theme_classic()international <-(filter(survey_filtered, student_type == "International"))
international$hours_work = as.numeric(international$hours_work)
ggplot(international, aes(x=hours_work)) + geom_histogram(aes(y=after_stat(density)),
bins=10,
fill="lightblue"
)+stat_function(fun = dnorm,
args = list(mean=mean(international$hours_work), sd=sd(international$hours_work)))+labs(title="Hours Worked per Week by International Students", x="Hours worked",y="Relative Density")+theme_classic()domestic <-(filter(survey_filtered, student_type == "Domestic"))
domestic$hours_work = as.numeric(domestic$hours_work)
ggplot(domestic, aes(x=hours_work)) + geom_histogram(aes(y=after_stat(density)),
bins=10,
fill="tomato"
)+ stat_function(fun = dnorm,
args = list(mean=mean(domestic$hours_work), sd=sd(domestic$hours_work)))+labs(title="Hours Worked Per Week by Domestic Students", x="Hours Worked per Week", y="Relative Density")+theme_classic()invisible(median(domestic$hours_work))
invisible(fivenum(domestic$hours_work))
invisible(fivenum(international$hours_work))Among international and domestic DATA1X01 students, the number of hours worked per week greatly varies, highlighted through the medians of 5 and 0 hours, respectively. This disparity indicates that 50% of international students worked 0 hours when the survey was taken and may indicate either unemployment or the inability to work that week. Domestic students have a wider interquartile range of 14, compared to that of 10 for international, suggesting that they have the ability to work within a desired range of hours as they’re not adjusting to new environments. The international data extrapolates more than domestic, with a maximum of 56 hours worked in a week, from the domestic 50.5 hours; suggesting that while 50% of international students don’t work, those who do work, may do-so in order to fund education, housing, or gain financial independence (Hastings et al., 2021).
Overall, we determined that student enrollment type highly influences the number of hours worked per week.
ggplot(survey_filtered, aes(x=stress, y=hours_work)) + geom_point() + labs(title = "Stress vs. Hours Worked of DATA 1X01 Students", x="Stress Level", y="Hours of Work per Week")+geom_smooth(method="lm", se=FALSE)`geom_smooth()` using formula = 'y ~ x'
work <- filter(survey_filtered, hours_work>0)
ggplot(work, aes(x=stress, y=hours_work)) + geom_point() + labs(title = "Stress vs. Hours Worked of Working DATA1X01 Students", x="Stress Level", y="Hours of Work per Week")+geom_smooth(method="lm", se=FALSE)`geom_smooth()` using formula = 'y ~ x'
model<-lm(hours_work~stress,data=survey_filtered)
ggplot(model, aes(x=.fitted,y=.resid)) + geom_point() + geom_hline(yintercept=0, linetype="dashed",colour="blue") + labs(title="All Data1X01 Students",x="Fitted Value", y="residual")model2<-lm(hours_work~stress,data=work)
ggplot(model2, aes(x=.fitted,y=.resid)) + geom_point() + geom_hline(yintercept=0, linetype="dashed",colour="blue") + labs(title="Working students only",x="Fitted Value", y="residual")Within the DATA1X01 cohort, the number of hours worked per week and stress level experienced by students varied greatly; producing an unexpectedly low, but positive correlation coefficient ( r ) . This suggests that there is a weak linear correlation between the two variables. With r ≈ 0.096, there is a slight indication that as the number of hours worked per week increases, so does stress level. This may be due to the excessive 0 values in the dataset.
Although it is known that longer working hours are associated with stress-related conditions such as anxiety and depressive states (Bannai & Tamakoshi, 2014), which is indicative of an evident relation between work and increased stress levels, our findings are unable to deduce completely that this is the case.
Overall, we determined that the amount of hours worked per week sustains a weakly-positive, linear correlation with the stress levels of students of the DATA1X01 cohort.
Additionally, linking this information back to our findings in RQ1, it may be assumed that high levels of stress resulting from long work hours are results of components such as financial strain and necessity.
The exemplar provided by the Unit Coordinators was used as guidance for the html coding and layout of this document. The following online tutorials were used in order to make the graphs and coding the QMD file:
https://quarto.org/docs/output-formats/html-basics.html https://quarto.org/docs/output-formats/html-code.html https://quarto.org/docs/authoring/title-blocks.html In order to filter the data, help was gotten from the Ed post “Getting rid of”I do NOT consent” answers? #315”. Generative AI was not used in this assessment in any form.
Today, we finalised our Project Group. We discussed possible ideas for a research question, however, we did not finalise an idea. We also tried to organise days where we could meet up to complete the project, but did not end up finalising a time. We created a shared OneNote file, where we divided the project up into sections, with everyone being able to view each section and each other’s individual work.
Today, Caitlin and Alex met up from 2:00 - 4:00 to work on the project. We discussed some possible research questions for RQ1. Possible Research Questions: Data Analysis 1. Does your country of birth influence study aspirations? 2. Does the amount of stress impact the amount of standard drinks you take? 3. Does the mode of lecture influence stress level? 4. Does your country of birth influence what kind of learning style you have? 5. Does your lecture mode impact how long you study for? 6. Does hours worked influence relationship status? 7. Does the amount of friends you have influence your learning style? We didn’t conclude on one question today because we wanted to discuss everything with Davy and Peter first. Our ideas were uploaded into the shared OneNote file.
Today in our workshop we scheduled our next meeting to work on the project. We decided that this would be the time dedicated every week where all of us could meet up; each Tuesday 12:00 - 1:00. Additionally, Davy started to filter the results for responses which would be impossible, and cleaned the dataset, initiating our IDA process. This was the code used:
survey_original = read.csv(“data1001_survey_data_2025_S1.csv”) survey_filtered = filter(survey_original, consent == “I consent to take part in the study”,social_media_use<24, age>15, highest_speed>0,highest_speed<300,hours_work<60,standard_drinks<50,friends_count<100)
All of our work today was uploaded into our shared OneNote file.
Today Peter, Alex, Davy and Caitlin met up from 12:00 - 1:00 to continue working on the project. We decided on our RQ1: ‘Does being a domestic / international student influence the amount of hours worked per week?’ Additionally, we formulated some ideas for our linear model RQ2: 1. Is there a linear correlation between the amount of hours worked in a week and the number of standard drinks taken in a week?
Is there a linear correlation between the number of friends one has and the amount of hours they aspire to study?
Is there a linear correlation between the amount of hours worked and stress level?
Is there a linear correlation between hours worked and rent paid?
Is there a linear correlation between rent paid and stress level?
We decided that: ‘Is there a linear correlation between the amount of hours worked and stress level?’ would be the best option for our RQ2. Our ideas were uploaded into the shared OneNote file.
Today Caitlin, Peter and Alex met to work on the project from 12:00 - 1:00. We appointed different sections of the IDA to complete. Caitlin and Alex would work on the source and structure, Peter would work on limitations, and Davy would work on data cleaning. We all started working on our specific sections. Additionally, we decided on a question for our linear model RQ2: “Is there a linear correlation between the amount of hours worked and stress level?” Now that we had finalised both our RQ1 and RQ2, Davy got to work on coding our graphs. For RQ1, Davy coded a comparative boxplot; and for RQ2, Davy coded a scatter plot with a linear model. All of our work today was uploaded into our shared OneNote file.
Today in our workshop, Peter, Davy, Alex and Caitlin all discussed different aspects of the projects and who would contribute to them. Alex - was appointed the ES, finalising the IDA and RQ1 analysis. Caitlin - was appointed the PowerPoint for the week 8 class presentation, logbook editing, and RQ analysis reviewing. Peter - was appointed RQ2 analysis, reviewing the HTML and locating articles to support our research findings. Davy - was appointed as holder of the quarto document and being the submitter of the assignment, and as a result being the coder for our graphs and HTML.
Today Caitlin, Peter and Davy met up to work on the project from 12:00 - 1:00. We continued to work on the project, with Peter analysing articles and writing our RQ2 analysis, Davy finalising our linear model graph and residual plot, and Caitlin continuing on the Powerpoint presentation and reviewing our completed sections (ES, IDA). Our work today was uploaded into the shared OneNote file.
Today, Caitlin started working on the project again at 9:00. Now with the finalised graphs, they were able to be put into the PowerPoint presentation. Later, Alex joined from 10:30 - 12:30. Together, we edited the RQ1 analysis to respect word count limits, and edited/uploaded his part to the shared OneNote file where everyone was able to input their parts of the project. Additionally, Peter’s finished RQ2 analysis was also reviewed and edited to respect word count limits, and everything was uploaded into our shared OneNote file.
Today, Caitlin continued to edit the PowerPoint presentation. Additionally, Peter finalised our article references and Davy finalised our acknowledgments. Davy made additional, simple graphs for the IDA section.
Today was the last day to work on the project, meaning everything was finalised and edited one last time. Davy collected all the information from the shared OneNote file and uploaded it into R, completing our HTML. Peter reviewed this. Caitlin and Alex met up from 8:30 - 12:00 to discuss and finalise any last minute changes to both the logbook. It was turned into a PDF and emailed to Davy, Caitlin completed the PowerPoint presentation and also emailed this to Davy. This evening, Davy will upload and submit our project to canvas on our behalf. Additionally, we are deciding to meet up next Tuesday from 12:00 - 1:00 to write our speech and assign roles for our Week 8 lab presentation on Thursday.
Bannai, A., & Tamakoshi, A. (2014). The association between long working hours and health: A systematic review of epidemiological evidence. Scandinavian Journal of Work, Environment & Health, 40(1), 5–18. http://www.jstor.org/stable/43187983
Hastings, C., Ramia, G., Wilson, S., Mitchell, E., & Morris, A. (2021). Precarity Before and During the Pandemic: International Student Employment and Personal Finances in Australia. Journal of Studies in International Education, 27(1), 39-63. https://doi.org/10.1177/10283153211065136 (Original work published 2023)
Mullins, G., Quintrell, N., & Hancock, L. (1995). The Experiences of International and Local Students at Three Australian Universities. Higher Education Research & Development, 14(2), 201–231. https://doi.org/10.1080/0729436950140205
van der Hulst, M. (2003). Long workhours and health. Scandinavian Journal of Work, Environment & Health, 29(3), 171–188. http://www.jstor.org/stable/40967287 ::::::