This repository contains the code and report for a project aimed at making sense of discussions regarding COVID-19 on Twitter.
Follow the steps in the sections below to conduct the experiments as described in the report with your own tweet data. Alternatively, see the Generate Analytical Information section below to use the data provided.
- Create a Twitter Developer Account with elevated access.
- Populate the necessary fields from your Twitter account in
config.json
. - Execute
collect.py
(runcollect.py --help
for more information).
- Export the generated CSV file to an Excel file.
- Create two new columns at the right end of the table.
- Annotate the tweets, indicating their category (1-5) in the first new column and their sentiment in the second new column (
g
for positive,b
for negative,n
for neutral). See the report for details on the category designations and seetweets3_excel.xlsx
for an example (some tweets may be skipped while annotating).
- Replace the filename on line 20 in
annotated_tweet_handler.py
with the annotated file. - Execute
annotated_tweet_handler.py
(interactively or via command line).