Code Monkey home page Code Monkey logo

covid-tweet-sentiment-analysis's Introduction

COVID-Tweet-Sentiment-Analysis

This repository uses the tweet data I have collected using the Twitter Premium API. The tweet data contains all the tweets from the "top 30 users" who tweeted the most about COVID in the National Capital Region of the Philippines from March 9, 2020 (1 week before lockdown) to March 22, 2020 (1 week after start of lockdown). The top 30 users were determined by obtaining the users with most tweet counts from another twitter API query--query that retrieves all tweets with COVID in the same location and time period.

See the following post on Twitter forums for the query I used (just change the date) and its nuances to collect the prerequisite data. I personally asked that question due to the discrepancy in the results.

The top users folder contains the top 30 users tweet data in JSON format. In addition, there are also scripts to parse the said file and also calculate the sentiment score of each tweet in it. To get you started, read and run the following files in order:

  1. top-user-tweets-parser.ipynb - parses the data, and saves the relevant data into CSV format
  2. top-user-sentiments.ipynb - calculates the sentiments and token-used ratio of each tweet.
  3. sentiment_analysis_via_api.py - calculates sentiments using the Google Cloud Natural Language API. Saves output in csv format.

covid-tweet-sentiment-analysis's People

Contributors

cedricbasuel avatar cyntwikip avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

cedricbasuel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.