Column

General instructions

This r markdown was just setup from the example template for a flex dashboard (File | New File | R markdown | From Template | Flexdashboard), except that I moved the original right column above the original left column.

A few of you are interested in embedding one or more Tableau graphics into an R markdown file like this flex dashboard (or any other rmd file, for that matter).

You can do this, but it’s a bit finicky, including being able to place and size the graphic precisely into the visual structure of your communication. So it’s more complex than either using just Tableau or using just r markdown. Don’t lose site of your goals in the interactive communication (as explained in your instructions) in the process of trying to get some particular technical thing to work. That said, here are the general steps you would need to take to embed a Tableau graphic into something like this rmd/html document.

Now obviously, this example does not try to apply best practices in any of the communication concepts we’ve discussed this semester as its only purpose is to show you embedding Tableau. Reach out to Laura or I with questions.

Of note: to see the actual interactive graphic, you will need to open the html file in a browser like Safari or Chrome; in R Studio’s Viewer, you’ll just see a circle where the graphic will appear.

You will find the example of formatted embed code below, from a Tableau public graphic example that Laura created and has embedded on her website, by clicking on her Share button of her graphic and copying the embed code:

Example ggplot graphic

Column

Example Tableau embedded in flex dashboard