Giter Site home page Giter Site logo

tweet_analysis's Introduction

tweet_analysis

Retrieve tweets with Twint and perform some basic analysis with Pandas (plot timeline, wordcloud, generate most liked tweets, generate ngrams)

retrieve tweets

To generate a csv file with tweets from Twitter, the program uses Twint. This library permits to use certain search terms, indicate language and search period. The nice thing about Twint is that it does not require the Twitter API and it is possible to scrape relatively large amounts of tweets.

basic analysis of tweets

The csv file is used as input for a basic analysis with Pandas of the tweets. First it performs a selection of the most relevant columns as well as some cleaning of the data. The program enables to plot a timeline of the tweets, scatterplots of the retweets and likes and comments and likes, it can create a wordcloud, create a separate dataframe with the 100 most liked tweets (which is also written to a separate csv file). Finally the program produces unigrams, bigrams and trigrams.

some remarks

I am not an experienced programmer. I assembled the program using tutorials and ideas of others. There is certainly room for improvement. Suggestion and corrections are very much appreciated. For example there are two methods for cleaning of the data. This should be merged in some way. The proposed analysis are rather basic. I am looking for ways to perform more in depth sentiment analysis of the tweets. Hopefully in future iterations I will be able to update the program.

tweet_analysis's People

Contributors

ernstbas avatar

Watchers

 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.