Skip to content

Commit

Permalink
Fixed RSS feed
Browse files Browse the repository at this point in the history
The RSS feed for this site did not contain the full content
of the articles in this project on previous commits due to
an ongoing issue with the {distill} package. To address this,
the Rmarkdown files in this projet were rendered again after
installing the development version of distill using
'devtools::install_github("rstudio/distill")'.

While rendering the articles again using this development
version of {distill}, errors arose with 'ggplot2::ggsave()'
commands and with the relative paths to these saved files.
The ggsave() commands were removed as they were no longer
needed and the file paths were fixed. The ggsave() commands
were redundant as the plots are already written to files
during rendering of distill articles using
'rmarkdown::render()'.

This commit was delayed due to issues installing the {sf}
package used in the US Post Offices article, despite
having met the system requirements outlined on CRAN.
The package was successfully installed once the path to
the system libraries was specified during the installation
using an additional argument. For example:
'install.packages("sf",
                  configure.args = "--with-proj-lib=/usr:/lib")'
  • Loading branch information
Ronan committed Jun 27, 2021
1 parent e9850ed commit 3608329
Show file tree
Hide file tree
Showing 88 changed files with 1,790 additions and 569 deletions.
11 changes: 1 addition & 10 deletions _posts/2021-03-21-bechdel-test/bechdel-test.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author:
url: https://github.com/rnnh/
date: 03-21-2021
repository_url: https://github.com/rnnh/TidyTuesday/
preview: ../../images/bechdel-test-1.gif
preview: bechdel-test_files/figure-html5/figure1-1.gif
output:
distill::distill_article:
self_contained: false
Expand Down Expand Up @@ -82,9 +82,6 @@ p <- ratings_by_year %>%
# Rendering the animation as a .gif
animate(p, nframes = 400, fps = 20, renderer = magick_renderer())
# Saving the .gif
gganimate::anim_save("../../images/bechdel-test-1.gif")
```

## Plotting the directors most likely to pass/fail the Bechdel Test
Expand Down Expand Up @@ -141,9 +138,6 @@ results_by_director %>%
labs(x = "term frequency–inverse document frequency (tf-idf)", y = NULL) +
labs(title = "Directors most likely to Pass/Fail the Bechdel Test") +
theme_bw()
# Saving the plot
ggsave("../../images/bechdel-test-2.png")
```

## Plotting the writers most likely to pass/fail the Bechdel Test
Expand Down Expand Up @@ -198,7 +192,4 @@ results_by_writer %>%
labs(x = "term frequency–inverse document frequency (tf-idf)", y = NULL) +
labs(title = "Writers most likely to Pass/Fail the Bechdel Test") +
theme_bw()
# Saving the plot
ggsave("../../images/bechdel-test-3.png")
```
55 changes: 16 additions & 39 deletions _posts/2021-03-21-bechdel-test/bechdel-test.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author:
url: https://github.com/rnnh/
date: 03-23-2021
repository_url: https://github.com/rnnh/TidyTuesday/
preview: ../../images/video-games-and-sliced-1.png
preview: video-games-and-sliced_files/figure-html5/figure1-1.png
output:
distill::distill_article:
self_contained: false
Expand Down Expand Up @@ -56,11 +56,6 @@ games %>%
colour = "Game")
```

```{r, include=FALSE}
# Saving the last plot to use as the preview image for this post
ggsave("../../images/video-games-and-sliced-1.png")
```

## Combining "year" and "month" into a new variable

