SlideShare a Scribd company logo
Australia & New Zealand
Detecting and Visualizing
COVID-19 Pandemic Public
Sentiment using AWS
Comprehend and QuickSight
Vivek Raja P S | 2020
A big salute to all COVID-19
Front-line workers
COVID-19, Lockdown & Psychology
Orchestration of AWS Services
Data Collection
Setting up the environment
Extracting Sentiment
Visualizing the results
Q&A
Agenda of the talk
COVID-19, Lockdown &
Psychology
COVID-19
Coronavirus disease (COVID-19) is an infectious disease caused by a newly
discovered coronavirus.
Most people infected with the COVID-19 virus will experience mild to moderate
respiratory illness and recover without requiring special treatment. Older
people, and those with underlying medical problems like cardiovascular
disease, diabetes, chronic respiratory disease, and cancer are more likely to
develop serious illness.
Source: WHO
Lockdown & Quarantine
Taking India as my case-study, we are going to see the measures taken by the
government
First COVID-19
Positive Recorded
Jan 31
Mar 25
Lockdown 1.0
Apr 15
May 04
May 18
Jun 01
Jul 01
Lockdown 2.0
Lockdown 3.0
Lockdown 4.0
Unlock 1.0
Unlock 2.0
Jan 01 2020 Present
Psychology during Lockdown
Impact of COVID-19
Orchestration of AWS Services
Solution Workflow
Data Collection
Tools
Data Source Data Collection Tool Data Preprocessing Tool
Twitter GetOldTweets3 Library Numpy, Pandas,
JSON library
Tweet Collection Criterias
1. Language : English
2. Cities
3. Date Ranges
4. Keywords
Tweet Collection Criteria - Cities
Six Major Cities
New Delhi
Mumbai
Kolkata
Hyderabad
Bengaluru
Chennai
Tweet Collection Criteria - Cities
100km Radius per each city
Tweet Collection Criteria- Date Ranges
Tweet Collection Criteria- Keywords
15
Top Trending Keywords/ Hashtags
Setting up the environment
Create AWS Account
Create a new AWS Account if
you don’t have
*Note: Keep an eye on incurring additional costs
Create IAM Role
Create an IAM Role with the following roles attached
S3 Bucket
Set up the two Storage tools
DynamoDB Table
Set “text” as partition key
Extracting Sentiment
Lambda Function Setup
The lambda function must be
triggered whenever there is a
new object created in S3 bucket.
The data is sent to AWS
Comprehend to extract the
sentiment.
The results are updated in
DynamoDB table
Lambda Function
Runtime: Python 3.8
Import necessary libraries and initialize
AWS Comprehend and DynamoDB
Detecting and Visualizing Twitter Sentiment during COVID-19 Pandemic using AWS Comprehend and Quicksight
Lambda Function
Define the Lambda function where the
event is the S3 object creation trigger
The lambda function takes the S3 object
that was created as event param
Detecting and Visualizing Twitter Sentiment during COVID-19 Pandemic using AWS Comprehend and Quicksight
Lambda Function
For every record of the S3 object, the sentiment is extracted from
AWS Comprehend and the result is updated in DynamoDB
Detecting and Visualizing Twitter Sentiment during COVID-19 Pandemic using AWS Comprehend and Quicksight
Visualizing the Sentiment
Export the DynamoDB data
Configure your AWS CLI and then execute the following command to export the
Dynamo DB. Replace the table name as per your config.
$ aws dynamodb scan — table-name covidsentiment — select
ALL_ATTRIBUTES — page-size 500 — max-items 100000 — output json |
jq -r “.Items” | jq -r “(.[0] | keys_unsorted) as $keys | $keys, map([.[
$keys[] ].S])[] | @csv” > table.csv
Upload the data to AWS QuickSight
Navigate to AWS QuickSight. Under the Analysis tab, click New Analysis ->
New Dataset -> Upload a file. Click and upload the exported DynamoDB data
CSV file.
Visualize the data using AWS QuickSight
Visualize the data using AWS QuickSight
Future Enhancement
How this can be enhanced?
1. You can use AWS Firehose to stream real-time data from Twitter to S3.
2. You can build a data pipeline between DynamoDB / or any other DB to
Quicksight Data source.
3. Host the dashboard as a web app using Elastic Beanstalk
Resources
How this can be enhanced?
COVID-19 Twitter Dataset:
https://github.com/Vivek0712/covidtwitterdataset
Step by step tutorial blog: https://vivekraja98.medium.com/detecting-and-
visualizing-twitter-sentiment-during-covid-19-pandemic-using-aws-
Let’s flatten the curve
Open for Q&A
Vivek Raja P S
/vivek0712
/Vivek0712
@Vivekraja007

More Related Content

PDF
Differences between get children() and getdescendants() methods
PDF
Multipleregression covidmobility and Covid-19 policy recommendation
PDF
COVID-19-Data-Analysis-using-Python.pdf.
PPTX
Covid 19 monitor
PDF
Big Data and AI for Covid-19
PDF
Big Data and AI in Fighting Against COVID-19
PDF
Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for be...
PDF
Mortal analytics - Covid-19 and the problem of data quality
Differences between get children() and getdescendants() methods
Multipleregression covidmobility and Covid-19 policy recommendation
COVID-19-Data-Analysis-using-Python.pdf.
Covid 19 monitor
Big Data and AI for Covid-19
Big Data and AI in Fighting Against COVID-19
Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for be...
Mortal analytics - Covid-19 and the problem of data quality

