Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In last week’s blog, I explained why you should Master R (even if it may eventually become obsolete).
I wrote that article to address people who claim mastering R is a bit of a waste of time (because it will eventually become obsolete).
But when I suggested that R may eventually become obsolete, this seemed to provoke fear that R is becoming obsolete right now.
I want to allay your fears: R is still very popular.
R has been one of the fastest growing programming languages of the last decade.
So, I want to reassure you. R is definitely not obsolete. In fact, R is extremely popular and a best-in class data language.
To that end, I want to explain all of the reasons why I’m very optimistic about R’s long term prospects, and why I think it’s perhaps the best data science language to learn today.
R consistently ranks among the best languages
One thing I want you to understand is that right now, R is one of the most highly regarded, highly ranked, and fastest growing languages in existence.
In many ways, R is the data language. In data science, it’s the language to beat (with only 1 or 2 serious contenders).
To understand why this is true, let’s look at the results of several important surveys and programming language rankings to see where R shakes out.
IEEE: R ranks #5
The world’s “largest association of technical professionals,” the IEEE, has created a ranking of programming languages for several years.
This IEEE ranking system uses a set of 12 metrics, including things like Google search volume, Google trends, Twitter hits, Github repositories, Hacker News posts, and more.
Using this methodology, they rank several dozen programming languages and place them into several categories.
In their review of the “Top Programming Languages” of 2016, R climbed to #5.
The IEEE methodology is quite comprehensive, so this is a strong indicator of R’s strength compared to other languages, and the relative value of learning R.
TIOBE: R ranks high with consistent upward trend
Another ranking system, the TIOBE index, creates a similar score and rank for various programming languages.
If we look at R’s performance on the
TIOBE index, we can see a solid upward trend for almost a decade.
Keep in mind that the TIOBE index is structured to be “an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.”
For December 2016, R has an overall rank of 17 (among all programming languages). Its maximum rank was #12 in May of 2015.
This suggests that currently, learning R is still an excellent option if you want to learn data science. It may arguably be the best option. (To be clear, Python ranks higher on the TIOBE index, but it’s harder to separate out web and software dev uses of Python from the strictly data-related uses of Python, so it may not be an apples to apples comparison.)
Redmonk: R is #12
Another frequently sited language ranking system is the Redmonk Programming Language Rankings, which are derived from popularity on GitHub (lines of code) and popularity on Stack Overflow (number of tags).
As of November 2016, R ranks number 13 among all programming languages.
Moreover, R has shown a consistent upward trend for several years:
Out of all the back half of the Top 20 languages, R has shown the most consistent upwards movement over time. From its position of 17 back in 2012, it has made steady gains over time, but had seemed to stall at 13 having stuck there for three consecutive quarters. This time around, however, R took over #12 from Perl which in turn dropped to #13. There’s still an enormous amount of Perl in circulation, but the fact that the more specialized R has unseated the language once considered the glue of the web says as much about Perl as it does about R. Which is irrelevant to R advocates, of course. Whatever the cause, R’s relatively unique Top 20 path is one for fans of the language to cheer.
– RedMonk Programming Language Rankings: June 2016
O’Reilly: R is arguably the most common data programming language
Finally, O’Reilly media has conducted a data science survey for the last several years, and they use the survey data to analyze data science trends. Among other things, they analyzed tool usage to identify which tools are most commonly used by data scientists.
In the 2016 survey report, R was the most common programming language (if we exclude SQL, which isn’t a programming language in the sense that I’m using it here). 57% of all respondents used R (compared to 54% using Python).
(As a side note, fully 70% of respondents used SQL. If you’re looking for another tool to learn after R, I’d suggest SQL.)
They also surveyed people to identify data visualization tools. They found that ggplot2 was the most common visualization tool. I’ll explain why I love ggplot2 in an upcoming blog post, but if we’re only tracking popularity, the O’Reilly survey suggests that ggplot2 is highly used (if not best in class).
R is excellent for learning data science
Beyond popularity, another reason that R is an excellent data science programming language is that it is excellent for learning data science.
R is a true “data language”
Part of the reason for this, is the nature of the language itself.
R was ultimately created with statistics and data in mind. The R-Project describes R as a “[programming] language and environment for statistical computing” (emphasis mine).
R is a language that has statistics and data built into its DNA, so to speak.
In this sense, R is nearly unique among programming languages. It is a language that has been built for statistics. It’s been designed for data.
This has advantages when you’re learning data science, because almost any statistical test or technique can be found somewhere within base R or one of its packages.
The best books and resources use R
Related to the fact that R is a “statistical computing” language is the fact that many of the best books and learning materials have adopted R as the language of choice.
This is important. If you’re a beginner, and you’re just getting started in data science, you’ll have a lot to learn. To truly master data science, you’ll need to learn several sub-areas like probability, statistics, data visualization, data manipulation, and machine learning. All of these skill areas have theoretical foundations (which you’ll need to learn) but also practical techniques that you’ll need to execute by writing code.
That means that:
- You need a language that has strong capabilities in each of these areas (visualization, manipulation, machine learning (AKA statistical learning), etc)
- You need a language for which there are high quality training materials in these skill areas.
While there are many data-related books and courses out there, but many of the best ones are centered on the R programming language.
Learn Probability with R
For example, two excellent books on probability use R for their “hands on” programming examples.
The first is Probability with Applications and R. This book is very approachable, readable, and well organized.
The second is Introduction to Probability which was developed from highly regarded statistics lectures at Harvard.
These are just two examples. If you dig deeper, you’ll find that among probability books that use a programming language, many (if not most) of them use R.
Learn frequentist statistics with R
The same can be said for statistics books.
Because R has statistics “built into its DNA,” many statistics textbooks use R as a learning tool.
For an introductory look at frequentist statistics, here’s one excellent book:
Again, if you do a quick search on Amazon, and look at many intro stats books, you’ll find that if they use any programming language as a teaching tool, they are more likely to use R than almost any other language.
Learn Bayesian statistics with R
This becomes even more pronounced if you want a hands-on book for learning Bayesian statistics.
If you want to learn Bayesian stats and Bayesian analysis, nearly all of the books use R. There are some exceptions, like a few books that teach Bayesian analysis in C or Python, but overwhelmingly the best books that teach Bayesian statistics use R.
If you’re interested in Bayesian stats, check out these:
If you’re interested in Bayesian methods, these books are “best in class,” and they all use R.
Learn Data Visualization in R
When you’re learning data visualization, there’s a slightly larger range of programming languages to choose from, but I still maintain that most of the best learning materials use R.
If you’re learning data visualization, I highly recommend the work of Nathan Yau. His blog, flowingdata.com, frequently has data visualization tutorials for the R programming language. (I also recommend his book Data Points as a companion, though it teaches principles as opposed to programing language syntax.)
I also highly recommend several books by Hadley Wickham. First, if you’re interested in data visualization in R, you need to own the book ggplot2. It not only teaches you the syntax of this critical R data visualization library, but it will also reshape how you think about visualizing your data.
I also recommend R for Data Science. This book provides a great introduction to data visualization, but additionally teaches you a broad set of data tools in R. It’s excellent, and a “must own” R book.
Learn machine learning with R
Finally, if you want to get started with machine learning, many of best machine learning books use R.
Although I will acknowledge that there’s more diversity among ML books with regard to their programming language, I still maintain that many of the best ones use R.
Here are two excellent introductions to machine learning that teach ML using the R programming language.
These books are both rigorous while still being approachable. They will teach you a little bit of theory (but not overwhelm you with math) while also showing you practical techniques.
Without question, these are the two books that I recommend most often for a beginner who wants to learn machine learning, and they both use R.
If you want to learn data science, R is excellent
Ultimately, the point here is that R is an excellent language for learning data science, because many of the best books (and other training materials) use R as the programming language of choice.
So if you’re a beginner in data science, I think that R is the best language – in large part – because of the quantity and quality of data-science learning materials.
A quick note on Python
There are other options, but the only one I’ll address here is Python.
As far as data science programming languages go, Python is the only serious alternative to R right now. (Other alternatives lack a well-developed package ecosystem or are not free/open source.)
I won’t explain my full thoughts on Python here, but I will say that it’s an excellent language. I love Python.
Having said that, for data science beginners, I still think that R is a slightly better choice, largely for the reasons I outlined above.
Again, I think that many of the best textbooks and training materials for foundational data science concepts (probability, statistics, Bayesian statistics, machine learning) are R-based books. That’s not to say that there aren’t excellent data science books that use Python, but I still think that there is a higher average quality among the R-based texts.
The other issue with Python is that many students get caught up in software development. That is, instead of learning statistics, data visualization, data manipulation, probability, etc, they end up spending their time learning about data structures, loops, flow-control, object oriented programming, and web frameworks. These skill areas can complement the core data science toolkit, but they are not data science topics in the sense that I’m using the term here. In fact, I recommend that most beginners learn software development contepts after learning basic data science subjects like data manipulation, visualization, analysis, etc.
Even though most beginners should learn software development principles later, many beginners who start with Python get sidetracked into these software development and web development areas. I think this happens, because in many ways, Python is geared towards these subjects. Most books on Python are not really data science books per se, but instead books on programming, development, etc. So a beginning data science student opens up a Python book intending to learn data science, but they end up going down the software/web development rabbit hole, and don’t come out for a few months (or years).
As much as I love Python, I think this is a risk for beginners. I think it’s better to start with R as it has statistics and data science more “built into its DNA.” With R, it’s easier to learn the foundations, and harder to get sidetracked.
Recap: Learn R if you want to learn data science
What you should take away is that for learning data science, R is arguably the best option. In terms of popularity, R is very highly ranked, and on an upward trajectory. Moreover, many of the best data science books and training materials use R.
If you want to get started learning data science, I recommend the following:
- Learn R
- Specifically, learn ggplot2, dplyr, tidyr, lubridate, and other Hadleyverse tools for data visualization and manipulation
- Learn to use these tools together to analyze data
- Once you have some background in these essential R packages, bulk up on probability, stats, and machine learning (I recommend the texts that I talk about in this blog post)
Discover how to master R
Do you want to rapidly master R?
Sign up for the email list at Sharp Sight.
Our posts are devoted to helping you rapidly master R, one of the best programming languages in the world, and possibly the best data science language you can learn.
The post Why R is the best data science language to learn today appeared first on SHARP SIGHT LABS.
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.