# Load dynamic data?

**URL:** <https://community.plotly.com/t/load-dynamic-data/15748>\
**Category:** Dash Python\
**Created:** [November 16, 2018, 10:26pm UTC](https://community.plotly.com/t/load-dynamic-data/15748 "2018-11-16T22:26:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnny](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Johnny](https://community.plotly.com/u/Johnny)\
**Post date:** [November 16, 2018, 10:26pm UTC](https://community.plotly.com/t/load-dynamic-data/15748/1 "2018-11-16T22:26:16Z")

</div>

I’m performing a school science experiment using a Raspberry Pi to capture temperature from four different sensors, once per minute. I’ve built a simple Dash site to plot my data using datetime as my ‘x’ and each of the four sensors are a unique line as ‘y’.

My plot/graph looks fantastic, however, it only works as a “one and done” point in time view. I would like to update the data at each page load.

As per the demos, I have attempted to make app.layout call a function which loads up my data into a pandas data frame, then builds my layout and returns it all at once. Unfortunately, the layout seems cached somehow/somewhere, and isn’t clear where that’s stored. If I stop/restart the server, it will load the new data, but not upon refreshing the page.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [November 17, 2018, 1:18am UTC](https://community.plotly.com/t/load-dynamic-data/15748/2 "2018-11-17T01:18:13Z")

</div>

See [https://dash.plot.ly/live-updates](https://dash.plot.ly/live-updates)

---

<div class="post-metadata">

**Author:** ![Johnny](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Johnny](https://community.plotly.com/u/Johnny)\
**Post date:** [November 17, 2018, 10:35pm UTC](https://community.plotly.com/t/load-dynamic-data/15748/3 "2018-11-17T22:35:56Z")

</div>

Thank you for the reply. I used the ‘Updates on Page Load’ method originally, which wasn’t working for me. Upon comparing your code, and my own, I discovered that if I drop the parenthesis from ‘app.layout = serve\_layout()’ the page does indeed load my data file on refresh.

Thank you.
