data(nyc_regents_scores) #pulling out the dataset chosen
nyc_regents_scores <- nyc_regents_scores %>%filter(!is.na(english) &!is.na(us_history))p1 <- nyc_regents_scores |>ggplot(aes(x = english, y = us_history, color = living_environment))+geom_point()+# creating the scatterplotlabs(x ="English Scores", y ="US History Scores", title ="English Scores and US History Scores related by Living Condition", color ="Living Environment")+geom_smooth(method = lm, se=FALSE, color ="purple")+# line of regressiontheme_minimal() +# theme changescale_color_gradient(low ="blue", high ="cyan") # changing colortheme(plot.title =element_text(size =15, face ="bold", hjust =0.5),axis.title =element_text(size =13, face ="bold"),axis.text =element_text(size =9),plot.caption =element_text(size =9),legend.title =element_text(face ="bold")) #changes to elements of graph for cleaner look
I’ve looked at the NYC Regents Scores dataset from DSLabs, which includes English and US History scores, along with information about the students living conditions. While I’m not sure how information was retrieved about living conditions, I looked to see the relationship between US History and English scores. Identifying a relationship could show that students who do well in one subject are likely to perform well in the other. Then I examined whether higher scores correlate with better living conditions. The analysis showed a pretty clear connection showing that students who performed well in English usually did similar scores in US History. Furthermore, those with better living conditions usually got higher exam scores. This shows overall that both academic performance and living conditions are correlated and can affect a student success.