Adding interactivity to histograms
Just like we did in Chapter 7, Exploring Map Plots and Enriching Your Dashboards with Markdown, we can do the same with histograms. We can allow users to get a better idea about the distribution of a certain indicator in a certain year or more. The difference is that we want to allow them to customize the number of bins. Since we are now comfortable with handling multiple inputs and outputs, let's also add some more options for our users. We can also allow users to select multiple years and display multiple years on multiple sub-plots using faceting. Figure 8.10 shows what we will be working toward to make it clear:
Let's start building right away. We won't be discussing the layout elements such as color and width, but you can always refer to the code repository for the exact solution. We will focus on building the...