Permalink
Browse files

Switch the list of locations to match python-data

  • Loading branch information...
1 parent d4bd90a commit 9c495f5399d48b31a1ea0b35cf81c1609f27531d @csev committed Dec 11, 2016
Showing with 1,010 additions and 377 deletions.
  1. +6 −2 code/geodata/geoload.py
  2. +282 −183 code/geodata/where.data
  3. +197 −6 code/geodata/where.js
  4. +7 −2 code3/geodata/geoload.py
  5. +282 −183 code3/geodata/where.data
  6. +236 −1 code3/geodata/where.js
@@ -25,7 +25,9 @@
fh = open("where.data")
count = 0
for line in fh:
- if count > 200 : break
+ if count > 200 :
+ print 'Retrieved 200 locations, restart to retrieve more'
+ break
address = line.strip()
print ''
cur.execute("SELECT geodata FROM Locations WHERE address= ?", (buffer(address), ))
@@ -58,6 +60,8 @@
cur.execute('''INSERT INTO Locations (address, geodata)
VALUES ( ?, ? )''', ( buffer(address),buffer(data) ) )
conn.commit()
- time.sleep(1)
+ if count % 10 == 0 :
+ print('Pausing for a bit...')
+ time.sleep(5)
print "Run geodump.py to read the data from the database so you can visualize it on a map."
Oops, something went wrong.

0 comments on commit 9c495f5

Please sign in to comment.