Using checkboxGroupInput to show only certain bars on a plot Shiny

I am using a multi-file setup so I have both ui.r and server.r files. I am using the dataset below (small sample) which looks at UFO sightings in different states/provinces in U.S./Canada in 2016. Date Time AM.PM Country City State Shape 1 12/21/2016 7:15:00 PM USA Waynesboro VA Sphere 2 12/21/2016 12:00:00 AM USA Louisville KY Unknown 3 12/20/2016 10:30:00 PM USA Santa Rosa CA Sphere 4 12/20/2016 7:00:00 PM USA Fresno CA Circle 5 12/19/2016 9:53:00 PM USA Reymert AZ Circle 6 1/11/2016 8:15:00 PM CANADA Mississauga ON Circle In my app so far, I have created a main panel which displays a bar graph that has all of the different Shapes observed in the “Shape” column on the x-axis and the number of observations on the y-axis. I have a widget on the side which allows the user to select if they want to look at U.S. or Canada data and the plot will change accordingly. What I want to do now is use checkboxGroupInput to allow the user to filter out the shapes that they want to see on the plot’s x-axis. I wrote the function in my UI file with all of the possible shapes as…

Read More…
Using checkboxGroupInput to show only certain bars on a plot Shiny

Updated: May 25, 2021 — 10:27 pm