data visualization with r coursera week 3 quiz answers
Lesson 1: Introduction to Dashboards
Practice Quiz
2. Which is the preferred method for creating a Shiny app?
- Separate code into server.R and ui.R files.
- One file for all server and UI code.
- Both methods work the same so one is not preferred over the other.
3. True or False: You must include the shinyApp() function in the code for all Shiny apps.
- True
- False
4. Which function creates an empty layout?
- shinyUI()
- fluidPage()
- mainPanel()
- sidebarLayout()
Graded Quiz
5. True or False: A Shiny app consists of two parts, the server that the user interacts with and the UI that powers the app.
- True
- False
6. Which two components of a dashboard happen on the front end?
- Serve
- Visualize
- Interact
- Analyze
7. Complete the sentence: You use the Layout functions to organize ____________________ containing user interface elements in the application.
- Layouts
- Inputs
- Panels
- Outputs
8. When defining the server logic for a Shiny app, you define a function that includes which of the following parameters?
- input, response
- input, plotOutput
- input, output
- input, renderPlot
Lesson 2: Create a Dashboard Application
Practice Quiz
9. If you have the command plotOutput(“plot_histogram”) in the UI-side code in your Shiny application, what is the name of the variable that you assign the plot to in the server-side code?
- plot_histogram
- output(plot_histogram)
- output$plot_histogram
- input$plot_histogram
10. Can you publish a Shiny app to your shinyapps.io account from RStudio?
- No, you cannot publish a Shiny app to shinyapps.io from RStudio.
- Yes, you can do this using the built-in capabilities of RStudio.
- Yes, but only if you install the rsconnect package first.
- Yes, but only if you install the shiny package first.
11. What is the process to convert an R Markdown file to an HTML, PDF, or Microsoft Word document?
- Append
- Weave
- Knit
- Join
Graded Quiz
12. In a Shiny application, where do you add input widgets?
- A panel.
- A tabset panel.
- A layout.
- A title panel.
13. Which deployment method should you select for your Shiny app if you do not want to run your own server?
- Shiny Server
- shinyapps.io
- RStudio Connect
- None of these options
14. What are the two main differences between an R Markdown document and a Shiny dashboard?
- A dashboard always reflects current data, while an R Markdown document produces a snapshot of the data at the time the report is generated.
- A dashboard is reusable, while an R Markdown file can only be generated once.
- A dashboard can contain text, images, plots, and other information, while an R Markdown document contains only easy-to-write plain text.
- A dashboard can be interactive, while an R Markdown document is static.