예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)