Developers those who code in any language is always interested in expanding their knowledge into new unknown Territories and Students who want to start with coding are also always looking out for the right language (It’s actually a Myth!) to start their learning with. That’s where getting to know the most popular programming languages becomes a need. TIOBE Index is a measure that helps us understand how popular a programming language.

TIOBE Programming Index

According to Wikipedia, TIOBE programming community index is a measure of the popularity of programming languages, created and maintained by the TIOBE Company based in Eindhoven, the Netherlands.

TIOBE Index is published every month as the popularity of the programming language changes. The definition of the TIOBE index can be found here.

The TIOBE Programming Community index is an indicator of the popularity of programming languages and It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

In this post, We will see how to use the R package tiobeindexr to get the list of popular programming languages and some other data published by TIOBE Programming Community.

About tiobeindexr package

tiobeindexr helps R users in extracting ‘TIOBE’ Programming Index Tables for the Latest Month from TIOBE website programmatically.

Installation & Loading:

The stable version of tiobeindexr is available on CRAN hence can be installed like this below:

install.packages('tiobeindexr')

And also the development version of the package is hosted on github hence the development version can be installed using the code below:

#install.packages('devtools')
devtools::install_github("amrrs/tiobeindexr")

library(tiobeindexr)

Extracting Top 20 Popular Programming Languages

The function top_20() is very straightforward to use for extracting top 20 popular programming languages.


top_20()
   May 2018 May 2017 Programming Language Ratings Change
1         1        1                 Java 16.380% +1.74%
2         2        2                    C 14.000% +7.00%
3         3        3                  C++  7.668% +2.92%
4         4        4               Python  5.192% +1.64%
5         5        5                   C#  4.402% +0.95%
6         6        6    Visual Basic .NET  4.124% +0.73%
7         7        9                  PHP  3.321% +0.63%
8         8        7           JavaScript  2.923% -0.15%
9         9        -                  SQL  1.987% +1.99%
10       10       11                 Ruby  1.182% -1.25%
11       11       14                    R  1.180% -1.01%
12       12       18 Delphi/Object Pascal  1.012% -1.03%
13       13        8    Assembly language  0.998% -1.86%
14       14       16                   Go  0.970% -1.11%
15       15       15          Objective-C  0.939% -1.16%
16       16       17               MATLAB  0.929% -1.13%
17       17       12         Visual Basic  0.915% -1.43%
18       18       10                 Perl  0.909% -1.69%
19       19       13                Swift  0.907% -1.37%
20       20       31                Scala  0.900% +0.18%

It is also important to note that the function top_20() could be fed into a data pipeline of tidyverse and visualization could be built on top of it.

library(tidyverse)

top_20() %>% 
  mutate(Change = as.numeric(gsub('%','',Change))) %>% 
  ggplot(aes(x = reorder(`Programming Language`,Change), y = Change, 
             fill = `Programming Language`,
             label = paste0(Change, "%"))) + 
  geom_col() +
  coord_flip() +
  geom_text(nudge_x = 0.1) +
  xlab('Programming Language') +
  ggtitle('Programming Languages Change from May')

Gives this plot:

Extracting Top 50 Popular Programming Languages

Similar to the above function, tiobeindexr package provides top_50() that gives a dataframe with top 50 programming languages listed by TIOBE Community but unlike top_20(), this function returns only three columns, 1. Rank, 2. Programming Language Name and 3. Ratings.

tail(top_50())
   Position Programming Language Ratings
45       45                   ML  0.377%
46       46                Julia  0.342%
47       47         ActionScript  0.321%
48       48              Haskell  0.320%
49       49               Kotlin  0.292%
50       50                  RPG  0.281%

Hall of Fame

TIOBE’s hall of fame is listing of all “Programming Language of the Year” award winners and The award is given to the programming language that has the highest rise in ratings in a year. This data can be extracted using the function hall_of_fame().

hall_of_fame()
   Year       Winner
1  2017            C
2  2016           Go
3  2015         Java
4  2014   JavaScript
5  2013 Transact-SQL
6  2012  Objective-C
7  2011  Objective-C
8  2010       Python
9  2009           Go
10 2008            C
11 2007       Python
12 2006         Ruby
13 2005         Java
14 2004          PHP
15 2003          C++

Summary

This tiobeindexr could be used to programmatically extract data from TIOBE Programming Community Index page and the extracted information could be used for Data Visualisation or added to automated script to keep ourselves informed about the popularity of programming languages. The code used here is available on my github.

References