I recently took on maintaining a dashboard in my job role. I was very impressed with the layout and design of the dashboard. It does well with the CRAP analysis. This dashboard was built in PowerBi. There are filters and tool tips. PowerBi has a lot of interactivity built in. One aspect I don’t like about the dashboard is repeating information. We have a bar graph and pie charts that demonstrate the same information (the boss likes pie charts). I think that we must be cautious about not throwing too much to the audience at one time. I think the dashboard could be split into 2 pages to make it more digestible. Also, there is a set of filters for the page that filters for all but one graph. That graph has a septate filter. There is a reason for this, but I know it is confusing to first time users. This will be moved to a separate page in later iterations to make the interaction clearer to the audience.
library(tidyverse)
library(plotly)
library(ggplot2)
library(gapminder)
gapminderdataset2007 <- gapminder %>%
filter(year == 2007)
Do the following:
Make a plot. Any kind of plot will do (though it might be easiest
to work with geom_point()).
Make the plot interactive with ggplotly().
Make sure the hovering tooltip is more informative than the default.
Good luck and have fun!
p1 <- ggplot(gapminderdataset2007, aes(x = gdpPercap, lifeExp, color = continent, size = pop, text = paste("Country:", country))) +
geom_point() +
scale_x_log10() +
theme_bw()+
labs(color = "Continent", size = "", x = "GDP per Capita", y = "Life Expectancy") +
ggtitle("2007 GDP Per Capita VS Life Expectancy")
ip1 <- ggplotly(p1)
ip1
Install the {flexdashboard} package and create a new R Markdown file in your project by going to File > New File… > R Markdown… > From Template > Flexdashboard.
Using the documentation for {flexdashboard} online, create a basic dashboard that shows a plot (static or interactive) in at least three chart areas. Play with the layout if you’re feeling brave.