Skip to content

Instantly share code, notes, and snippets.

@phreid
phreid / data.py
Last active August 29, 2015 13:56
Migration map
import csv
import re
from pygeocoder import Geocoder
infile = open('mig_data.csv')
outfile = open('geo_data.csv','wb')
csvfile = list(csv.DictReader(infile))
fieldnames = ['origin_long', 'dest_long', 'dest_lat', 'MIGMOVE',
'Ref_Date', 'Coordinate','tempdest', 'Vector', 'Value',