Fully functional ML code along with code for outputing to DB for this
and the distance calculations.