Example #1
0
def draw_centre(pm_frame, project,
                thread_type="all threads", stage=-1,
                show=False, skips=10, zoom=1):
    """Wrapper function for author_network.draw_centre_discussion"""
    get_project_at(pm_frame, project,
                   thread_type, stage)['network'].draw_centre_discussion(
                       show=show, skips=skips, zoom=zoom)
Example #2
0
def draw_network(pm_frame, project,
                 graph_type,
                 thread_type="all threads", stage=-1,
                 reset=False):
    """Wrapper function for author_network.draw_graph.
    Plots the interaction-network between the commenters in project."""
    get_project_at(
        pm_frame, project, thread_type, stage)['network'].draw_graph(
            project=project, graph_type=graph_type, reset=reset)
Example #3
0
def plot_activity_pie(pm_frame, project,
                      thread_type="all threads", stage=-1,
                      what='total comments'):
    """Wrapper function for author_network.plot_author_activity_pie
    Plots pie-chart of comment_activity of commenters is project.
    'what' can be 'total comments', or 'word counts'"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    data.plot_author_activity_pie(project=project,
                                  what=what)
Example #4
0
def plot_comment_histogram(pm_frame, project,
                           thread_type="all threads", stage=-1,
                           what="total comments", bins=10,
                           fontsize=6):
    """Wrapper function for author_network.plot_author_activity_hist.
    'what' is either 'total comments' or 'word counts'"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    data.plot_author_activity_hist(project=project,
                                   what=what, bins=bins,
                                   fontsize=fontsize)
Example #5
0
def plot_activity_bar(pm_frame, project,
                      thread_type="all threads", stage=-1,
                      what="by level",
                      fontsize=6):
    """Wrapper function for author_network.plot_activity_bar
    Plots bar-chart of comment_activity of commenters in project
    'what' can be 'by level' or 'word counts'"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    data.plot_author_activity_bar(project=project,
                                  what=what,
                                  fontsize=fontsize)
Example #6
0
def plot_centrality_measures(pm_frame, project,
                             thread_type="all threads", stage=-1,
                             graph_type='interaction',
                             measures=None,
                             delete_on=None, thresh=0,
                             fontsize=6):
    """Wrapper function for author_network.plot_activity_degree
    Plots superposition of bar-chart of comment-activity and line-chart of
    degree-centrality"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    data.plot_centrality_measures(project=project,
                                  g_type=graph_type,
                                  measures=measures,
                                  delete_on=delete_on, thresh=thresh,
                                  fontsize=fontsize)
Example #7
0
def plot_activity_prop(pm_frame, project,
                       thread_type="all threads", stage=-1):
    """Wrapper function for author_network.plot_activity_prop"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    data.plot_activity_prop(project=project)
Example #8
0
def measures_corr(pm_frame, project,
                  graph_type, thread_type="all threads", stage=-1):
    """wrapper function for correlation between network-measures in
    author_network"""
    data = get_project_at(pm_frame, project, thread_type, stage)['network']
    return data.corr_centrality_measures(project=project, g_type=graph_type)