<commit_before>var Twit = require('twit');
var http = require('http');
var request = require('request');
var cities = require('./libs/cityReference.json');
var _ = require('underscore');

// api.openhealthinspection.com/vendors?lat=36&lng=-76&dist=200

var selectedCity = cities[_.random(0, cities.length)];

console.log(selectedCity);

var api = 'http://api.openhealthinspection.com/vendors';
var url = api + '?lat=' + selectedCity.center.latitude +
                '&lng=' + selectedCity.center.longitude +
                '&dist=1500';
console.log(url);

var T = new Twit({
	consumer_key: 'LGQ1D4UMadd5kEgozln4fqDBm',
  consumer_secret: '<KEY>',
  access_token: '<KEY>',
  access_token_secret: '<KEY>'
});


// http.get(url, function(res){
//   console.log('got response', res.statusCode);
// }).on('error', function(e) {
//   console.log('got error: ' + e.message);
// });

request({
  url: url,
  json: false
}, function (err, res, body) {
  console.log("error: " + err);
  console.log("response: " + res.statusCode);
  console.log("body: " + body);
});<commit_msg>turns out it was a server problem.<commit_after>var Twit = require('twit');
var http = require('http');
var request = require('request');
var cities = require('./libs/cityReference.json');
var _ = require('underscore');

var selectedCity = cities[_.random(0, cities.length)];

console.log(selectedCity);

var api = 'http://api.openhealthinspection.com/vendors';
var url = api + '?lat=' + selectedCity.center.latitude +
                '&lng=' + selectedCity.center.longitude +
                '&dist=1500';
console.log(url);

var T = new Twit({
	consumer_key: 'LGQ1D4UMadd5kEgozln4fqDBm',
  consumer_secret: '<KEY>',
  access_token: '<KEY>',
  access_token_secret: '<KEY>'
});

request.get(url, function (err, res, body) {
  console.log("error: " + err);
  console.log("response: " + res.statusCode);
  console.log("body: " + body);
});
{'fraction_non_alphanumeric': 0.19045120671563484, 'fraction_numerical': 0.013116474291710388, 'mean_word_length': 4.239010989010989, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3443589', 'n_tokens_mistral': 681, 'n_tokens_neox': 659, 'n_words': 129}