Closed hamemuh closed 7 years ago
Update: Can connect to mongo and manipulate date/time to get required fields, using string manipulation.
Python Code:
connection = pymongo.MongoClient() db = connection.twitter_db tweet = db.test.find_one({},{text:1, ploarity:1, subjectivity:1, created_at:1}) json.loads(tweet) l = tweet['created_at'].split(' ') # gives all datetime info in a list l[3] # can slice this to get month, day etc
Have created a program to put tweets from mongo into a dataframe. It is in the graphTest.py file.
I have used the code that Jordon shared to start ingesting tweets on my own computer at home and work on the following: