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
Setup a Twitter Developer Account
This learning guide requires a Twitter developer account and access to the Twitter API.
Setup Python
Never used Python before? Please see our introduction to Python.
Download and Modify Script
Learn how to use a configuration file for easy deployment and improved security.
Scrape Data from Twitter
You’ll learn how to scrape Tweets from the Twitter archive using the API.
Install Required Python Libraries
Learn how to use PIP to install dependent libraries like TextBlob and Pandas.
Run Script & Analyze Data
Run the script and interpret the results!