Skip to content
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Convert your report to a dashboard using flexdashboard

Learn More

Check out the flexdashboard website to learn more about how to make flexdashboard. The layouts page is really helpful to see the ways to make various types of layouts using flexdashboard. And the examples page provides some great, um, examples!

There are other ways to make dashboards using R. You can, for example, use the distill package to make a multipage website, which resembles a dashboard. One example you saw during the Making Your Reports Shine: HTML Edition lesson included a dashboard I made using distill (for privacy reasons, I’m only showing the top of it, but there were a bunch of graphs and maps below).

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Lucilla Piccari

Lucilla Piccari

May 31, 2021

Hello!

With the following YAML:


title: "Diversity in Oregon School Districts" author: "Lucilla Piccari" date: "07/05/2021" params: district: "Portland SD 1J" race_ethnicity: "Asian" year: "2018-2019" output: flexdashboard::flex_dashboard vertical_layout: scroll orientation: rows

I get this error message while trying to knit:

Error in yaml::yaml.load(..., eval.expr = TRUE) : Scanner error: mapping values are not allowed in this context at line 10, column 20 Calls: ... parse_yaml_front_matter -> yaml_load -> Execution halted

Line 10 column 20 corresponds to the x character in "flex_dashboard" I searched online and it seems to be something to do with an extra space or indentation in the wrong place, but I can't seem to find what it is (maybe I just don't see it!)

Thanks!

Lucilla Piccari

Lucilla Piccari

May 31, 2021

Found it, I had deleted the three dashes at the end of the YAML by mistake... ! (facepalm)

David Keyes

David Keyes

June 1, 2021

Spacing in YAML is something I ALWAYS mess up!

Oluwaseun Oyewole

Oluwaseun Oyewole

April 28, 2022

When deciding to make dashboards, is there a criteria for doing this via Shiny vs Flexdashboard? (i.e When would it make sense to make your dashboard in Rmarkdown vs in Shiny?)

Charlie Hadley

Charlie Hadley

April 28, 2022

Hello Oluwaseun, {shiny} allows us to build web applications that can pull in new data and can run R code. For {shiny} apps to work they need to be hosted on a server that's running the shiny server application, which does include shinyapps.io. Whereas when you use {flexdashboard} you are using RMarkdown to create a static HTML file that only contains the data that was available at the time the dashboard was created and R code cannot be run in the document. Please do ask me any follow up questions, I have a lot of experience in building shiny apps. Thanks, Charlie

Oluwaseun Oyewole

Oluwaseun Oyewole

April 28, 2022

Thanks for the detailed answer Charlie! Completely understood. However, I don't see any Shiny courses at Rfortherestofus. Any idea if you guys will be hosting one in the near future?

Charlie Hadley

Charlie Hadley

April 28, 2022

There's a course currently in development on R for the Rest of Us. Until that course is available, I personally have a course about Shiny that's available on LinkedIn Learning.

Oluwaseun Oyewole

Oluwaseun Oyewole

April 28, 2022

Thank you!!! I'll check it out :-)