Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Nov 29, 2023
1 parent 2c95019 commit 4a345eb
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dfadaf06
09e6ac2d
6 changes: 3 additions & 3 deletions communication.html
Original file line number Diff line number Diff line change
Expand Up @@ -693,18 +693,18 @@ <h1 class="title"><span id="sec-communication" class="quarto-section-identifier"
<p><img src="communication_files/figure-html/unnamed-chunk-15-1.png" class="img-fluid" alt="Scatterplot of highway fuel efficiency versus engine size of cars, colored by drive. The x and y-axes do not have any labels at the axis ticks. The legend has custom labels: 4-wheel, front, rear." width="576"></p>
</div>
</div>
<p>The <code>labels</code> argument coupled with labelling functions from the scales package is also useful for formatting numbers as currency, percent, etc. The plot on the left shows default labelling with <code><a href="https://scales.r-lib.org/reference/label_dollar.html">label_dollar()</a></code>, which adds a dollar sign as well as a thousand separator comma. The plot on the right adds further customization by dividing dollar values by 1,000 and adding a suffix “K” (for “thousands”) as well as adding custom breaks. Note that <code>breaks</code> is in the original scale of the data.</p>
<p>The <code>labels</code> argument coupled with labelling functions from the scales package is also useful for formatting numbers as currency, percent, etc. The plot on the left shows default labelling with <code><a href="https://scales.r-lib.org/reference/dollar_format.html">label_dollar()</a></code>, which adds a dollar sign as well as a thousand separator comma. The plot on the right adds further customization by dividing dollar values by 1,000 and adding a suffix “K” (for “thousands”) as well as adding custom breaks. Note that <code>breaks</code> is in the original scale of the data.</p>
<div>
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co"># Left</span></span>
<span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op">(</span><span class="va">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">price</span>, y <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_boxplot.html">geom_boxplot</a></span><span class="op">(</span>alpha <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/scale_continuous.html">scale_x_continuous</a></span><span class="op">(</span>labels <span class="op">=</span> <span class="fu"><a href="https://scales.r-lib.org/reference/label_dollar.html">label_dollar</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/scale_continuous.html">scale_x_continuous</a></span><span class="op">(</span>labels <span class="op">=</span> <span class="fu"><a href="https://scales.r-lib.org/reference/dollar_format.html">label_dollar</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Right</span></span>
<span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op">(</span><span class="va">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">price</span>, y <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_boxplot.html">geom_boxplot</a></span><span class="op">(</span>alpha <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/scale_continuous.html">scale_x_continuous</a></span><span class="op">(</span></span>
<span> labels <span class="op">=</span> <span class="fu"><a href="https://scales.r-lib.org/reference/label_dollar.html">label_dollar</a></span><span class="op">(</span>scale <span class="op">=</span> <span class="fl">1</span><span class="op">/</span><span class="fl">1000</span>, suffix <span class="op">=</span> <span class="st">"K"</span><span class="op">)</span>, </span>
<span> labels <span class="op">=</span> <span class="fu"><a href="https://scales.r-lib.org/reference/dollar_format.html">label_dollar</a></span><span class="op">(</span>scale <span class="op">=</span> <span class="fl">1</span><span class="op">/</span><span class="fl">1000</span>, suffix <span class="op">=</span> <span class="st">"K"</span><span class="op">)</span>, </span>
<span> breaks <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html">seq</a></span><span class="op">(</span><span class="fl">1000</span>, <span class="fl">19000</span>, by <span class="op">=</span> <span class="fl">6000</span><span class="op">)</span></span>
<span> <span class="op">)</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell quarto-layout-panel">
Expand Down
6 changes: 3 additions & 3 deletions data-import.html
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ <h1 class="title"><span id="sec-data-import" class="quarto-section-identifier"><
<div class="cell">
<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://readr.tidyverse.org/reference/problems.html">problems</a></span><span class="op">(</span><span class="va">df</span><span class="op">)</span></span>
<span><span class="co">#&gt; # A tibble: 1 × 5</span></span>
<span><span class="co">#&gt; row col expected actual file </span></span>
<span><span class="co">#&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; </span></span>
<span><span class="co">#&gt; 1 3 1 a double . /tmp/RtmppFdXJw/file1df74aafa46</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; row col expected actual file </span></span>
<span><span class="co">#&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; </span></span>
<span><span class="co">#&gt; 1 3 1 a double . /tmp/RtmpGIUd6W/file2800345544be</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>This tells us that there was a problem in row 3, col 1 where readr expected a double but got a <code>.</code>. That suggests this dataset uses <code>.</code> for missing values. So then we set <code>na = "."</code>, the automatic guessing succeeds, giving us the numeric column that we want:</p>
<div class="cell">
Expand Down
16 changes: 8 additions & 8 deletions databases.html
Original file line number Diff line number Diff line change
Expand Up @@ -839,14 +839,14 @@ <h1 class="title"><span id="sec-import-databases" class="quarto-section-identifi
<span><span class="co">#&gt; This warning is displayed once every 8 hours.</span></span>
<span><span class="co">#&gt; # Source: SQL [?? x 2]</span></span>
<span><span class="co">#&gt; # Database: DuckDB v0.9.2 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]</span></span>
<span><span class="co">#&gt; dest delay</span></span>
<span><span class="co">#&gt; &lt;chr&gt; &lt;dbl&gt;</span></span>
<span><span class="co">#&gt; 1 IAH 4.24 </span></span>
<span><span class="co">#&gt; 2 BQN 8.25 </span></span>
<span><span class="co">#&gt; 3 ATL 11.3 </span></span>
<span><span class="co">#&gt; 4 MCO 5.45 </span></span>
<span><span class="co">#&gt; 5 LAS 0.258</span></span>
<span><span class="co">#&gt; 6 PHX 2.10 </span></span>
<span><span class="co">#&gt; dest delay</span></span>
<span><span class="co">#&gt; &lt;chr&gt; &lt;dbl&gt;</span></span>
<span><span class="co">#&gt; 1 SFO 2.67</span></span>
<span><span class="co">#&gt; 2 SJU 2.52</span></span>
<span><span class="co">#&gt; 3 SNA -7.87</span></span>
<span><span class="co">#&gt; 4 SRQ 3.08</span></span>
<span><span class="co">#&gt; 5 CHS 10.6 </span></span>
<span><span class="co">#&gt; 6 SAN 3.14</span></span>
<span><span class="co">#&gt; # ℹ more rows</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>If you want to learn more about how <code>NULL</code>s work, you might enjoy “<a href="https://modern-sql.com/concept/three-valued-logic"><em>Three valued logic</em></a>” by Markus Winand.</p>
Expand Down
12 changes: 6 additions & 6 deletions datetimes.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ <h1 class="title"><span id="sec-dates-and-times" class="quarto-section-identifie
<p>To get the current date or date-time you can use <code><a href="https://lubridate.tidyverse.org/reference/now.html">today()</a></code> or <code><a href="https://lubridate.tidyverse.org/reference/now.html">now()</a></code>:</p>
<div class="cell">
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/now.html">today</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "2023-11-22"</span></span>
<span><span class="co">#&gt; [1] "2023-11-29"</span></span>
<span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/now.html">now</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "2023-11-22 21:17:07 UTC"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; [1] "2023-11-29 21:11:39 UTC"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Otherwise, the following sections describe the four ways you’re likely to create a date/time:</p>
<ul>
Expand Down Expand Up @@ -764,9 +764,9 @@ <h1 class="title"><span id="sec-dates-and-times" class="quarto-section-identifie
<p>You may want to switch between a date-time and a date. That’s the job of <code><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_datetime()</a></code> and <code><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_date()</a></code>:</p>
<div class="cell">
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_datetime</a></span><span class="op">(</span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/now.html">today</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "2023-11-22 UTC"</span></span>
<span><span class="co">#&gt; [1] "2023-11-29 UTC"</span></span>
<span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_date</a></span><span class="op">(</span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/now.html">now</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "2023-11-22"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; [1] "2023-11-29"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Sometimes you’ll get date/times as numeric offsets from the “Unix Epoch”, 1970-01-01. If the offset is in seconds, use <code><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_datetime()</a></code>; if it’s in days, use <code><a href="https://lubridate.tidyverse.org/reference/as_date.html">as_date()</a></code>.</p>
<div class="cell">
Expand Down Expand Up @@ -970,12 +970,12 @@ <h1 class="title"><span id="sec-dates-and-times" class="quarto-section-identifie
<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co"># How old is Hadley?</span></span>
<span><span class="va">h_age</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://lubridate.tidyverse.org/reference/now.html">today</a></span><span class="op">(</span><span class="op">)</span> <span class="op">-</span> <span class="fu"><a href="https://lubridate.tidyverse.org/reference/ymd.html">ymd</a></span><span class="op">(</span><span class="st">"1979-10-14"</span><span class="op">)</span></span>
<span><span class="va">h_age</span></span>
<span><span class="co">#&gt; Time difference of 16110 days</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; Time difference of 16117 days</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>A <code>difftime</code> class object records a time span of seconds, minutes, hours, days, or weeks. This ambiguity can make difftimes a little painful to work with, so lubridate provides an alternative which always uses seconds: the <strong>duration</strong>.</p>
<div class="cell">
<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://lubridate.tidyverse.org/reference/as.duration.html">as.duration</a></span><span class="op">(</span><span class="va">h_age</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "1391904000s (~44.11 years)"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; [1] "1392508800s (~44.13 years)"</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Durations come with a bunch of convenient constructors:</p>
<div class="cell">
Expand Down
7 changes: 4 additions & 3 deletions layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,10 @@ <h1 class="title"><span id="sec-layers" class="quarto-section-identifier"><span
<span><span class="co"># Right</span></span>
<span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op">(</span><span class="va">mpg</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">displ</span>, y <span class="op">=</span> <span class="va">hwy</span>, shape <span class="op">=</span> <span class="va">class</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co">#&gt; Warning: The shape palette can deal with a maximum of 6 discrete values</span></span>
<span><span class="co">#&gt; because more than 6 becomes difficult to discriminate; you have 7.</span></span>
<span><span class="co">#&gt; Consider specifying shapes manually if you must have them.</span></span>
<span><span class="co">#&gt; Warning: The shape palette can deal with a maximum of 6 discrete values because more</span></span>
<span><span class="co">#&gt; than 6 becomes difficult to discriminate</span></span>
<span><span class="co">#&gt; ℹ you have requested 7 values. Consider specifying shapes manually if you</span></span>
<span><span class="co">#&gt; need that many have them.</span></span>
<span><span class="co">#&gt; Warning: Removed 62 rows containing missing values (`geom_point()`).</span></span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell quarto-layout-panel">
<div class="quarto-layout-row quarto-layout-valign-top">
Expand Down
4 changes: 2 additions & 2 deletions quarto-formats.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"search-submit-button-title": "Enviar",
"search-label": "Procurar"
}
}</script><script defer="" data-domain="r4ds.hadley.nz" src="https://plausible.io/js/plausible.js"></script><script src="site_libs/htmlwidgets-1.6.2/htmlwidgets.js"></script><script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script><link href="site_libs/leaflet-1.3.1/leaflet.css" rel="stylesheet">
}</script><script defer="" data-domain="r4ds.hadley.nz" src="https://plausible.io/js/plausible.js"></script><script src="site_libs/htmlwidgets-1.6.3/htmlwidgets.js"></script><script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script><link href="site_libs/leaflet-1.3.1/leaflet.css" rel="stylesheet">
<script src="site_libs/leaflet-1.3.1/leaflet.js"></script><link href="site_libs/leafletfix-1.0.0/leafletfix.css" rel="stylesheet">
<script src="site_libs/proj4-2.6.2/proj4.min.js"></script><script src="site_libs/Proj4Leaflet-1.0.1/proj4leaflet.js"></script><link href="site_libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css" rel="stylesheet">
<script src="site_libs/leaflet-binding-2.2.1/leaflet.js"></script>
Expand Down Expand Up @@ -519,7 +519,7 @@ <h1 class="title"><span id="sec-quarto-formats" class="quarto-section-identifier
<span> <span class="fu"><a href="https://rdrr.io/pkg/leaflet/man/map-layers.html">addTiles</a></span><span class="op">(</span><span class="op">)</span> <span class="op">|&gt;</span></span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/leaflet/man/map-layers.html">addMarkers</a></span><span class="op">(</span><span class="fl">174.764</span>, <span class="op">-</span><span class="fl">36.877</span>, popup <span class="op">=</span> <span class="st">"Maungawhau"</span><span class="op">)</span> </span></code><button title="Copiar para a área de transferência" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div class="leaflet html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-ac96cb3ee4656e2e9ec3" style="width:100%;height:433px;"></div>
<div class="leaflet html-widget html-fill-item" id="htmlwidget-ac96cb3ee4656e2e9ec3" style="width:100%;height:433px;"></div>
<script type="application/json" data-for="htmlwidget-ac96cb3ee4656e2e9ec3">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[-36.877,174.764],16,[]],"calls":[{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]},{"method":"addMarkers","args":[-36.877,174.764,null,null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},"Maungawhau",null,null,null,null,{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[-36.877,-36.877],"lng":[174.764,174.764]}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
Expand Down
Loading

0 comments on commit 4a345eb

Please sign in to comment.