JeanCarl's Adventures

Analyzing Twitter User’s Personality in Node-RED

July 01, 2016 |

Have you heard that Twitter timelines are public and that anyone can data mine what we tweet. From understanding what you might buy, to understanding how a competitor’s product is being talked about, to what’s trending, a Twitter timeline can be full of rich data ready to be analyzed.

Did you know you can also analyze your personality based on the tweets in your timeline? IBM has built a couple of sample applications that analyze a variety of things with the results of the Watson Personality Insights service available in IBM Bluemix. From matching your personality to a celebrity with Your Celebrity Match, to analyzing what type of designer your personality matches with Roztayger, Personality Insights offers scores of the Big 5 Personality traits (Openness, Conscientiousness, Agreeableness, Intro/Extroversion, and Emotional Range) and subcategories that can be used in your own applications to add additional data points about your users.

Photo

Using Node-RED to quickly prototype the application, I created a Node-RED lab that analyzes your personality using the tweets. It uses the Insights for Twitter Bluemix service and the Watson Personality Insights service to retrieve and analyze the tweets.

Photo

You can either use an existing Node-RED application, or deploy a new Node-RED starter boilerplate application in IBM Bluemix. Bind the Insights for Twitter service and Watson Personality Insights service to your application.

Photo

Photo

You can choose to walk through the lab and add the nodes manually, or import the whole flow by selecting Import -> Clipboard from the menu in Node-RED.

Photo

There are several ways to use this application. You can choose to analyze a specific user’s tweets, using the query parameter q=from:dothewww. You can also search for tweets using a search term and analyze the collective personality of matching tweets.

Both options offer two formats of the data returned: JSON output that can be used in third-party applications and a basic HTML webpage that can be extended or included in a webpage.

Photo

Photo

So…where does your personality take you?