Python Data Visualization Transcripts
Chapter: Dash
Lecture: Interactive app demo

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now we'll execute our simple app and here's our new histogram. So you'll notice that we have a similar histogram to what we've done in the
0:09 past. But we also have this down here where we can choose what values we want to include. So maybe I want to exclude the electric or the other and
0:21 the data updates as I make those changes I can also add more using the multi
0:27 select function. So let me show what that looks like while we're looking at the code. So I find it helpful to look at these side by side so we
0:38 can see what's happening. So now we see our layout and see now here the histogram is placed where I tell the graph needs to be placed and then
0:46 the dropdown is here. So here's my dropdown, here's my graph with my typical plotly flexibility and then the callback what it's telling
0:57 me is it's looking behind the scenes for any changes so if I add diesel it knows that a change was made underlying behind the scenes.
1:08 It calls this update output with a new list of values for fuel ID. And then I create my updated figure just like we have in the past
1:20 The code here is the same. It's all in this call back to make sure that the right information is called to
1:26 the function and the function returns a figure in this case that is shown in my
1:33 screen and so now we have an interactive application where we can allow the users to
1:38 explore this data and understand it in more detail than they could with maybe just a very simple plotly express plot.

Talk Python's Mastodon Michael Kennedy's Mastodon