Skip to content

Commit 9c5e68a

Browse files
authored
Merge pull request #946 from tidyverse/f-webshot
Use webshot?
2 parents c3ee6dc + 60f2781 commit 9c5e68a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/testthat/_snaps/vignette-formats/formats.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,13 @@ stocks %>%
137137
It pays off to specify formatting very early in the process.
138138
The diagram below shows the principal stages of data analysis and exploration from "R for data science".
139139

140-
141-
```{=html}
142-
<div id="htmlwidget-dbf0c8daf9db0415fdf5" style="width:672px;height:480px;" class="DiagrammeR html-widget"></div>
143-
<script type="application/json" data-for="htmlwidget-dbf0c8daf9db0415fdf5">{"x":{"diagram":"graph TD\n Import --> Tidy\n Tidy --> Transform\n Transform --> Visualize\n Visualize --> Communicate\n Visualize --> Model\n Model -.-> Transform"},"evals":[],"jsHooks":[]}</script>
144-
```
140+
![](${TEMP}/formats_files/figure-markdown_strict/unnamed-chunk-8-1.png)
145141

146142
The subsequent diagram adds data formats, communication options, and explicit data formatting.
147143
The original r4ds transitions are highlighted in bold.
148144
There are two principal options where to apply formatting for results: right before communicating them, or right after importing.
149145

150-
151-
```{=html}
152-
<div id="htmlwidget-ec529900dc9c9fda496e" style="width:672px;height:480px;" class="DiagrammeR html-widget"></div>
153-
<script type="application/json" data-for="htmlwidget-ec529900dc9c9fda496e">{"x":{"diagram":"graph TD\n .csv --> Import\n API --> Import\n DBI --> Import\n dbplyr --> Import\n Import -.-> Format[Format for analysis]\n Format -.-> Tidy\n\n subgraph r4ds\n Import ==> Tidy\n Tidy ==> Transform\n Transform ==> Visualize\n Visualize ==> Model\n Model -.-> Transform\n Visualize ==> Communicate\n end\n\n Visualize -.-> FormatComm[Format for communication]\n FormatComm -.-> Communicate\n\n FormatComm -- Apply formatting early --> Format\n\n dbplyr -.-> Tidy\n dbplyr -.-> Transform\n dbplyr -.-> Visualize\n\n Communicate --> gt\n Communicate --> ggplot2\n Communicate --> DT\n Communicate --> plotly"},"evals":[],"jsHooks":[]}</script>
154-
```
146+
![](${TEMP}/formats_files/figure-markdown_strict/unnamed-chunk-9-1.png)
155147

156148
Applying formatting early in the process gives the added benefit of showing the data in a useful format during the "Tidy", "Transform", and "Visualize" stages.
157149
For this to be useful, we need to ensure that the formatting options applied early:

0 commit comments

Comments
 (0)