def get(self, city): check_city(city) args = clustering_parser.parse_args() start_date = parse_date(args["start_date"]) window = args["window"] rset = controller.cluster_profiles(city, start_date, window) if not rset: api.abort(404, ("No K-means algorithm trained between {} and {}" "").format(start_date, start_date + window)) return jsonify(rset)
def get(self, city): check_city(city) rset = controller.cluster_profiles(city) if not rset: api.abort(404, ("No K-means algorithm trained in this city")) return jsonify(rset)