Write My Paper Button

WhatsApp Widget

For this task, you will be using tweets of two Australian politicians (Kevin Rudd and Scott Morrison)., and conducting a data analysis similar to the one for Joe Biden that we discussed in Week 8. You can download

Assessed Task #2

Task weight: 15%

Overall Goal

For this task, you will be using tweets of two Australian politicians (Kevin Rudd and Scott Morrison)., and conducting a data analysis similar to the one for Joe Biden that we discussed in Week 8. You can download the dataset that contains 200 tweets of Kevin Rudd and 200 tweets of Scott Morrison from iLearn (Tweets-Kevin-Scott).

Tasks 

  1. Read the important features of the tweets of Kevin Rudd and Scott Morrison into a single Pandas dataframe. The important features are those that you need for the subsequent tasks.
  2. Use pandas to plot the posting times of the tweets for the two users in one bar chart; the aim of the plot is to distinguish the two users.
  3. Use pandas to construct one bar chart of the proportions of tweets for each of the two users that contain pictures or links.
  4. Use pandas to construct a histogram of the number of hashtags in tweets for each of the two users.
  5. Calculate the log odds ratio (check here for an example) for each word used in the set of tweets, and list the 20 words most strongly associated with each of the two users.
  6. Use the vaderSentiment module to calculate the sentiment of each tweet, and then for each of the two users, calculate the average 'compound' sentiment for all their tweets. You should be able to straightforwardly run the sample Python code from the vader github repo in your notebook.
  7. Produce a short video (of up to 3 minutes in length) where you present a code walk through. You can use Zoom for recording the video. Please make sure that the speaker is visible in the video. 

What to Submit

You should submit the following in a single .zip file:

  1. The original tweets from Kevin Rudd and Scott Morrison that you used as a starting point. 
  2. A Jupyter notebook with the code for producing all the results.
  3. A short video in mp4 format (no longer than 3 minutes in length). 

Note that if you copy code from a website, you should include the source URL in a comment.

Assessment Criteria

The assignment is worth 15 marks and consists of the 7 above-mentioned tasks. 

For each of the first six tasks, marks will be awarded for the output and for the quality of code (the code does what it should do; follows a consistent style, and is easy to understand).  For the video, 1 mark will be awarded for the content and 1 mark for the overall presentation.    

  1. Task: 1 marks
  2. Task: 3 marks
  3. Task: 2 marks
  4. Task: 2 marks
  5. Task: 3 marks
  6. Task: 2 marks
  7. Task: 2 marks

Read more