Using callback functions with maps
What we have done so far was done with one indicator, and we used this indicator to select the desired column from the dataset. We can easily create a dropdown to allow users to choose any of the available indicators and let them explore the whole dataset. The year
variable is already interactive and part of the chart, as used by the animation_frame
parameter. So, this can become the first exploratory interactive chart that users start with on our app, to help them get an overview of the available metrics and how they are changing in time.
Setting this up is straightforward, as we did several times. We will implement it, and after that, we will see how to use the Markdown
component to add context around/about the map chart and the chosen indicator.
Let's do the necessary steps to implement this functionality independently in JupyterLab:
- Create a
Dropdown
component, where the available options are the column names ofpoverty
, using...