The use of artificial intelligence and data science in electoral campaigns has become increasingly important, with examples such as Barack Obama’s successful campaign in 2012. Techniques such as sentiment analysis and natural language processing are used to gauge voter opinion through social media, but may have limitations due to sampling bias.