Skip to content

Commit

Permalink
polling places, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hardin47 committed Jan 24, 2024
1 parent 91d2ad9 commit a7d7920
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 461,496 deletions.
4 changes: 2 additions & 2 deletions 2024-01-16/polling.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1 class="title">Polling Places</h1>
<h2 class="anchored" data-anchor-id="the-data">The Data</h2>
<p>The <a href="https://github.com/PublicI/us-polling-places">dataset</a> comes from <a href="https://publicintegrity.org/">The Center for Public Integrity</a>. Each row represents a US polling place (location to vote in an election) across many elections from 2012 to 2020.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>polling <span class="ot">&lt;-</span> <span class="fu">read_csv</span>(<span class="st">"polling_places.csv"</span>) <span class="sc">|&gt;</span></span>
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>polling <span class="ot">&lt;-</span> readr<span class="sc">::</span><span class="fu">read_csv</span>(<span class="st">'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-01-16/polling_places.csv'</span>) <span class="sc">|&gt;</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">year =</span> <span class="fu">year</span>(election_date),</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="at">name =</span> <span class="fu">tolower</span>(name),</span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="at">address =</span> <span class="fu">tolower</span>(address))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down Expand Up @@ -215,7 +215,7 @@ <h2 class="anchored" data-anchor-id="where-did-people-poll">Where did people pol
<div class="cell">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">praise</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] "You are solid!"</code></pre>
<pre><code>[1] "You are magnificent!"</code></pre>
</div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion 2024-01-16/polling.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ library(paletteer)
The [dataset](https://github.com/PublicI/us-polling-places) comes from [The Center for Public Integrity](https://publicintegrity.org/). Each row represents a US polling place (location to vote in an election) across many elections from 2012 to 2020.

```{r}
polling <- read_csv("polling_places.csv") |>
polling <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-01-16/polling_places.csv') |>
mutate(year = year(election_date),
name = tolower(name),
address = tolower(address))
Expand Down
Loading

0 comments on commit a7d7920

Please sign in to comment.