Combining the `year` and `month` variables makes it easier to track when each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
code span.al { color: #ad0000; } /* Alert */
code span.an { color: #5e5e5e; } /* Annotation */
code span.at { color: #20794d; } /* Attribute */
code span.at { } /* Attribute */
code span.bn { color: #ad0000; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007ba5; } /* ControlFlow */
Expand All @@ -76,7 +76,7 @@
code span.op { color: #5e5e5e; } /* Operator */
code span.ot { color: #007ba5; } /* Other */
code span.pp { color: #ad0000; } /* Preprocessor */
code span.sc { color: #20794d; } /* SpecialChar */
code span.sc { color: #5e5e5e; } /* SpecialChar */
code span.ss { color: #20794d; } /* SpecialString */
code span.st { color: #20794d; } /* String */
code span.va { color: #111111; } /* Variable */
Expand Down Expand Up @@ -110,12 +110,12 @@
<!--radix_placeholder_rmarkdown_metadata-->

<script type="text/json" id="radix-rmarkdown-metadata">
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","date","repository_url","preview","output"]}},"value":[{"type":"character","attributes":{},"value":["Video Games and Sliced"]},{"type":"character","attributes":{},"value":["Graphs and analysis using the #TidyTuesday data set for week 12 of 2021\n (16/3/2021): \"Video Games and Sliced\"\n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Ronan Harrington"]},{"type":"character","attributes":{},"value":["https://github.com/rnnh/"]}]}]},{"type":"character","attributes":{},"value":["03-23-2021"]},{"type":"character","attributes":{},"value":["https://github.com/rnnh/TidyTuesday/"]},{"type":"character","attributes":{},"value":["../../images/video-games-and-sliced-1.png"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained","toc"]}},"value":[{"type":"logical","attributes":{},"value":[false]},{"type":"logical","attributes":{},"value":[true]}]}]}]}
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","date","repository_url","preview","output"]}},"value":[{"type":"character","attributes":{},"value":["Video Games and Sliced"]},{"type":"character","attributes":{},"value":["Graphs and analysis using the #TidyTuesday data set for week 12 of 2021\n (16/3/2021): \"Video Games and Sliced\"\n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Ronan Harrington"]},{"type":"character","attributes":{},"value":["https://github.com/rnnh/"]}]}]},{"type":"character","attributes":{},"value":["03-23-2021"]},{"type":"character","attributes":{},"value":["https://github.com/rnnh/TidyTuesday/"]},{"type":"character","attributes":{},"value":["video-games-and-sliced_files/figure-html5/figure1-1.png"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained","toc"]}},"value":[{"type":"logical","attributes":{},"value":[false]},{"type":"logical","attributes":{},"value":[true]}]}]}]}
</script>
<!--/radix_placeholder_rmarkdown_metadata-->

<script type="text/json" id="radix-resource-manifest">
{"type":"character","attributes":{},"value":["video-games-and-sliced_files/anchor-4.2.2/anchor.min.js","video-games-and-sliced_files/bowser-1.9.3/bowser.min.js","video-games-and-sliced_files/distill-2.2.21/template.v2.js","video-games-and-sliced_files/figure-html5/figure1-1.png","video-games-and-sliced_files/figure-html5/figure2-1.png","video-games-and-sliced_files/header-attrs-2.7/header-attrs.js","video-games-and-sliced_files/jquery-1.11.3/jquery.min.js","video-games-and-sliced_files/popper-2.6.0/popper.min.js","video-games-and-sliced_files/tippy-6.2.7/tippy-bundle.umd.min.js","video-games-and-sliced_files/tippy-6.2.7/tippy-light-border.css","video-games-and-sliced_files/tippy-6.2.7/tippy.css","video-games-and-sliced_files/tippy-6.2.7/tippy.umd.min.js","video-games-and-sliced_files/webcomponents-2.0.0/webcomponents.js"]}
{"type":"character","attributes":{},"value":["video-games-and-sliced_files/anchor-4.2.2/anchor.min.js","video-games-and-sliced_files/bowser-1.9.3/bowser.min.js","video-games-and-sliced_files/distill-2.2.21/template.v2.js","video-games-and-sliced_files/figure-html5/figure1-1.png","video-games-and-sliced_files/figure-html5/figure2-1.png","video-games-and-sliced_files/header-attrs-2.7/header-attrs.js","video-games-and-sliced_files/header-attrs-2.9.1/header-attrs.js","video-games-and-sliced_files/jquery-1.11.3/jquery.min.js","video-games-and-sliced_files/popper-2.6.0/popper.min.js","video-games-and-sliced_files/tippy-6.2.7/tippy-bundle.umd.min.js","video-games-and-sliced_files/tippy-6.2.7/tippy-light-border.css","video-games-and-sliced_files/tippy-6.2.7/tippy.css","video-games-and-sliced_files/tippy-6.2.7/tippy.umd.min.js","video-games-and-sliced_files/webcomponents-2.0.0/webcomponents.js"]}
</script>
<!--radix_placeholder_navigation_in_header-->
<!--/radix_placeholder_navigation_in_header-->
Expand Down Expand Up @@ -1262,7 +1262,10 @@

// hoverable references
$('span.citation[data-cites]').each(function() {
var refHtml = $('#ref-' + $(this).attr('data-cites')).html();
var refs = $(this).attr('data-cites').split(" ");
var refHtml = refs.map(function(ref) {
return "<p>" + $('#ref-' + ref).html() + "</p>";
}).join("\n");
window.tippy(this, {
allowHTML: true,
content: refHtml,
Expand Down Expand Up @@ -1433,7 +1436,7 @@
</script>

<!--/radix_placeholder_distill-->
<script src="video-games-and-sliced_files/header-attrs-2.7/header-attrs.js"></script>
<script src="video-games-and-sliced_files/header-attrs-2.9.1/header-attrs.js"></script>
<script src="video-games-and-sliced_files/jquery-1.11.3/jquery.min.js"></script>
<script src="video-games-and-sliced_files/popper-2.6.0/popper.min.js"></script>
<link href="video-games-and-sliced_files/tippy-6.2.7/tippy.css" rel="stylesheet" />
Expand Down Expand Up @@ -1493,12 +1496,10 @@ <h2 id="setup">Setup</h2>
<p>Loading the <code>R</code> libraries and <a href="https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-16/readme.md">data set</a>.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
Show code
</summary>
<summary>Show code</summary>
<div class="sourceCode">
<pre class="sourceCode r"><code class="sourceCode r"><span class='co'># Loading libraries</span>
<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='http://tidyverse.tidyverse.org'>tidyverse</a></span><span class='op'>)</span>
<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://tidyverse.tidyverse.org'>tidyverse</a></span><span class='op'>)</span>

<span class='co'># Reading in the raw data from GitHub (I would use "tt_load", but I hit an API</span>
<span class='co'># rate limt)</span>
Expand All @@ -1511,9 +1512,7 @@ <h2 id="plotting-peak-vs.-average-number-of-players-using-200-observations">Plot
<p>For this plot, the top 200 observations for average number of players at the same time are selected using <code>slice_max(order_by = avg, n = 200)</code>. The peak and average number of players for these observations are plotted on a scatter plot. The colour of the points indicates the game used for each observation. Models are fit to illustrate trends in the data; these trends follow the featured three games. The game “Cyberpunk 2077” was filtered out before creating this plot, as it occurred in only one of the 200 observations.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
Show code
</summary>
<summary>Show code</summary>
<div class="sourceCode">
<pre class="sourceCode r"><code class="sourceCode r"><span class='va'>games</span> <span class='op'>%&gt;%</span>
<span class='fu'>select</span><span class='op'>(</span><span class='va'>gamename</span>, <span class='va'>avg</span>, <span class='va'>peak</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
Expand All @@ -1539,9 +1538,7 @@ <h2 id="combining-year-and-month-into-a-new-variable">Combining “year” and
<p>Combining the <code>year</code> and <code>month</code> variables makes it easier to track when each observation was recorded. Creating this new <code>year_month</code> variable using the <code>as.date()</code> function from <code>{lubridate}</code> ensures that it will be interpreted as a date.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
Show code
</summary>
<summary>Show code</summary>
<div class="sourceCode">
<pre class="sourceCode r"><code class="sourceCode r"><span class='co'># Creating a "year_month" variable with the year and month of each observation</span>
<span class='co'># using the lubridate "as_date()" function, by pasting together...</span>
Expand Down Expand Up @@ -1580,9 +1577,7 @@ <h2 id="plotting-the-monthly-player-gains-and-losses-for-three-of-the-most-popul
<p>This plot uses the <code>year_month</code> variable on the x-axis and the <code>gain</code> variable on the y-axis to illustrate month-to-month gains and losses in average players. The three games used share the majority of the highest <code>avg</code> (average number of simultaenous players) values in the data set. This graph is faceted for each game. To put these gains and losses into perspective, dashed lines are added at plus and minus 100,000 players in each facet.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
Show code
</summary>
<summary>Show code</summary>
<div class="sourceCode">
<pre class="sourceCode r"><code class="sourceCode r"><span class='va'>games</span> <span class='op'>%&gt;%</span>
<span class='co'># Selecting the variables</span>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
Loading

0 comments on commit 3608329

Please sign in to comment.