kaustav202 / RealTime-TwitterDataAnalysis

Collect and process real time twitter data plotting various metrics like volume , proportion, sentiment. Analyze tweet node networks and map them geographically.
29 stars 15 forks source link

Fixing the sentimental analysis part #22

Closed segfal closed 2 years ago

segfal commented 2 years ago

A similar PR may already be submitted! Please search among the Pull request before creating one.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

For more information, see the CONTRIBUTING guide.

The Sentimental Analysis part has been simplified. It would fix the few errors that were popping up.

Graphs

https://i.imgur.com/XQavA8e.png

Explain the motivation for making this change. What existing problem does the pull request solve?

Test plan (required)

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Code formatting

Closing issues

Fixes issue #15

kaustav202 commented 2 years ago

Also clean up the code.. redundant newlines, comments etc

segfal commented 2 years ago

@kaustav202 Just did the change, I restored the code from main.py and cleaned up sentimental_analysis.py

segfal commented 2 years ago

I just did a few fixes, i called sentiment from sentiment_analysis.py and added sentiment.graph() to the bottom

kaustav202 commented 2 years ago

The main is computing meta metrics on the bulk so we are interested in only count/volume here not sentiments. The two plots are computing 1. total counts of keywords over an interval and 2. average counts of keyword in a particular interval , additionally we are printing the proportion of tweets containing each keyword in lines 33 and 36.

That was about the main files' working. I hope it is clear to you @segfal

kaustav202 commented 2 years ago

@segfal are you working on it or shall I add a commit myself?

segfal commented 2 years ago

@kaustav202 Ill work on it right now, just to confirm. I will remove the changes from main.py and leave it back to what it originally was?

kaustav202 commented 2 years ago

@kaustav202 Ill work on it right now, just to confirm. I will remove the changes from main.py and leave it back to what it originally was?

Yes that's right..

segfal commented 2 years ago

@kaustav202 Ill work on it right now, just to confirm. I will remove the changes from main.py and leave it back to what it originally was?

Yes that's right..

So i just put main.py back to its original form, the only thing i added was instansiate the sentiment inside main, and for the check word function, it will be called from the class instead of creating a whole new function.

kaustav202 commented 2 years ago

great work and congratulations @segfal