Discover hidden Facebook usage insights  

Harness the power of cognitive data analysis in a Jupyter Notebook with PixieDust

Last updated

Combine the power of a Jupyter Notebook, PixieDust, and IBM Watson™ cognitive services to glean useful marketing insight from a vast body of unstructured Facebook data. To help improve brand perception, product performance, customer satisfaction, and audience engagement, take data from a Facebook Analytics export, enrich it with Watson Visual Recognition, Natural Language Understanding, and Tone Analyzer, and create interactive charts to outline your findings. Credit goes to Anna Quincy and Tyler Andersen for providing the initial notebook design.

By Mark Sturdevant, Anna Quincy, Tyler Andersen


We start with data exported from Facebook Analytics and enrich that data with Watson APIs. We will use the enriched data to answer questions like:
  • What sentiment is most prevalent in the posts with the highest engagement performance?
  • What are the relationships between social tone of article text, the main article entity, and engagement performance?
These types of insights are beneficial for marketing analysts interested in understanding and improving brand perception, product performance, customer satisfaction, and audience engagement. It is important to note that this journey is meant to be used as a guided experiment, rather than an application with one set output. The standard Facebook Analytics export features text from posts, articles, and thumbnails, along with standard Facebook performance metrics, such as likes, shares, and impressions. This unstructured content is then enriched with Watson APIs to extract keywords, entities, sentiment, and tone. After data is enriched with Watson APIs, there are several ways to analyze it. The Data Science Experience provides a robust yet flexible method of exploring the Facebook content. This journey provides mock Facebook data, a notebook, and comes with several pre-built visualizations to get you started with uncovering hidden insights. When you complete this journey, you will understand how to:
  • Read external data into a Jupyter Notebook via DSX Object Storage and pandas DataFrame.
  • Enrich unstructured data using a Jupyter Notebook and Watson Visual Recognition, Natural Language Understanding, and Tone Analyzer.
  • Use PixieDust to explore data and visualize insights.


  1. A CSV file exported from Facebook Analytics is added to DSX Object Storage.
  2. Generated code makes the file accessible as a pandas DataFrame.
  3. The data is enriched with Watson Natural Language Understanding.
  4. The data is enriched with Watson Tone Analyzer.
  5. The data is enriched with Watson Visual Recognition.
  6. The enriched data can be explored with PixieDust to uncover hidden insights and create graphics to highlight them.


Jupyter Notebook

An open source web application that allows you to create and share documents that contain live code, equations, visualizations, and explanatory text.

IBM Data Science Experience

Analyze data in a configured and collaborative environment.

Watson Tone Analyzer

Uses linguistic analysis to detect communication tones in written text.

Watson Natural Language Understanding

A service that analyzes text to extract metadata from content, such as concepts, entities, keywords, categories, sentiment, emotion, relations, and semantic roles using natural language understanding.

Watson Visual Recognition

Quickly and accurately tag, classify, and search visual content using machine learning.


Provides a Python helper library for IPython Notebook.



Finding patterns in data to derive information.

Data Science

Systems and scientific methods to analyze structured and unstructured data in order to extract knowledge and insights.

Related Blogs

The Elastic open source community is always stretching

We are halfway through 2017, and maybe it is a good time to draw a breath and take stock of the Elastic open source community. Let’s dive in and see what has happened! Elastic{ON}17 Elastic{ON}17 was held in San Francisco in early March. It was a vibrant conference with about 2,500 attendees, lots of discussion...

Continue reading The Elastic open source community is always stretching

Related Links