Commit cec56971 authored by Alexander's avatar Alexander

added rfc for automatic clustering based on agi data

parent 96eceb9e
...@@ -142,6 +142,17 @@ paths: ...@@ -142,6 +142,17 @@ paths:
description: "Successful operation" description: "Successful operation"
schema: schema:
$ref: "#/definitions/UserClusterGraphCollection" $ref: "#/definitions/UserClusterGraphCollection"
/rfc/run:
post:
operationId: "rest.functions.run_agi_clustering_and_graph_creation"
tags:
- "Remote function calls"
summary: "Insert locations from AGI, create clusters for starting time and location layers, create graphs for the location clusters"
parameters: []
responses:
204:
description: "Successful operation"
definitions: definitions:
Location: Location:
......
...@@ -6,9 +6,12 @@ if os.path.exists(modules_path): ...@@ -6,9 +6,12 @@ if os.path.exists(modules_path):
from db.repository import Repository from db.repository import Repository
if __name__ == "__main__": def insert_locations():
repo = Repository() repo = Repository()
locs = repo.get_agi_locations() locs = repo.get_agi_locations()
for l in locs: for l in locs:
repo.add_location(l) repo.add_location(l)
if __name__ == "__main__":
insert_locations()
import insert_agi_locations
import run_clustering
import create_user_graphs
def run_agi_clustering_and_graph_creation():
insert_agi_locations.insert_locations()
run_clustering.run_location_clustering()
run_clustering.run_time_clustering()
create_user_graphs.create_graphs_for_location_clusters()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment