I have a json file of timestamped data points and need a histogram showing the number of data points per unit of time. The data is in the following format:
database = {
"data": [
{
"timestamp": "Mon Aug 01 00:00:01 +0000 1901",
"user": 796327373691985921,
"text": "blah blah there were no tweets in 1901!?!",
"polarity": 0.2,
"subjectivity": 0.2
},
{
"timestamp": "Mon Aug 01 00:00:10 +0000 1901",
"user": 16548385,
"text": "blah blah blah"
"polarity": 0.0,
"subjectivity": 0.0
}
]
}
etc
I am having trouble picking the timestamp item out of the dictionary. For instance, when I run this: print(database["data"][0]["timestamp"], it gives me the timestamp for one data point but how do I organize all the tweets into time buckets based on the timestamps? I suspect an iterating loop is required but I don't know how to proceed. Thank you again!