Пример #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
Пример #2
0
def data():
    data = data_clean()
    return render_template ('data.html', data=data)
Пример #3
0
def stats():
    data = data_clean()
    return render_template('stats.html', data=data)
Пример #4
0
def data():
    data = data_clean().head()
    return render_template('table_data.html', data=data)
Пример #5
0
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
Пример #6
0
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
Пример #7
0
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
Пример #8
0
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
Пример #9
0
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