Similar to Detecting and Visualizing Twitter Sentiment during COVID-19 Pandemic using AWS Comprehend and Quicksight (11)

PPTX
Forecasting covid 19 by states with mobility data
PDF
Poster presentation in 3rd big data conclave at vit chennai on 20th april 2017
PPTX
Innovative project1
PDF
Together in Covid-19 - Health of India - CCDays talk - Aditya
PDF
Twitter Based Sentimental Analysis of Impact of COVID-19 on Economy using Naï...
PDF
Tech for Good: Using Map-Based Apps to Connect Us During a Pandemic
PDF
Thai COVID-19 patient clustering for monitoring and prevention: data mining t...
PDF
Proposed requirements of the management dashboard at the national level
PDF
COVID Sentiment Analysis of Social Media Data Using Enhanced Stacked Ensemble
PPTX
Project presentation sowjanya_132
PDF
Spotle AI-thon Top 10 Showcase - Analysing Mental Health Of India - Team Jar...
Forecasting covid 19 by states with mobility data
Poster presentation in 3rd big data conclave at vit chennai on 20th april 2017
Innovative project1
Together in Covid-19 - Health of India - CCDays talk - Aditya
Twitter Based Sentimental Analysis of Impact of COVID-19 on Economy using Naï...
Tech for Good: Using Map-Based Apps to Connect Us During a Pandemic
Thai COVID-19 patient clustering for monitoring and prevention: data mining t...
Proposed requirements of the management dashboard at the national level
COVID Sentiment Analysis of Social Media Data Using Enhanced Stacked Ensemble
Project presentation sowjanya_132
Spotle AI-thon Top 10 Showcase - Analysing Mental Health Of India - Team Jar...
Ad

More from Vivek Raja P S (8)

PPTX
Model Drift Monitoring using Tensorflow Model Analysis
PPTX
Literature Text Translation & Audio Synthesis using Microsoft Azure Cognitive...
PPTX
Getting Started with Containers
PPTX
Getting Started with Azure AutoML
PPTX
Tensorflow Ecosystem
PPTX
Strategies and Roadmap to win any Hackathon
PPTX
AI/ ML solutions to tackle COVID-19
PPTX
Aws autopilot
Model Drift Monitoring using Tensorflow Model Analysis
Literature Text Translation & Audio Synthesis using Microsoft Azure Cognitive...
Getting Started with Containers
Getting Started with Azure AutoML
Tensorflow Ecosystem
Strategies and Roadmap to win any Hackathon
AI/ ML solutions to tackle COVID-19
Aws autopilot
Ad

Recently uploaded (20)

DOCX
ch 9 botes for OB aka Pregnant women eww
PPTX
Nancy Caroline Emergency Paramedic Chapter 17
PDF
health promotion and maintenance of elderly
PPTX
Understanding The Self : 1Sexual health
PDF
Back node with known primary managementt
PPTX
guidance--unit 1 semester-5 bsc nursing.
PPTX
Nancy Caroline Emergency Paramedic Chapter 16
PPTX
unit1-introduction of nursing education..
PPTX
Nepal health service act.pptx by Sunil Sharma
PPTX
Obstetric management in women with epilepsy.pptx
PPTX
Nancy Caroline Emergency Paramedic Chapter 13
PPTX
Newer Technologies in medical field.pptx
PDF
cerebral aneurysm.. neurosurgery , anaesthesia
PPTX
Public Health. Disasater mgt group 1.pptx
PPTX
Fever and skin rash - Approach.pptxBy Dr Gururaja R , Paediatrician. An usef...
PDF
01. Histology New Classification of histo is clear calssification
PPTX
Nancy Caroline Emergency Paramedic Chapter 14
PPTX
OSTEOMYELITIS and OSTEORADIONECROSIS.pptx
PPTX
Nancy Caroline Emergency Paramedic Chapter 18
PPTX
Acute renal failure.pptx for BNs 2nd year
ch 9 botes for OB aka Pregnant women eww
Nancy Caroline Emergency Paramedic Chapter 17
health promotion and maintenance of elderly
Understanding The Self : 1Sexual health
Back node with known primary managementt
guidance--unit 1 semester-5 bsc nursing.
Nancy Caroline Emergency Paramedic Chapter 16
unit1-introduction of nursing education..
Nepal health service act.pptx by Sunil Sharma
Obstetric management in women with epilepsy.pptx
Nancy Caroline Emergency Paramedic Chapter 13
Newer Technologies in medical field.pptx
cerebral aneurysm.. neurosurgery , anaesthesia
Public Health. Disasater mgt group 1.pptx
Fever and skin rash - Approach.pptxBy Dr Gururaja R , Paediatrician. An usef...
01. Histology New Classification of histo is clear calssification
Nancy Caroline Emergency Paramedic Chapter 14
OSTEOMYELITIS and OSTEORADIONECROSIS.pptx
Nancy Caroline Emergency Paramedic Chapter 18
Acute renal failure.pptx for BNs 2nd year

Detecting and Visualizing Twitter Sentiment during COVID-19 Pandemic using AWS Comprehend and Quicksight