diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-06 18:21:16 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-06 18:21:16 +0100 |
| commit | 17e2aeb6a18a6b1c7a93de96c703330e25470c78 (patch) | |
| tree | 44e6cfd2d60ac62d8f8c646a600f70db12e6b3b7 | |
| parent | 8d05222f0f3a9da01dcceb7ec7b5d3ccf24fad64 (diff) | |
s2geo
| -rw-r--r-- | s2-geocode.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/s2-geocode.py b/s2-geocode.py index 76b6b1e2..5f1ab88d 100644 --- a/s2-geocode.py +++ b/s2-geocode.py @@ -17,8 +17,8 @@ def s2_geocode(fn): rows = read_csv(fn, keys=False) valid = read_csv('./reports/institutions_geocoded.csv', keys=False, create=True) invalid = read_csv('./reports/institutions_not_found.csv', keys=False, create=True) - valid_names = [] - invalid_names = [] + valid_names = [row[0] for row in valid] + invalid_names = [row[0] for row in invalid] random.shuffle(rows) for i, row in enumerate(rows): name = row[0] @@ -44,7 +44,7 @@ def s2_geocode(fn): print("{}...".format(i)) write_csv('./reports/institutions_geocoded.csv', keys=None, rows=valid) write_csv('./reports/institutions_not_found.csv', keys=None, rows=invalid) - time.sleep(5) + time.sleep(2) if __name__ == '__main__': s2_geocode() |
