Skip to content

Commit

Permalink
Loading 5 years of sunset data
Browse files Browse the repository at this point in the history
  • Loading branch information
ymollard committed May 28, 2018
1 parent a220e4a commit a97a72e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
4 changes: 1 addition & 3 deletions arbalet/frontage/data/bordeaux.sun

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions arbalet/frontage/data/get_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@

d = datetime.datetime.now()
t = {}
for i in range(0, 365):
res = requests.get(url+'&date='+d.isoformat())
t[d.isoformat()] = res.json()['results']
print(res.json())
d = d + datetime.timedelta(days=1)
time.sleep(0.005)
for y in range(5):
for i in range(0, 365):
res = requests.get(url+'&date='+d.isoformat())
t[d.isoformat()] = res.json()['results']
print(res.json())
d = d + datetime.timedelta(days=1)
time.sleep(0.005)

print('---------------------')
print(t)
outfile.write(json.dumps(t))


0 comments on commit a97a72e

Please sign in to comment.