A blog post about this code can be found here: https://medium.com/dataexplorations/thoughts-on-visionzero-first-steps-with-the-twitter-api-and-word2vec-for-text-analysis-e766ed6b55ab
The goal of this analysis was to use the Twitter API to retrieve tweets about #VisionZero and run basic Text Analysis on the retrieved tweets. I used- Twython -- to search for recent tweets
- NTLK TweetTokenizer -- to split the tweets up into individual words, remove stop words, punctuation etc
- sklearn CountVectorizer -- to create a matrix of all the words used and whether or not they appear in each tweet
- wordcloud -- to create a wordcloud diagram of the most commonly used words
- Gensim Word2Vec -- to analyze the similarity of the words used in the tweets
- TextBlob -- for sentiment anslysis on the tweets