I think you forgot to add that you actually need a twitter developer account with elevated access or else extracting tweets wont be possible Great Video
The best Sentiment analysis tutorial. Everything that I have seen either too simple or does not work. Even people who has written books do not explain as well as this tutorial.
What an amazing tutorial. You are a great teacher. I usually (to my own detriment) speed up the videos but yours was engaging from the get go. I will be coming back to this video when I work on my own sentiment analysis project. Subscribed!
@@kanizfatma1128 I was able to get it to work with a 1 column file. The word "key" on the first line with a comma and then each of the api keys on its own line followed by a comma.
@41:06 that's because sortedDF['Polarity'][i] is still calling df's indexes not the iloc. add a reset_index should correct it. Great video btw, learnt a lot. sortedDF = df.sort_values(by=['Polarity']) sortedDF = sortedDF.reset_index(drop=True)
Mate! Very well done! I had a chartered course and did almost the same two years ago, If you had it back then, you would be my life saver! :-) You solved it really, really cool and thank you very much for this video! Cheers!
An amazing contribution, very straightforward. I'll just say thank you in my native language: Muchas gracias colega, me encanto tu forma de explicar, todo muy organizado, simple y chevere.
Hi, great tutorial. Could you clarify how to put the login information for the Twitter App into a CSV file? The link you have in the description is dead.
consumerKey = 'xxxxxxxxxxxxx' consumerSecret = 'xxxxxxxxxxxxxxxxxxxxx' accessToken = 'xxxxxxxxxxxxxxxxx' accessTokenSecret = 'xxxxxxxxxxxxxxxxxxxxxxxx' You can use the format above to substitute the login.csv. (Sorry that I can't share my API)
please upload more videos on NLP full project in which all steps included like tokenization, removal of stop words, stemming/lemmatization, POs Tags, named entity Recognition, chunking, and all
I found a way around the issue i had with the login csv and just skipped that part and it still works, but anyway, GREAT STUFF. This is sososososososososoosos helpful!
Very informative and commendable efforts. Can you please a video on developing Twitter Sentiment Analysis Model using Deep Learning algorithm in python?
Very interesting when he analyzes the word cloud, considering this was on February 3rd, 2020. "Work, new, world, health, foundation... I think these are all positive words... not sure about disease..."
Got the solution! Which is as follow: #twitter_api_credentials consumerKey = "your_consumerkey" Consumer Secret= "your_consumer Secret" Do this for access token& access token secret Explaination= Don't go for the keys to be accessed by file follow the above steps instead by writing your keys to the variable itself as values it will work.
I was able to get it to work with a 1 column file. The word "key" on the first line with a comma and then each of the api keys on its own line followed by a comma.
@@arl2001 I was able to get it to work with a 1 column file. The word "key" on the first line with a comma and then each of the api keys on its own line followed by a comma.
Thanks you for this tutorial, but I've a question, when I try to analyse a Twitter Account witch use Spanish as their primary language, doesn't appear anything of the getAnalysis(), ¿What I need to do to solve this problem?, Thanks.
Nice video! Just have a question at 36:00 - when we were creating the dfSortedValues, I believe we should use "ascending = False" so the most positive tweets are at the top. Because by deafault ascending is set to True and since Polarity has negative values, the top values will be the most negative. Also, I don't know if it was me the one who fucked it up, but the way we tried to print tweets based on the highest polarity didn't work as intended for me.. (again I can be dyslexic) I did the following: j = 1 sortedDF = df.sort_values(by=['Polarity'], ascending=False) for x in sortedDF.index: if(sortedDF['Analysis'][x] == "Positive"): print(f"{j}) {sortedDF['Tweets'][x]} | {sortedDF['Polarity'][x]}") print() j = j + 1
Hi , incredible video, very interesting. I only have some issues with the structure of login.csv file. Could explain better the internal structure thanks.!
Hi, good tutorial but I have a problem. How do I put the api keys in the csv file? I already have my own keys but how do I use them? in the tutorial I think that is the only thing I did not understand (I am beginner in this) I hope you can help me please :) Thanks and regards.
I was able to get it to work with a 1 column file. The word "key" on the first line with a comma and then each of the api keys on its own line followed by a comma.
@@ComputerSciencecompsci112358 hey can you please provide that csv? Or mail me? I tried creating Twitter developer account but then there's some error in keys.
You don’t have to create such file im order to log in to twitter API. Normally you should paste the data as string (just paste them as a parameter of a function inside a quotation marks).
for those who are having an issue regarding the csv file get all the four keys from twitter make an excel table with column name as key and place each key in order as per your convinience save the file in .csv format
Great video! Can I ask you how can I perform a Sentiment Analysis on a certain topic for a specific account? For instance, I want to know how positive Bill Gates is about vaccination. Thank you in advance!
hi , the code line : tweets = twitterApi.user_timeline(screen_name="BillGates", count=50 , lang="en", tweet_mode="extended") is giving me TweepError - 453 (says i need Elevated Access). Any suggestions fort this ? I tried checking in Twitter Developer account . Could not find way to access this.
say I delete all the duplicate colums and then I want to plot them, it gives an error. what code do I have to type to make it work. eg my data after deleting goes like 1,3,5,10,25, etc (this is the serial number) and if I want to make it 1,2,3,4,5 what do I need to type
@@ComputerSciencecompsci112358 would you please make a video on how can I scrape tweets for a particular keyword?like for example I want to collect all the tweets that talk about a particular company , would be really helpful
Hi It was great to learn from you. Here I tried the same code in user friendly way, to find tweets by using hashtags or keywords. My problem is that the tweets are not coming in my dataframe when creating it. please help. #Import the libraries import tweepy from textblob import TextBlob import pandas as pd import re import matplotlib.pyplot as plt plt.style.use('fivethirtyeight') # Twitter Api Credentials Consumer_Key = "xxxxxxxxxxxxxxxxxxx" Consumer_Secret_Key = "xxxxxxxxxxxxxxxxxxx" Access_Token = "xxxxxxxxxxxxxxxxx" Access_Token_Secret = "xxxxxxxxxxxxxxxx" #Authenticating Keys auth = tweepy.OAuthHandler(Consumer_Key,Consumer_Secret_Key) auth.set_access_token(Access_Token,Access_Token_Secret) api = tweepy.API(auth) # Taking Inputs # Searching For tweets and removing retweets and username and restricting to english language searchTerm = input("Enter Keyword/Hashtag to search about: ") noofsearchTerms = int(input("Enter how many tweets to analyze: ")) tweets = tweepy.Cursor(api.search, q=searchTerm, lang ="en", tweet_mode='extended').items(noofsearchTerms) # Giving serial numbers to tweets i=1 for tweet in tweets: print(str(i) + ")" + tweet.full_text + ' ' ) i=i+1 # Create a dataframe with a column called Tweets df = pd.DataFrame(data =[tweet.full_text for tweet in tweets], columns = ["Posts"]) #Show the first 10 rows of data df.head()
Hi It was great to learn from you. Here I tried the same code in user friendly way, to find tweets by using hashtags or keywords. My problem is that the tweets are not coming in my dataframe when creating it. please help. #Import the libraries import tweepy from textblob import TextBlob import pandas as pd import re import matplotlib.pyplot as plt plt.style.use('fivethirtyeight') # Twitter Api Credentials Consumer_Key = "xxxxxxxxxxxxxxxxxxx" Consumer_Secret_Key = "xxxxxxxxxxxxxxxxxxx" Access_Token = "xxxxxxxxxxxxxxxxx" Access_Token_Secret = "xxxxxxxxxxxxxxxx" #Authenticating Keys auth = tweepy.OAuthHandler(Consumer_Key,Consumer_Secret_Key) auth.set_access_token(Access_Token,Access_Token_Secret) api = tweepy.API(auth) # Taking Inputs # Searching For tweets and removing retweets and username and restricting to english language searchTerm = input("Enter Keyword/Hashtag to search about: ") noofsearchTerms = int(input("Enter how many tweets to analyze: ")) tweets = tweepy.Cursor(api.search, q=searchTerm, lang ="en", tweet_mode='extended').items(noofsearchTerms) # Giving serial numbers to tweets i=1 for tweet in tweets: print(str(i) + ")" + tweet.full_text + ' ' ) i=i+1 # Create a dataframe with a column called Tweets df = pd.DataFrame(data =[tweet.full_text for tweet in tweets], columns = ["Posts"]) #Show the first 10 rows of data df.head()
explained great....still have 1 problem...if a person is tweeting in more than one language, how can i collect tweets only in english? posts = api.user_timeline(screen_name = "ImranKhanPTI", count = 100, lang="en-GB", tweet_mode = 'extended') print("show 5 tweets: ") i = 1 for tweet in posts[0:10]: print(str(i) + ') ' + tweet.full_text + ' ') i = i+1 I am getting urdu and english tweets both from this code.
You are a lifesaver Thank you so much for this tutorial, I need a little assistance with the initial load data aspect, please which data am I to load, I submitted an application for the Twitter developer account.
I was able to get it to work with a 1 column file. The word "key" on the first line with a comma and then each of the api keys on its own line followed by a comma.
You need to go to developer.twitter.com login with your Twitter credentials and create a project or app and you will get the details. Your consumer key will be the API keys and access tokens need to be generated in the settings tab.
hello please I really would appreciate if I could get help with the error I keep getting an error from trying to run the clean function I keep getting unterminated character set at position 1
Bro I am getting this error : Forbidden: 403 Forbidden 453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. Can u help me? I am getting this error at cell/block no.4