Sentiment Analysis

Estimated Learning Time 2 Hours

What?

Analyze text from social media and websites to determine objectivity and whether the text is generally negative or positive.

Why?

With the decline of local news media and print journalism, many constituents have turned to government itself as a source for news and information.

 

Level - Intermediate

Requires knowledge of Python, data clean-up and data transformation.

OBJECTIVES

Objectives & Outcomes

Z

Setup a Twitter Developer Account

This learning guide requires a Twitter developer account and access to the Twitter API.

Z

Setup Python

Never used Python before? Please see our introduction to Python.

Z

Download and Modify Script

Learn how to use a configuration file for easy deployment and improved security.

Z

Scrape Data from Twitter

You’ll learn how to scrape Tweets from the Twitter archive using the API.

Z

Install Required Python Libraries

Learn how to use PIP to install dependent libraries like TextBlob and Pandas.

Z

Run Script & Analyze Data

Run the script and interpret the results!