Question: (Trends, Searches, and Sentiment )PYTHON a. Use the Twitter Trends API to determine the available trending topics for a city of your choice, and assign

(Trends, Searches, and Sentiment )PYTHON

a. Use the Twitter Trends API to determine the available trending topics for a city of your choice, and assign a tweet volume of 5000 to any trend with no volume provided.

b. After sorting the trends in descending order by volume, create a bar graph with each (sorted) trend on the x-axis against its volume on the y-axis.

c. Use the Twitter Search API to find 100 tweets for each of the three most popular trends in the chosen city, and preprocess their associated tweet text (preferring extended tweet text, if available) in a manner appropriate for tweets.

d. Use TextBlob to determine the sentiment for each set of 100 tweets. Do you notice a substantial difference in the proportion of positive and negative sentiment for the three trends? Try to theorize why or why not in a paragraph.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!