Chapter 5 Interactive component
In this part, we provides two interactive plots in order to further explore our data more conveniently.
In previous plots, we observed shooting incident weekly counts as the data appears narrowed for a large time range. In the first plot, we can use interactive tools to zoom in on selected time range, so that we can observe the day-to-day change of shooting incident numbers, and observe the overall trend at the same time.
We can also explore the distribution of shooting incident at the time of day, with variation of victim’s age range and within the selected window of dates. By using the slider in the second plot, we can change the range of month selected, thus we can observe the change in distribution. In the dropdown menu, we can select the age range of victim. It is set to ‘All’, which means all data were selected by default. By changing the selection, we can explore the distribution based on different victim characteristics; and we can set it back to default at any time.
For instance, by selecting “65+” we can observe only a small amount of incidents happened and they all distributed in the evening, which are statistically understandable.
Victim age range: