def scrapeData(user):
	get_places_for_date_range(user, 2)
	get_activities_for_date_range(user, 2)
	#import ipdb; ipdb.set_trace()
	with open(ROOT+str(user['user_id'])+'/places.csv','r') as csvfile:
		csv_reader = csv.reader(csvfile)
		csv_reader.next()
		data = [[float(row[0]),float(row[1])] for row in csv_reader]

		get_poi(data, user['user_id'],user['gapi'])
	get_graph_csv(user['user_id'])
	scrapeTwitterData(user['user_id'], user['twitter'])
def init_user_with_data(user):
	time = datetime.strptime(user['firstdate'], '%Y%m%d')
	delta = (datetime.today()-time).days
	import ipdb; ipdb.set_trace()
	if delta<=14 and delta>0:
		get_places_for_date_range(user, delta)
		get_activities_for_date_range(user, delta)
	else:
		get_places_for_date_range(user, 14)
		get_activities_for_date_range(user, 14)
	with open(ROOT+str(user['user_id'])+'/places.csv','r') as csvfile:
		csv_reader = csv.reader(csvfile)
		csv_reader.next()
		data = [[float(row[0]),float(row[1])] for row in csv_reader]
			
		get_poi(data, user['user_id'], user['gapi'])
	get_graph_csv(user['user_id'])
	scrapeTwitterData(user['user_id'], user['twitter'])