GithubHelp home page GithubHelp logo

fasem75 / sentiment-analysis-of-stocks-with-live-twitter-data Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nishantthakurr/sentiment-analysis-of-stocks-with-live-twitter-data

0.0 0.0 0.0 94 KB

The task was to fetch current 10 stocks which have gained highest and lost highest Webscraping was done on moneycontrol website. 2)Using web scraping top 10 gainers and losers were fetched 3)Using a twitter api,tweets refering to these stocks were fetched and sentimental analysis was done using textblob library. 4)Various graphs were plotted to

Jupyter Notebook 100.00%

sentiment-analysis-of-stocks-with-live-twitter-data's Introduction

Sentiment analysis of Stocks with live twitter data

The task was to fetch current 10 stocks which have gained highest and lost highest Webscraping was done on moneycontrol website.

2)Using web scraping top 10 gainers and losers were fetched

3)Using a twitter api,tweets refering to these stocks were fetched and sentimental analysis was done using textblob library.

4)Various graphs were plotted to analyse the proportion of positive and negative tweets.

Hi, I'm Nishant Thakur! ๐Ÿ‘‹

I am a engineer by qualification who is highly curious about numbers and data.I have a warm enthusiasm for converting data to some useful insights and models.

Roadmap

1)Web Scraping

Top 10 gainers and losers from Bombay Stock Market was fetched with the help of python libraries such as 'requests' and 'Beautiful Soup'.

The sites that were used for web scraping were https://www.moneycontrol.com/stocks/marketstats/bseloser/index.php and https://www.moneycontrol.com/stocks/marketstats/bsegainer/index.php

2)Creating a class Twitter with a constructor and several methods inside it such as get_tweets which is used to fetch and parse tweets,preprocessing which is used to clean tweets and get_tweet_sentiment which is used to get sentiment of the tweets using a textblob library which uses a lexicon based approach.

3)Creating a function sentimentalanalysis which return positive tweets percentage,negative tweets percentage an neutral tweets percentage for a particular stock.

4)Creating separate dictionaries to store the top ten company names along with their positive and negative tweet percentage.

5)Creating several bar plots for further analysis.

Screenshots

sentimentanalysis1 Semanticanalysis2

Improvements

There are many Improvements that can be done to fetch better results.

They are:

1)Facebook,Instagram and social media sentiments can also be fetched.

2)News headlines can also be fetched.

3)Instead of using textblob many machine learning models can also be used for a better classification of positive and negative tweets.

Disclaimer

Various tokens such as customer_key,acess_token has been hidden for security. If you wish to run these code by yourself please log in to twitter develepor account and generate these tokens.

sentiment-analysis-of-stocks-with-live-twitter-data's People

Contributors

nishantthakurr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.