Discover hidden Facebook usage insights

Read this in other languages: 한국어.


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.


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 pattern 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. Watson Studio provides a robust yet flexible method of exploring the Facebook content.

This pattern 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 pattern, you will understand how to:

  • Read external data into a Jupyter Notebook via Watson Studio 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 Watson Studio 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.


Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.

Mark Sturdevant
Anna Quincy
Tyler Andersen