from util.dependencies import *
from cerebralcortex.algorithms.gps.clustering import cluster_gps
from cerebralcortex.kernel import Kernel

"""
Explanation: Import required libs
End of explanation
"""


CC = Kernel("/home/jovyan/cc_conf/", study_name="default")

"""
Explanation: Create CC object to setup required parameters
Please enable mprov param in '/cc_conf/cerebralcortex.yml'. mprov: pennprov. You would need to create a user on mprov server first and set the username and password in the '/cc_conf/cerebralcortex.yml'.
End of explanation
"""


ds_gps = gen_location_datastream(user_id="bfb2ca0c-e19c-3956-9db2-5459ccadd40c", stream_name="gps--org.md2k.phonesensor--phone")

"""
Explanation: Generate synthetic GPS data
End of explanation
"""


windowed_gps_ds=ds_gps.window(windowDuration=60)
gps_clusters=cluster_gps(windowed_gps_ds)

"""
Explanation: Create windows into 60 seconds chunks
End of explanation
"""


gps_clusters.show(10)

"""
Explanation: Print Data
End of explanation
"""


