Skip to content

turkeruzun/twitter-data-analysis-nlp

Repository files navigation

Analyze Tweets Sentiment Using NLP

Generic badge Generic badge

GitHub repo size GitHub code size in bytesGitHub top language

Made with Python

SUMMARY

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

Installation Packages

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
...

Load Packages

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

Check Data

STEMMING WORDS + NGRAMS

WORDCLOUD

SENTIMENT ANALYZE

LDA MODEL - FIND TOPICS

HASHTAG SENTIMENT ANALYZE

EMOJIES SENTIMENT ANALYZE

Contributing

GitHub issues GitHub pull requests

  • Clone this repository:
git clone https://github.com/turkeruzun/twitter-data-analysis-nlp.git

Need help?

LinkedIn WP

License

© turkeruzun

GitHub forks GitHub stars GitHub followers