R Users’ Salaries from the 2019 Stackoverflow Survey

By Tomaž Weiss, Data Scientist  Stackoverflow has recently released the anonymized results of their 2019 annual developer survey.

Let’s take a look on what R users are saying about their salaries.

Note that the following results could be biased because of unrepresentative and in some cases small samples.

   The dataset consists of survey answers from nearly 90,000 respondents.

About 5,000 of them reported using R for “extensive development work over the past year”.

We first import the data and keep only the respondents who use R as part of their professional work.

The first filter used reduces the dataset from 88,883 respondents to 5,048.

The second filter excludes students, hobby programmers and former developers.

This reduces the dataset to 4,047 respondents.

The third filter excludes unemployed and retired respondents and the dataset is further reduced to 3,871 respondents.

Finally, we exclude respondents from an unknown country and respondents with unknown or zero salary (variable ConvertedComp).

The final dataset size is 3,034 rows (respondents).

We need two additional helper tables.

The first one will contain number of R users and their median annual USD salary by country.

The second table will contain country-continent information.

We can use the handy countrycode::countrycode function for this task:   Our variable of interest is called ConvertedComp and is defined as “salary converted to annual USD salaries using the exchange rate on 2019-02-01, assuming 12 working months and 50 working weeks.

”Annual salary distributions are visualized below by boxplots.

To avoid displaying (too much) noise, we limit ourselves to countries with at least five reported R users.

United States has the highest median annual salary at 110,000 USD, followed by Israel and Norway.

The lower part of the graph is populated by Asian, South American and African countries.

   Let’s have a quick look at R users’ salary distributions by some interesting variables for country with the highest number of respondents (1,100).

  The median of the second age group is is about 40% higher than the median of the first one.

The median of the third age group is is about 17% higher than the median of the second one.

The median of the fourth age group is is about 6% higher than the median of the third one.

Note that a few respondents reported salaries very close to zero.

   Similarly, distributions by gender can be plotted:Men report to earn about 15% higher median salary than women.

   Rare education categories are excluded here for better readability.

Bachelor’s degree holders report earning about 15% more than respondents without a degree (median difference).

Master’s degree holders report earning about 9% more than respondents with bachelor’s degree.

Ph.

D.

 holders report earning about 18% more than respondents with master’s degree.

   R users come from a diverse set of undergraduate degrees.

Again we exclude rare majors.

Interestingly, the highest median salary is reported by “other” engineering majors (civil, electrical, mechanical).

   Note that each survey respondent had an option to pick more than one category here.

Even though we removed students from the MainBranch column at the beginning of the analysis, some developers still report being a student in the DevType column.

As expected, executives and managers earn the most and students earn the least.

   I hope you found the above insights interesting.

Feel free to experiment with this data by yourself and share your findings.

    Bio: Tomaž Weiss is a Data Scientist from Ljubljana, Slovenia.

Original.

Reposted with permission.

Related: var disqus_shortname = kdnuggets; (function() { var dsq = document.

createElement(script); dsq.

type = text/javascript; dsq.

async = true; dsq.

src = https://kdnuggets.

disqus.

com/embed.

js; (document.

getElementsByTagName(head)[0] || document.

getElementsByTagName(body)[0]).

appendChild(dsq); })();.

. More details

Leave a Reply