예제 #1
0
def plot():
    """
    This page displays a scatter plot of all gathered tweets
    The x-axis is the sentiment value.
    The y-axis is the weather value.
    The closer points are to the 'identity' line,
    the closer they fit our hypothesis
    """
    scatter_plot = ScatterPlot(1)
    scatter_plot.load_data()
    img_data = scatter_plot.get_image_data()
    refresh = request.args.get('refresh', 0, type=int)
    if refresh:
        return img_data
    return render_template('plot.html', data=img_data)
예제 #2
0
def plot():
    """
    This page displays a scatter plot of all gathered tweets
    The x-axis is the sentiment value.
    The y-axis is the weather value.
    The closer points are to the 'identity' line,
    the closer they fit our hypothesis
    """
    scatter_plot = ScatterPlot(1)
    scatter_plot.load_data()
    img_data = scatter_plot.get_image_data()
    refresh = request.args.get('refresh', 0, type=int)
    if refresh:
        return img_data
    return render_template('plot.html', data=img_data)