Hi,
I am a researcher and have been trying to use the Twitter API to get data for my undergraduate project. Ideally, I am trying to get data on a particular search term within a geographically bounded area whilst streaming for tweets, but I am struggling on the coding side as I am a geographer so have no experience. I was just wondering if there is anyone with experience of doing this before that could help me out?
This is what I have done so far (I am basically struggling on finding a way to start and stop a stream for my data samples):
console.log(‘The bot is starting’);
var Twit = require(‘twit’);
var config = require(’./config’);
var T = new Twit(config);
var params = {
q: ‘racism’,
geocode: ‘51.507,-0.128,100mi’,
count: 200
}
T.get(‘search/tweets’, params, gotData);
function gotData(err, data, response) {
console.log(data);
}
Thank you 