cellyzer/visualization.py
def trip_visualization(locations, map_name="trip_map", notebook=False):
    """
    Visualize the trips/routes of a given user in a map
    :param locations: Locations visited by the user (sorted in timestamp)
    :param map_name: name of the map to be displayed
    :param notebook: set true if runs in notebook
    :return: shows a map of routes of the user
    """
    if not locations:
        print("No trips to visualize")
        return None
    marked_map = create_marked_map(locations, value="timestamp")
    location_list = []
    for item in locations:
        location_list.append(item["location"])

    folium.PolyLine(location_list, color='red', weight=12, opacity=0.5).add_to(marked_map)
    if notebook:
        return marked_map
    else:
        marked_map.save('outputs\\' + map_name + '.html')
        webbrowser.open('outputs\\' + map_name + '.html')

    Visualize the trips/routes of a given user in a map
    :param locations: Locations visited by the user (sorted in timestamp)
    :param map_name: name of the map to be displayed
    :param notebook: set true if runs in notebook
    :return: shows a map of routes of the user
    
Visualize the trips/routes of a given user in a map
Visualize the trips / routes of a given user in a map
def trip_visualization(locations, map_name="trip_map", notebook=False):
    if not locations:
        print("No trips to visualize")
        return None
    marked_map = create_marked_map(locations, value="timestamp")
    location_list = []
    for item in locations:
        location_list.append(item["location"])
    folium.PolyLine(location_list, color='red', weight=12, opacity=0.5).add_to(marked_map)
    if notebook:
        return marked_map
    else:
        marked_map.save('outputs\\' + map_name + '.html')
        webbrowser.open('outputs\\' + map_name + '.html')
def trip_visualization ( locations , map_name = "trip_map" , notebook = False ) : if not locations : print ( "No trips to visualize" ) return None marked_map = create_marked_map ( locations , value = "timestamp" ) location_list = [ ] for item in locations : location_list . append ( item [ "location" ] ) folium . PolyLine ( location_list , color = 'red' , weight = 12 , opacity = 0.5 ) . add_to ( marked_map ) if notebook : return marked_map else : marked_map . save ( 'outputs\\' + map_name + '.html' ) webbrowser . open ( 'outputs\\' + map_name + '.html' )
Visualize the trips/routes of a given user in a map
Visualize the trips / routes of a given user in a map
"""
    Visualize the trips/routes of a given user in a map
    :param locations: Locations visited by the user (sorted in timestamp)
    :param map_name: name of the map to be displayed
    :param notebook: set true if runs in notebook
    :return: shows a map of routes of the user
    """
shows a map of routes of the user
shows a map of routes of the user
locations
Locations visited by the user (sorted in timestamp)
Locations visited by the user ( sorted in timestamp )
map_name
name of the map to be displayed
name of the map to be displayed
notebook
set true if runs in notebook
set true if runs in notebook