Analyzing my LinkedIn Network with Python

Emmanuel Diaz
3 min readJan 1, 2021

What would happen if you could see your entire LinkedIn network in just two images or graphs? What would you see? How would it look like?

Introduction

Since the majority of us are in a second (even third) lockdown, I can highly avouch that we have had more than enough time to think about our personal and work relationships and how well or wrong we have been building them.

So, this time I'll analyze my LinkedIn network with over 300 contacts. I will be using Python to manipulate the data.

If you know the number 1 programming language in 2020 according to this article, and you want to analyze your network, you can start getting your data from LinkedIn following these steps.

Please note that I will only be utilizing “Connections” data only for this tutorial.

Network Analysis

I imported all the needed libraries to be able to manipulate the data directly extracted from LinkedIn. Then, I visualized the latest 10 contacts from my network.

Let’s make a group from the column “Connected On” to visualize how I’ve been connecting with people since I opened my LinkedIn account.

In the graph above we can see there’s a remarkable peak that started in 2020. There could be several reasons behind this peak such as the lockdowns resulting in more free time to navigate on the internet and connecting with more people.

Companies where my network works

What could be behind the companies where my network works? Could there be a pattern? I could use a bar graph like this:

Doing a little bit of research I found that Treemaps can display hierarchical data as a set of nested rectangles into a rectangular data frame in which the area is proportional to its value.

With a graph like the above is easier to analyze and visualize the main companies where my network works. It looks like the majority of my network is compounded by current colleagues and people from my previous company.

Positions in my network

Let’s visualize the main positions in my LinkedIn Network with a regular bar graph

Using a library called wordcloud jointly with matplotlib and almost an hour trying to figure out how to do a cool wordcloud graph with all the positions in my network. The result is the one shown below!

It turned out that my network is full of founders and directors and maybe it is time to rethink how I want to keep building my network.

I want to say thank you to Khuyen Tran for being a big inspiration for this article.

--

--

Emmanuel Diaz
0 Followers

Finances and Banking | Passionate about technology | Constantly learning new things