This study, analyze on Twitter data related to eating habits in April 2020. The data aims to reveal the effect of new information affected by Covid-19 on diet-related patterns among Twitter users during the pandemic. Sentiment analysis through frequently used words and on ngrams and explores the causal link between information-led society and attitude shifts during the pandemic in cyberspace.
This coding was done in the Social Comquant 2022 Summer School adventure in collaboration with @kucuniversity @socialcomquant @gesis_org. socialcomquant
Use the package manager pip to install foobar.
pip install nltk
pip install wordcloud
pip install sklearn
pip install pandas
pip install chardet
pip install textblob
pip install gensim
pip install scipy
pip install PIL
pip install pattern
...
import pandas as pd
import numpy as np
import chardet
import re
import openpyxl
import string
import nltk
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer,WordNetLemmatizer
from pattern.text.en import spelling
from pattern.text.en import suggest
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from textblob import TextBlob
import gensim
import pyLDAvis.gensim_models
import statistics as st
from scipy.stats import stats,mode
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
from PIL import Image
import matplotlib.pyplot as plt
- Clone this repository:
git clone https://github.com/turkeruzun/twitter-data-analysis-nlp.git
-
Check out any issue from here.
-
Make changes and send Pull Request.