Example #1
0
def dist1():
    df= data_clean()
    
    fig = go.Figure([go.Bar(x=df['horsepower'], y=df_group)])
    fig.show()
    
    fig_json = json.dumps(fig , cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json
Example #2
0
def data():
    data = data_clean()
    return render_template ('data.html', data=data)
Example #3
0
def stats():
    data = data_clean()
    return render_template('stats.html', data=data)
Example #4
0
def data():
    data = data_clean().head()
    return render_template('table_data.html', data=data)
def neighbourhood_plots():
    df = data_clean()
    df_group = df['neighbourhood_cleansed'].value_counts()
    fig = go.Figure([go.Bar(x=df_group.index, y=df_group.values)])
    fig_json = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json
def property_type_price():
    df = data_clean()
    fig = px.box(df, x="property_type", y="price")
    fig_json = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json
def Weekend_price():
    df = data_clean()
    fig = px.box(df, x="Weekend", y="price")
    fig_json = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json
def neighbourhood_price():
    df = data_clean()
    fig = px.box(df, x="neighbourhood_cleansed", y="price")
    fig_json = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json
def property_plots():
    df = data_clean()
    df_group = df['property_type'].value_counts()
    fig = go.Figure([go.Bar(x=df_group.index, y=df_group.values)])
    fig_json = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
    return fig_json