Moving code out of census app.  Change to using distance metrics