def main(): mosa = csv_util.load_csv(mosa_file) commute = csv_util.load_csv(commute_file) mosa_dict = {} # biuld mosa dict for area in mosa: id = area['msoa11cd'] mosa_dict[id] = area final_commute = add_geo(commute, mosa_dict) csv_rows = csv_dict_to_row(final_commute) csv_util.save_to_csv(csv_rows[0], csv_rows[1], output_file)
def main(): all_rows = csv_util.load_csv(csv_file) result = geolocate_rows(all_rows) added = append_to_csv(all_rows, result['success']) csv_rows = dict_to_rows(added) csv_util.save_to_csv(csv_rows[0], csv_rows[1], out_file)
def main(): geojson = json_util.load_json(geojson_in) item_meta = csv_util.load_csv(csv_file) item_dict = {} for c in item_meta: key = csv_key(c) item_dict[key] = c matched = append_to_json(geojson, item_dict) json_util.save_to_json(matched, geojson_out)
def main(): all_rows = csv_util.load_csv(input_file) request_data(all_rows)
def main(): mosas = csv_util.load_csv(mosa_file) get_mosa_data(mosas)