analyse linkedin R

Analyze LinkedIn with R


Some time ago I saw an interesting post in a R related group on LinkedIn. It was from Michael Piccirilli and he wrote something about his new package Rlinkedin. I was really impressed by his work and so I decided to write a blog post about it.

Get the package

The package is currently just available via GitHub. But thanks to devtools it is not a problem to install it.

Authenticate with LinkedIn

In the next step we have to connect to the LinkedIn API via oAuth 2.0. You have two possibilities in the Rlinkedin package.

You can just use

to use a default API key for getting LinkedIn data.


You can use your own application and application credentials to connect to the API.

Therefore you have to create an application on  LinkedIn. Go on and log in with your LinkedIn account. Then click on “Add new Application”.


On the next page you can see app settings. Just set them as you can see on the following screenshots:

app_setting1 app_setting2


Then click on “Add application” and you get forwarded to your app´s credentials. Switch back to R and set the following variables:

Then you can authenticate with:

After a successful authentication you start to get some data.


Analyze LinkedIn with R

Michael created a nice overview of the different functions on the package´s GitHub page. So I will just show you here a small sample analysis.

First, lets download all your connections with:

This creates a data frame with all available information about your connections. For our analysis we will get the column “industry” which is the industry the person is working in. We will use it to create a small word cloud.

We will then transform this text with some standard word cloud to a nice looking industry overview:

This will create a word cloud like the following:



Julian Hillebrand

During my time at university and learning about the basics of economics I started heavily exploring the possibilities and changes caused by digital disruptions and the process of digital transformation, whereby I focused on the importance of data and data analytics and combination with marketing and management.
My personal focus of interest lies heavily on technology, digital marketing and data analytics. I made early acquaintance with programming and digital technology and never stop being interested in following the newest innovations.

I am an open, communicative and curious person. I enjoy writing, blogging and speaking about technology.