Social data modeling with Neo4j
Data sources, such as Twitter, Facebook, and LinkedIn, are excellent sources of social data, and this data can be modeled in Neo4j to get useful insights.
In this recipe, you will learn how to model LinkedIn data using Neo4j.
Getting ready
Install the Neo4j graph database on the host machine using the recipe described in Chapter 1, Getting Started with Neo4j. This installation process will depend on your preference for your machine OS type.
For this recipe, we will use data from LinkedIn, which although it is not open, some part of it can be obtained using the LinkedIn API.
How to do it...
Let's model this data to get some insights from LinkedIn:
User – [IS_FRIEND_OF] – User[s] User – [IS_EMPLOYEE_OF] – Company[s] User – [HAS_SKILL] – Skill[s] Company – [NEED_SKILL] – Skill[s]
Let's answer some questions on the basis of our social graph:
Friends who belong to my skill set: Let's find out the friends who match my profile skill set, using this query:
MATCH (me)-[:HAS_SKILL...