Site icon R-bloggers

Exploring college major and income: a live data analysis in R

[This article was first published on Variance Explained, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I recently came up with the idea for a series of screencasts:

I've thought about recording a screencast of an example data analysis in #rstats. I'd do it on a dataset I'm unfamiliar with so that I can show and narrate my live thought process.

Any suggestions for interesting datasets to use?

— David Robinson (@drob) October 6, 2018

Hadley Wickham had the great suggestion of analyzing a Tidy Tuesday dataset. Tidy Tuesday is a fantastic project run by the R for Data Science online learning community (especially Thomas Mock) that releases an interesting dataset each week.

I’ve now released my first such screencast, exploring this week’s Tidy Tuesday dataset on (the data behind The Economic Guide to Picking a College Major). You can also find the R Markdown I produced here.


I produced a handful of figures that I found pretty interesting. I took a look at the distribution of income from graduates within each category of major.



I spent some time on looking at the differences in gender distribution across majors, which was also included in the data.



And I ended by setting up an interactive scatterplot with the plotly package that compared the share of women in a field to the median salary.


Some notes and observations:

I had enough fun that I think I’ll do it again (though probably not every week). With that in mind, I’ve learned some lessons that might improve my future screencasts:

I look forward to hearing your feedback, and to recording to the next one!

To leave a comment for the author, please follow the link and comment on their blog: Variance Explained.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.