Exemplo n.º 1
0
def do_analysis():
    riffdata = Riffdata()
    meetings = riffdata.get_meetings_with_participant_utterances()

    print(f'Found utterances from {len(meetings)} meetings')
    meeting_ids = list(meetings)

    # Just to get an idea of what is in a meeting w/ participant utterances print 1
    _print_participant_uts_info(meeting_ids[0], meetings[meeting_ids[0]])

    durations = get_utterance_durations(meetings)
    print(f'Found {len(durations)} utterances')

    durations.sort()
    print(
        f'shortest utterance was {durations[0]}ms and longest was {durations[-1]}ms'
    )

    buckets, bucket_cnt, graph_ranges = _distribute_durations(durations)
    _print_bucket_data(buckets, bucket_cnt)

    x, y = _make_xy_sets_to_plot(x_src=buckets,
                                 y_src=bucket_cnt,
                                 ranges=graph_ranges)

    # pylint: disable=consider-using-enumerate
    fig, ax = plt.subplots(len(x), 1)
    for plot in range(0, len(x)):
        my_plotter(ax[plot], x[plot], y[plot], {'marker': 'x'})

    fig.savefig('plot.png')
Exemplo n.º 2
0
def do_analysis():
    riffdata = Riffdata()
    meetings = riffdata.get_meetings_with_participant_utterances()

    print(f'Found utterances from {len(meetings)} meetings')

    gaps = get_utterance_gaps(meetings)

    x = np.array(gaps)
    fig, ax = plt.subplots()
    # the histogram of the data (see example: https://matplotlib.org/gallery/statistics/histogram_features.html)
    num_bins = 50
    ax.hist(x, num_bins, range=(0, 4000))

    fig.savefig('plot_gap.png')
Exemplo n.º 3
0
def do_analysis():
    riffdata = Riffdata()
    meetings = riffdata.get_meetings_with_participant_utterances()

    print(f'Found utterances from {len(meetings)} meetings')

    zerolen_ut_distribution = get_zerolen_ut_distribution(meetings)

    percentile_size = 100 // len(zerolen_ut_distribution)
    x = np.array(range(percentile_size, 101, percentile_size))
    y = np.array(zerolen_ut_distribution)

    # pylint: disable=consider-using-enumerate
    fig, ax = plt.subplots()
    my_plotter(ax, x, y, {'marker': 'x'})

    fig.savefig('plot_0_distrib.png')