cellyzer/visualization.py
def cell_population_visualization(cell_list, map_name="population_map", notebook=False):
    """
    Visualize a map with population around cells

    :param cell_list: cells and its respective number of calls
    :param map_name: name of the map to be displayed
    :param notebook: set to True of runs in a notebook
    :return: shows a map with population around cells
    """
    location = [cell_list[0]['latitude'], cell_list[0]['longitude']]
    map1 = folium.Map(location=location, zoom_start=12)
    marker_cluster = folium.plugins.MarkerCluster().add_to(map1)
    location_list = []
    for cell in cell_list:
        cell_location = [cell['latitude'], cell['longitude']]
        for i in range(int(cell['population_around_cell'])):
            location_list.append(cell_location)
    for point in location_list:
        folium.Marker(location=point,
                      popup='nothing').add_to(marker_cluster)
    if notebook:
        return map1
    else:
        # visualize in web browser
        file_path = 'outputs\\' + map_name + '.html'
        map1.save(file_path)
        webbrowser.open(file_path)

    Visualize a map with population around cells

    :param cell_list: cells and its respective number of calls
    :param map_name: name of the map to be displayed
    :param notebook: set to True of runs in a notebook
    :return: shows a map with population around cells
    
Visualize a map with population around cells
Visualize a map with population around cells
def cell_population_visualization(cell_list, map_name="population_map", notebook=False):
    location = [cell_list[0]['latitude'], cell_list[0]['longitude']]
    map1 = folium.Map(location=location, zoom_start=12)
    marker_cluster = folium.plugins.MarkerCluster().add_to(map1)
    location_list = []
    for cell in cell_list:
        cell_location = [cell['latitude'], cell['longitude']]
        for i in range(int(cell['population_around_cell'])):
            location_list.append(cell_location)
    for point in location_list:
        folium.Marker(location=point,
                      popup='nothing').add_to(marker_cluster)
    if notebook:
        return map1
    else:
        file_path = 'outputs\\' + map_name + '.html'
        map1.save(file_path)
        webbrowser.open(file_path)
def cell_population_visualization ( cell_list , map_name = "population_map" , notebook = False ) : location = [ cell_list [ 0 ] [ 'latitude' ] , cell_list [ 0 ] [ 'longitude' ] ] map1 = folium . Map ( location = location , zoom_start = 12 ) marker_cluster = folium . plugins . MarkerCluster ( ) . add_to ( map1 ) location_list = [ ] for cell in cell_list : cell_location = [ cell [ 'latitude' ] , cell [ 'longitude' ] ] for i in range ( int ( cell [ 'population_around_cell' ] ) ) : location_list . append ( cell_location ) for point in location_list : folium . Marker ( location = point , popup = 'nothing' ) . add_to ( marker_cluster ) if notebook : return map1 else : file_path = 'outputs\\' + map_name + '.html' map1 . save ( file_path ) webbrowser . open ( file_path )
Visualize a map with population around cells
Visualize a map with population around cells
"""
    Visualize a map with population around cells

    :param cell_list: cells and its respective number of calls
    :param map_name: name of the map to be displayed
    :param notebook: set to True of runs in a notebook
    :return: shows a map with population around cells
    """ # visualize in web browser
shows a map with population around cells
shows a map with population around cells
cell_list
cells and its respective number of calls
cells and its respective number of calls
map_name
name of the map to be displayed
name of the map to be displayed
notebook
set to True of runs in a notebook
set to True of runs in a notebook