def search(input): x = TwitterSearch().search(input) return x
import json locations = [(40.787764, -73.962949, 'new_york'), # new york (37.798926, -122.414257, 'san_fran'), # san fran (34.034023, -118.242361, 'LA'), # LA (43.696059, -79.413813, 'toronto') # Toronto ] # locations = [(40.787764, -73.962949, 'new_york')] # new york key_words = ["flu", "asthma", "allergy"] # key_words = ["flu"] twitter_connection = TwitterSearch() NUM_RESULTS = 5000 RADIUS = 10 log = open("mining.log", "a+") log = csv.writer(log) for word in key_words: for location in locations: latitude = location[0] longitude = location[1] city = location[2] search_word = word