1. SUMMARY:
We have builttwoservices:
1) The firstservice pullsdatafora specifickeywordfromTwitterusingTwitter'sRESTAPIs(Search).
These tweetsare thenanalyzedforsentimentsusingthe sentimentanalyzer.Thereafterthe resultof
the analysis isstoredina database.
2) The secondservice providesaREST interface thatallowsuserstoquerythe analyzeddata. This
service givesaggregatedvalue of respectivesentiments. A Twitterapplicationwascreatedtogetthe
ConsumerKey,ConsumerSecret,AccessTokenandAccessTokenSecretfromthe site apps.twitter.com.
A particularnumberof tweetswere extractedandstoredinSqlite3database.The tweetswere collected
throughthe Twitterwebsite byusingthe individual Consumerkey,ConsumerSecret (APISecret).
REFERENCES:
To acknowledge use of the conceptsandlogicsinthisproject,please gothroughthe followingwebsites:
1) http://stackoverflow.com/questions/24214189/how-can-i-get-tweets-older-than-a-week-using-
tweepy-or-other-python-libraries
2) http://stackoverflow.com/questions/15628535/how-can-i-retrieve-all-tweets-and-attributes-for-a-
given-user-using-python
3) http://stackoverflow.com/questions/31164610/connect-to-sqlite3-server-using-pyodbc-python
4) https://dev.twitter.com/rest/public/search
5) http://stackoverflow.com/questions/14209868/how-to-work-with-sqlite3-and-python
6) textblob.readthedocs.org/en/dev/quickstart.html
7) https://impythonist.wordpress.com/2015/07/12/build-an-api-under-30-lines-of-code-with-python-
and-flask/
8) http://textblob.readthedocs.org/en/dev/quickstart.html
FURTHER INFORMATIONABOUT THE PROJECT:
The Mini Projectisa projectbasedon TwitterData AnalysiswhichinvolvesExtractingTwitterdatabased
on the "Keyword"the userwants,StoringTwitterDataandanalyzingthe TwitterData.
The projectis completedbySumitSumanandManishPujapanda.
The technologiesusedinthisprojectare Pythonforcode executionandSqlite3forstoringtweets.
2. DETAILED DESCRIPTIONS OFDATA-FILES:
Here are brief descriptionsof the data.
1) Project_Twitter.py
The tweetsare fetchedbasedona particularkeyword,andthe database iscreatedto store the tweets.
SentimentAnalysisisdone onthe retrievedtweets.
Informationaddedintothe table:
1. Serial Number
2. Tweetscreatedat (Time atwhichthe tweetwascreated)
3. Descriptionof the tweet
4. Sentiment
5. Polarity
Thenthe table isprinted.
2) Sentiment_Analyser.py
The tweetsare analyzedforpositive,negative andneutral tweets.
3) Application.py
The URL structure is giventoweb.pyandthena classis createdto getthe functionforqueryand setthe
sqlite3database connection.Afterthisaqueryiswrittentofetchall the data from the table andthe
lengthof the numberof rows isreturned.Thereafterwe write aquerytofetchthe numberof all the
positive andnegativesentimentsandprintitalongwithtakingoutthe aggregate.