Category: R tips and tutorials

Non-tenure track salaries

I was preparing a data analysis assignment for one of my classes, and decided I needed an example for my students.  Similar to what I’m asking of my students, I wanted to use public employee salary data from the the Texas Tribune Government Salaries Explorer.  After a few moments’ thought* , I hit upon the topic of salaries for non-tenured faculty at the University of Texas at San Antonio, where I teach statistics.

I downloaded the UTSA data–an Excel CSV file–and selected out employees whose job titles contained the words “ADJUNCT”, “LECTURER”, or “TUTOR”, and copied those to a separate worksheet page.  From there on, every bit of my example was done using R, all composed and arranged nicely with RStudio.  The full analysis is here, but look at this interesting graph:

UTSANTTsalaries

  • How the heck do two part-timers in the College of Education and Human Development’s Department of  Educational Leadership and Policy Studies make over $100K annually?  That’s one sweet gig!
  • Working in the Women’s Studies Institute is a vow of poverty.  Should have gone to trade school.
  • The Writing Core Program is almost as bad.  Learn to write advertising copy and move to the College of Business Marketing Department.
  • Part-time NTT economists seem to make more than full-timers.  That doesn’t seem to make make economists credible.

*Thanks for the nudge from a new follower, Adjunct Professors—-Overworked & Underpaid!

Advertisements

Data to Viz

For data analysts using R, this is huge.  Find out how to generate the graph you need for the data you have with just a few clicks.

DataViz_poster_medium

Yes, you’ll find some fine print explaining that the site is not comprehensive.  BUT, it still has a trove of graph types and accompanying R and python code to generate them.

Tip from the R Bloggers

Update: from the O’Reilly Data Science Newsletter, I learn that the Data to Viz site has a CAVEATS page, showing many of the most common “worst practices” of data visualization, whether confusing, misleading, or downright deceptive.

Data-to-Viz-Simpsons

I’m not quite sure, though, why the site displays only 7 examples when I select the Top 10 filter ….

R Tutorial: Correlation

Fisher’s iris dataset is the basis for this extended example in the calculation and visualization of correlations.  The ggpairs() function gives an impressive coded scatterplot matrix.  And an old friend makes a last-minute cameo appearance.

ggpairsexample

Update:  Dirk Eddelbuettel just released tint 0.0.3 (tint is not Tufte) with some nifty examples.  I wanted to try it out, so I’ve updated the example using tint and added two margin plots to illustrate the Simpson’s Paradox  situation.  Tip from R Bloggers.

Beginning: R Tutorials

After a long, slow start, R is catching on with statisticians and (some) scientists at UTSA.  The Biology Department has asked that I use R in teaching biostatistics, and many of the courses for statistics majors are using R rather than SAS (a UTSA tradition).  Students have not been idle; the statistics club has asked me to present an occasional series of R tutorials to get their members up to speed.  Here are the first two tutorials:

These tutorials are all HTML files, generated with RMarkdown.  Students who attend the presentations are also provided with the markdown source files, so they can tweak the code during the presentation.