title: Python Twitter streaming & Sentiment analysis by tweepy
body: <p>I'm beginner in python. I have a code that takes data from twitter by tweepy and print it in &quot;real time&quot;. I would like to do a sentiment analysis of tweets.
  How can I process this data to clean the text and get the subjectivity, polarity using textblob, wordcloud?</p>
  <pre><code>
  class StreamCollector(tweepy.Stream):
  
       def on_data(self, data):
          import json
  
          tweet_info = json.loads(data)
          print(tweet_info['text'])
  
  stream = StreamCollector(
      &quot;key1&quot;, &quot;key2&quot;,
      &quot;key3&quot;, &quot;key4&quot;
  )
  
  stream.filter(track=[&quot;text&quot;])
  </code></pre>