Skip to main content

Social Media Analytics and Sentiment Analysis

In this course, you learn the essentials of Sentiment Analysis. It will go live by September 2020.

About This Course

In this course participants will be introduced to the most important concepts, theories, techniques, and applications in social media analytics. We will focus on all levels of analysis in social media, namely the network, the users, the product and the message. We start off with an introduction to social media analytics. Next, we take a deeper dive into the usage of social media in advertising. This part does not only cover the most important theories, but also discusses various examples like Cambridge Analytica. Next, we give an overview on how to gather social media data via Facebook and Twitter. We then elaborate on specific data issues when using social media data and more importantly on how to solve these issues. This is followed by an in-depth discussion of descriptive, predictive, and prescriptive applications of social media analytics. Next, we further elaborate on sentiment analysis, one of the most important – if not the most important- subfield of social media analytics. In sentiment analysis, we first explain lexicon-based techniques of sentiment analysis. Next, we discuss how to use machine learning methods and deep learning to predict sentiment. The course concludes with some final thoughts on the down- and upside of using social media data.

The course provides a sound mix of both theoretical and technical insights, as well as practical implementation details. These are illustrated by several real-life case studies and examples. Throughout the course, the instructors also extensively report upon their research and industry experience. Examples are given in R and/or Python depending on the applications and discussed extensively.

We can also come and teach this course on-site in classroom format. If interested, please mail us at:


The enrollment fee for this course is EUR 250 (VAT excl.) per participant. Payments are securely handled by PayPal. If you are a company in the European Union, then we can apply VAT reverse charge. For this, please mail your VAT number to Part of our course revenue is used towards funding organizations involvement in protecting and cleaning our oceans. See our about page to learn more about our mission statement.

After enrollment, participants will get 1 year unlimited access to all course material (videos, code scripts, quizzes and certificate).


Before subscribing to this course, you should have a basic understanding of descriptive statistics (e.g., mean, median, standard deviation, histograms, scatter plots, etc.) and inference (e.g., regression analysis). Prior experience in Machine Learning, for example through completing the Machine Learning Essentials BlueCourses course, will come in handy. Likewise, sentiment analysis is a specific form of text data analysis. Thus, an understanding of the broader scope of natural language processing will be useful but is not essential. Our recent Text Analytics course provides an excellent foundation.

Course Outline

  • Chapter 1: Introduction
    • Definition
    • Application domains
    • Steps in social media analytics
    • Levels in Analysis
    • Quiz
  • Chapter 2: Social Media Advertising
    • The old and new framework
    • Owned media
    • Earned media
    • Organic strategies
    • One-to-one strategies
    • Cambridge Analytics: one-to-one strategy gone wrong
  • Chapter 3: Gathering social media data
    • Facebook API
    • Twitter API
    • Getting started on the Twitter API
    • Gathering tweets in R
    • Gathering tweets in Python
    • Other APIs
    • Quiz
  • Chapter 4: Data issues and preprocessing
    • Problems with the Facebook API
    • Sampling Bias
    • Class imbalance
    • Missing values
    • High dimensionality
    • Quiz
  • Chapter 5: Applications
    • Causal analytics
      • It’s all about engagement
      • Nonrandomness and endogeneity
    • Predictive analytics
      • Examples of our research
    • Prescriptive analytics
      • Optimizing network size
    • Quiz
  • Chapter 6: Sentiment Analysis
    • Introduction
    • Lexicon-based methods
      • General idea and strategy
      • Cleaning social media data for sentiment
      • Valence shifters
      • Tools
      • Lexicon-based sentiment analysis in Python
      • Lexicon-based sentiment analysis in R
      • Other languages than English
    • Machine-learning methods
      • Type of the input variables
      • Creating the input variables
      • Creating the output variable
      • Common experimental set-up
      • Evaluation of sentiment analysis models
      • Overview of machine learning models
      • Traditional machine learning models
      • Deep learning models
      • Pretrained transformers
    • Quiz
  • Chapter 7: Conclusion
    • Social media data: opportunities and challenges
    • Social media data and privacy
    • Sentiment analysis: opportunities and challenges
    • Quiz
  • Quiz

Course Staff

Prof. dr. Matthias Bogaert

Prof. dr. Matthias Bogaert

Matthias Bogaert is born in Aalst (East Flanders, Belgium) on May 17th, 1991. He lives together with his girlfriend Jolien, their one-eyed cat Lilo, fox-red Labrador Mila and newborn baby. He is a very proud to be born and raised in Aalst, which is renowned for its world famous carnival (albeit not always in a good way). As every Belgian, he likes to drink a good beer ranging from traditional lagers to strong blond ales. Some of his favorite Belgian beers are Vedett, Cornet, and Gouden Carolus Tripel. In his spare time, he loves to watch and play football. He is a big fan of the Belgian recordmeister Royal Sporting Club Anderlecht, although that is not something to be proud of nowadays. Nevertheless, he remains a major fan of the Pro League (= the Belgian first division of football) and almost watches every game. Besides watching football, he normally plays futsal every weekend with his team Falcaos. He is also a frequent quizzer and plays in a local competition with his team Karma Police. His specialties are sports, politics and media. Besides all that, he loves to make long walks with his dog, play a good PlayStation game (e.g., Uncharted, Assassins Creed, Red Dead Redemption, among others) and go out eating to a good restaurant with his girlfriend.

Matthias Bogaert is also an assistant professor of Data Analytics at the Marketing, Innovation, and Organization Department (Research Group Data Analytics) at Ghent University and Visiting Professor at the University of Namur. Prior to joining Ghent University, he worked as a lecturer in Business Analytics at the University of Edinburgh Business School and postdoctoral research at the KU Leuven. He has taught a wide-range of data analytics courses ranging from basic statistics and database management to advanced predictive analytics and social media and web analytics. His research focuses on applications of descriptive, predictive and prescriptive analytics in social media, digital communities, and customer relationship management. The main goal of his research is to come up with a reproducible data analytical methodology that companies can easily implement. His research has been published in several well-known international journals such as the European Journal of Operational Research, Omega, Decision Sciences, among others.