Basic Neo4j

Tram Ho

Continuing 2 posts about Neo4j in the past. Posts 1 , 2 , this article will use Neo4j to view his Twitter account’s personal data.

The Graph Your Network app is a tool to help me view my personal Twitter data. According to their description, they have the Neo4j Docker container setup for each user, this container runs on ECS.

When a user visits a public website address, the user is redirected to one of the neo4j-twitter-head instances to login to his Twitter account. After that, it will be the successful login and authorization step to allow the app to access Twitter data.

Next they will create a new instance to run the neo4j-twitter docker image, which will start up Neo4j and run the Python script to start dumping data from Twitter into Neo4j. Once Neo4j has been launched, credentials will also be reset and a URL, username and password will be given to the user. My data retrieval queries will be handled by the neo4j-twitter-head user using the python py2neo library.

System overview:

I will access the Neo4j using the url, username and password they give me, the instance they create for me only last for a few days, the picture below is the interface of Neo4j.

The last part will be the show mine personal Twitter account, before going into details, below is the data model illustration.

The circles will represent Nodes, the arrows will represent Relationships between nodes. I will load data Tweets from Twitter API and then start querying data ….

  1. Who am I following on Twitter?


  1. 10 hashtags that I have used, for each hashtags count the number of times it appears?


  1. Top 10 Mine mentions?


  1. Top 10 tw with increasing creation time


  1. The text I retweeted


  1. Followback rate (the rate of people following me back when I follow them)

Low rate spray @@

  1. This is all data that has been graphed

Summarizing thanks to Neo4j, I know that after almost 2 years using Twitter, I have follows 148 users, Post Tweets: 96 times, Post Tweets with links: 33 times, Post Tweets with hashtags: 12 times, Post Tweets using source: 3 times. was retweeted: 3 times.

Share the news now

Source : Viblo