Created
December 20, 2017 04:46
-
-
Save JialunC/8821a87d843d923c11c56fcfec8b79b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request | |
import numpy as np | |
import time | |
import json | |
todaysdate = time.strftime("%Y-%m-%d-%H-%M") | |
lat_list = list(np.arange(43.639613, 43.726960, 0.01)) | |
lng_list = list(np.arange(-79.343137, -79.458181, -0.01)) | |
data = dict() | |
for lat in lat_list: | |
for lng in lng_list: | |
temp = request.find_bikes(lat,lng) | |
data.update(temp) | |
time.sleep(3) | |
with open(f'./{todaysdate}.json', 'w') as outfile: | |
json.dump(data, outfile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment