# Python Dash data not loading completely on Heroku

**URL:** <https://community.plotly.com/t/python-dash-data-not-loading-completely-on-heroku/53881>\
**Category:** Dash Python\
**Created:** [June 15, 2021, 12:26am UTC](https://community.plotly.com/t/python-dash-data-not-loading-completely-on-heroku/53881 "2021-06-15T00:26:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza21](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hamza21/32/15368_2.png) [@Hamza21](https://community.plotly.com/u/Hamza21)\
**Post date:** [June 15, 2021, 12:26am UTC](https://community.plotly.com/t/python-dash-data-not-loading-completely-on-heroku/53881/1 "2021-06-15T00:26:08Z")

</div>

**Python Dash data not loading completely on Heroku Pipelines:**

Dash data loads correctly on localhost (code attached) with a value in 2017 up to 50 on the y-axis, but those values are not being displayed when deployed to Heroku.

[sewerpollutants](https://sewerpollutants.herokuapp.com/)

**app.py**

```auto
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html 
import plotly.graph_objects as go
import plotly.express as px
import pandas as pd
import dash_bootstrap_components as dbc
import re

# Load data
url1 = 'https://sewerpollutants.s3.us-west-2.amazonaws.com/LIMS.xls'
df = pd.read_excel(url1,index_col=0, parse_dates=True)
df["pollutant_abb"] = df.PARAMLISTDESC.apply(lambda x: re.sub(" *\-.+", "", x)) # remove -Total Recoverable
df.sort_values("pollutant_abb", inplace = True)

# Plot data
external_stylesheets = [dbc.themes.BOOTSTRAP]
app = dash.Dash( __name__ , external_stylesheets = external_stylesheets)

app.layout = html.Div([
    html.Center(html.H2("Sewer Pollutants")),
    html.Center(html.H6("Interactive Dashboard using Laboratory Information Management System(LIMS) data")),
    html.Div(dcc.Tabs([
        dcc.Tab([
            html.Div([
                dcc.Dropdown(id='pollutant-dropdown', 
                    options = [{'label': str(pltn), 'value': str(pltn)} for pltn in df.pollutant_abb.unique()], 
                    multi = True, className = "ml-3 mr-3"),
                html.Div(dcc.Loading(id = 'barchart')) # or dbc.Spinner
            ]) # html.div
        ], label = "EPA metal Pollutants of Concern (POC)") # dbc.Col dcc.Tab
    ]))
])

# Callbacks
@app.callback(
    Output("barchart", "children"),
    [Input("pollutant-dropdown", "value")]
)
def filterPollutants(selected_pollutants):
    if selected_pollutants:
        dff = df.loc[df.pollutant_abb.isin(selected_pollutants)]
    else:
        dff = df
    
    bar_fig = {'data':[
            go.Bar(
            x = dff['U_SAMPLE_DTTM'],
            y = dff['DISPLAYVALUE'],
            )], 
    'layout':go.Layout(title='Sampling for Local Limits', 
            # yaxis_range=[0,2],
            yaxis_title_text='Metals mg/L'
            )}      

    # line_fig = px.line(dff, x= "U_SAMPLE_DTTM", y = "DISPLAYVALUE", color = "pollutant_abb",# template = "simple_white",
    # title = "Sampling for Local Limits")

    # line_fig.update_layout({"yaxis": {"title": {"text": "Metals mg/L"}}})

    return dcc.Graph(figure = bar_fig)

if __name__ == " __main__":
        app.run_server(debug=True)

```

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![atharvakatre](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/atharvakatre/32/14713_2.png) [@atharvakatre](https://community.plotly.com/u/atharvakatre)\
**Post date:** [June 16, 2021, 5:45am UTC](https://community.plotly.com/t/python-dash-data-not-loading-completely-on-heroku/53881/2 "2021-06-16T05:45:34Z")

</div>

Hi @Hamza21 and welcome to the Dash Community!

I think your issue is similar to this [thread](https://community.plotly.com/t/y-axis-values-out-of-order-on-plotly-graph-python/53804).

I checked the datatypes of your columns and values of y axis are of type object instead of the numeric(float) type.  
Try the [solution](https://community.plotly.com/t/y-axis-values-out-of-order-on-plotly-graph-python/53804/2) I have discussed in the same thread.
