The following guide walks you through how to create a flexdashboard for unifying all of your Cancer InFocus dashboards onto one page.
First, you’ll want to set up a folder for the files needed to build
your CIF flexdashboard. Unlike your other CIF dashboards using Shiny,
this folder does not need a www
folder.
.
`-- ShinyFlex/
Download the following files from GitHub. They can be found in the
GitHub folder Cancer_InFocus/CIF Shiny/ShinyFlex
:
cif_flexdashboard.Rmd
about_us.html
data_sources.html
myheader.html
circle_logo_light.png
At this point, you file directory should look like this.
.
`-- ShinyFlex/
|-- cif_flexdashboard.Rmd
|-- about_us.html
|-- data_sources.html
|-- myheader.html
`-- circle_logo_light.png
Open the cif_flexdashboard.Rmd
file and locate the
params
items in the header. Replace these URLs with the
appropriate URLs for your published CIF dashboards. If you are not using
a specific dashboard at the moment (for example, if you are not using
CIF Profiles), then you will want to comment out the lines indicated in
the body of the script.
Once you have updated the URLs, knit your
cif_flexdashboard.Rmd
file. A preview should appear in the
Viewer
panel in RStudio. Check this to make sure that all
of your CIF dashboards have been linked correctly, as well as to make
sure that the Data Sources
and About
pages are
rendering.
After you have checked that your flexdashbord is correctly configured, publish it using the same method that you publish your CIF dashboards. After it is published, you can place the published URL in a full page iframe to display your flexdashboard on the webpage of your choice. As an example, here is the Cancer InFocus: Kentucky flexdashboard.
By following these steps you will hopefully be able to display all of your CIF dashboards together in one place. Moreover, this provides a simple and efficient solution for sharing information about data sources used in CIF.
If you run into any issues, or have any comments for improving this tutorial, please contact us at CancerInFocus@uky.edu.