R Tutorial: Anatomy of a flexdashboard
Key Takeaways
Explains the anatomy of a Flexdashboard using R and Markdown to create interactive dashboards
Full Transcript
now we're going to talk about the basics of how a Flex dashboard is put together the little piece of magic that turns our markdown into a Flex dashboard is in the header every our markdown file starts with a header and the key part for us is the output line if you've used our markdown before you may have noticed that the output was set to HTML document or perhaps PDF document this option determines how everything in your our markdown file is interpreted and what type of output is produced when you knit the document so you might have guessed how we make our our markdown file become a Flex dashboard we change the output type to flex underscore dashboard you'll usually see this as output : Flex dashboard double colon flex underscore dashboard which makes it extra clear that this output option comes with a Flex dashboard our package with this option set your our markdown file will be interpreted as Flex dashboard syntax a Flex dashboard is made of charts every chart fills one box in the dashboard layout the way to indicate a chart in your R markdown file is with a triple pound sign everything below one of these and above the next will be included in a single chart usually this is a single R chunk but it can also include text the title of the chart can be included on the same line as the triple pound sign charts are arranged in columns every chart is in exactly one column but a column can contain multiple charts you can create a dashboard without specifying columns and all charts will stack up in a single column by default however usually you'll want to specify the columns directly columns are created using a series of 14 or more dashes in Flex dashboard syntax all charts between one column header and the next will be laid out in that column you can add a name for the column and options which we'll talk about later on the line above the dashes but the name will not here anywhere in your dashboard a specific name might be helpful for you or just column will suffice you can create a flex dashboard template in our studio by choosing file new file our markdown then from template flex dashboard and okay if you have at least one chart and the appropriate output in the header all you have to do is knit and you'll have a dashboard for this course we'll be using a publicly available data set from a bike share service in the San Francisco area it has records for all bike trips taken from station to station with locations and times you'll see this data appear in many of the exercises time to put this into practice
Original Description
Want to learn more? Take the full course at https://learn.datacamp.com/courses/building-dashboards-with-flexdashboard at your own pace. More than a video, you'll learn hands-on coding & quickly apply skills to your daily work.
---
Now we're going to talk about the basics of how a flexdashboard is put together.
The little piece of magic that turns R Markdown into a flexdashboard is in the header. Every R Markdown file starts with a header, and the key part for us is the output line. If you’ve used R Markdown before, you may have noticed that the output was set to html_document, or perhaps pdf_document. This option determines how everything in your R Markdown file is interpreted, and what type of output is produced when you knit the document.
So you might have guessed how we make our R Markdown file become a flexdashboard: we change the output type to flex_dashboard. You’ll usually see this as output: flexdashboard::flex_dashboard, which makes it extra clear that this output option comes with the flexdashboard R package. With this option set, your R Markdown file will be interpreted as flexdashboard syntax.
A flexdashboard is made of charts. Every chart fills one box in the dashboard layout.
The way to indicate a chart in your R Markdown file is with a triple pound sign. Everything below one of these and above the next will be included in a single chart. Usually this is a single R chunk, but it can also include text. The title of the chart can be included on the same line as the triple pound sign.
Charts are arranged in columns. Every chart is in exactly one column, but a column can contain multiple charts. You can create a dashboard without specifying columns, and all charts will stack up in a single column by default. However, usually you’ll want to specify the columns directly. Columns are created using a series of 14 or more dashes in flexdashboard syntax. All charts between one column header and the next will be laid out in that column. You can add a name
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from DataCamp · DataCamp · 19 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
▶
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SQL Server Tutorial: Date manipulation
DataCamp
R Tutorial: Intermediate Interactive Data Visualization with plotly in R
DataCamp
R Tutorial: Adding aesthetics to represent a variable
DataCamp
R Tutorial: Moving Beyond Simple Interactivity
DataCamp
Python Tutorial: Why use ML for marketing? Strategies and use cases
DataCamp
Python Tutorial: Preparation for modeling
DataCamp
Python Tutorial: Machine Learning modeling steps
DataCamp
R Tutorial: The prior model
DataCamp
R Tutorial: Data & the likelihood
DataCamp
R Tutorial: The posterior model
DataCamp
R Tutorial: An Introduction to plotly
DataCamp
R Tutorial: Plotting a single variable
DataCamp
R Tutorial: Bivariate graphics
DataCamp
Python Tutorial: Customer Segmentation in Python
DataCamp
Python Tutorial: Time cohorts
DataCamp
Python Tutorial: Calculate cohort metrics
DataCamp
Python Tutorial: Cohort analysis visualization
DataCamp
R Tutorial: Building Dashboards with flexdashboard
DataCamp
R Tutorial: Anatomy of a flexdashboard
DataCamp
R Tutorial: Layout basics
DataCamp
R Tutorial: Advanced layouts
DataCamp
Python Tutorial: Time Series Analysis in Python
DataCamp
Python Tutorial: Correlation of Two Time Series
DataCamp
Python Tutorial: Simple Linear Regressions
DataCamp
Python Tutorial: Autocorrelation
DataCamp
R Tutorial: The gapminder dataset
DataCamp
R Tutorial: The filter verb
DataCamp
R Tutorial: The arrange verb
DataCamp
R Tutorial: The mutate verb
DataCamp
R Tutorial: What is cluster analysis?
DataCamp
R Tutorial: Distance between two observations
DataCamp
R Tutorial: The importance of scale
DataCamp
R Tutorial: Measuring distance for categorical data
DataCamp
Python Tutorial: Plotting multiple graphs
DataCamp
Python Tutorial: Customizing axes
DataCamp
Python Tutorial: Legends, annotations, & styles
DataCamp
Python Tutorial: Introduction to iterators
DataCamp
Python Tutorial: Playing with iterators
DataCamp
Python Tutorial: Using iterators to load large files into memory
DataCamp
SQL Tutorial: Introduction to Relational Databases in SQL
DataCamp
SQL Tutorial: Tables: At the core of every database
DataCamp
SQL Tutorial: Update your database as the structure changes
DataCamp
Python Tutorial: Classification-Tree Learning
DataCamp
Python Tutorial: Decision-Tree for Classification
DataCamp
Python Tutorial: Decision-Tree for Regression
DataCamp
Python Tutorial: Census Subject Tables
DataCamp
Python Tutorial: Census Geography
DataCamp
Python Tutorial: Using the Census API
DataCamp
R Tutorial: A/B Testing in R
DataCamp
R Tutorial: Baseline Conversion Rates
DataCamp
R Tutorial: Designing an Experiment - Power Analysis
DataCamp
R Tutorial: Introduction to qualitative data
DataCamp
R Tutorial: Understanding your qualitative variables
DataCamp
R Tutorial: Making Better Plots
DataCamp
SQL Tutorial: OLTP and OLAP
DataCamp
SQL Tutorial: Storing data
DataCamp
SQL Tutorial: Database design
DataCamp
Python Tutorial: Introduction to spaCy
DataCamp
Python Tutorial: Statistical Models
DataCamp
Python Tutorial: Rule-based Matching
DataCamp
Related Reads
📰
📰
📰
📰
Building a WhatsApp AI CRM in Google Sheets with Apps Script, Twilio & GPT-4
Dev.to · Hayrullah Kar
I built an open-source internship tracker that polls 3,593 company career feeds
Dev.to AI
Meta Just Realized Owning GPUs Is Not a Strategy
Medium · Programming
Daily Crypto Update: VishvaAlgoAI Finds 9 Long, 5 Short and 6 Neutral Verdicts
Medium · AI
🎓
Tutor Explanation
DeepCamp AI