<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Silvia Canelón</title>
<link>https://silviacanelon.com/blog/</link>
<atom:link href="https://silviacanelon.com/blog/index.xml" rel="self" type="application/rss+xml"/>
<description>This is my blog where I practice sharing my curiosity about R.&lt;br&gt;
It includes notes and tutorials for my future self and hopefully also for you.&lt;br&gt;&lt;br&gt;
{{&lt; fa envelope &gt;}} Sign up for my [newsletter](/contact.html#buttondown) to receive updates about new posts.
</description>
<generator>quarto-1.9.36</generator>
<lastBuildDate>Fri, 29 Sep 2023 04:00:00 GMT</lastBuildDate>
<item>
  <title>Hello Quarto: Porting my Website from Hugo Apéro</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2023-09-29-hello-quarto/</link>
  <description><![CDATA[ <!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html --><!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
--><!-- <header id="title-block-header" class="quarto-title-block default page-columns"> --><!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> --><section id="goodbye-hugo-apéro" class="level2"><h2 class="anchored" data-anchor-id="goodbye-hugo-apéro">Goodbye, Hugo Apéro</h2>
<p>In 2019 I created my first website using blogdown and the <a href="https://hugo-academic--silvia.netlify.app/">Hugo Academic theme</a>, and in 2021 I migrated that site to the <a href="https://hugo-apero--silvia.netlify.app/">Hugo Apéro theme</a> created by Alison Hill. I even <a href="../2021-06-01-hello-hugo-apero/">documented that trek in great detail 😅</a> to provide something resembling a paved path for others to use on their journey adopting this beautiful and functional theme. Over the past two years, my Apéro site became a wonderful place to cultivate a <a href="https://youtu.be/E5ERSfydB30?feature=shared&amp;t=694">digital garden</a><sup>1</sup>. Now the time has come to say thank you, say goodbye, and travel down a new path. Enter Quarto.</p>
</section><section id="why-port-to-quarto" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="why-port-to-quarto">Why port to Quarto?</h2>
<p><a href="https://quarto.org">Quarto</a> is a new and powerful technical publishing system in active development, natively friendly to a variety of programming languages and IDEs. There are countless features available in Quarto that I was interested in having access to in my website, so I’ll list just my top five:</p>
<ol type="1">
<li><p><strong>Flexibility in design.</strong> Quarto offers options for website navigation (top navigation vs.&nbsp;side navigation), “about” pages like the <a href="https://github.com/seankross/postcards#the-templates">postcard landing pages</a> that a lot of folks use in their distill sites, listing pages that are generated from a list of documents, among others. These components would act like modules that I could combine to design a site that truly fit my needs.</p></li>
<li><p><strong>Flexibility in content layout.</strong> With Quarto I would gain the ability to organize content in ways I hadn’t even dreamt of. Tables and figures could be laid out across multiple columns and rows as sub-tables and sub-figures of a panel. How much of the page the content took up would be up to me. Content could even go in the margin! 🤩 </p></li>
<li><p><strong>Freezing computations.</strong> Quarto would give me the option to <a href="https://quarto.org/docs/websites/website-blog.html#freezing-posts">freeze posts</a> containing executable code. This was huge for me, because updating my blogdown site always produced a little bit of anxiety. I used to worry that blogdown might try to re-render old R Markdown blog posts and break things! 😱</p></li>
<li><p><strong>Site search.</strong> With content spread out over blog posts, talks, publications, and projects, I wanted site visitors (including myself!) to be able to keyword search for something in particular. Tags and categories in blogdown would get me part of the way there, but Quarto offers built-in search capability.</p></li>
<li><p><strong>Embedding computations.</strong> Ok this is a feature that I learned about a week ago at posit::conf(2023) from Mine Çetinkaya-Rundel’s talk “Reproducible Manuscripts with Quarto.” Mine demo’d pulling a table from a <code>.qmd</code> file and a figure from an <code>.ipynb</code> file into the same manuscript <code>.qmd</code> file, <em>without having to execute the source code again</em>! 👀 This is a game changer for anyone compiling results from computations performed in different files, and in my personal site I could see it coming in handy if I have a series of blog posts with outputs that I want to cross-reference. Currently we can only embed computations from Jupyter notebook files, but hopefully we’ll be able to embed <code>.qmd</code> computations in Quarto v1.4! 🤞🏽</p></li>
</ol><div class="no-row-height column-margin column-container"><span class="margin-aside">I mean, it’s pretty cool that content can go in the margin, right?? <br><br> It could even be a picture: <br><br><img src="https://silviacanelon.com/blog/2023-09-29-hello-quarto/featured.jpg" class="img-fluid" alt="There is a book open in the green grass with some yellow leaves around it"><br>The book page reads <em>verdere expedities</em> which is Dutch for “further expeditions”</span></div></section><section id="the-cost-of-porting" class="level2"><h2 class="anchored" data-anchor-id="the-cost-of-porting">The cost of porting</h2>
<p>Gaining the aforementioned Quarto functionality did not come without a cost. To me, the biggest cost was the aesthetics – the Hugo Apéro theme is quite lovely! – but I customized my Quarto site enough to reflect the design aspects I loved the most. More on styling later. Some other costs included:</p>
<ul>
<li>
<p><strong>Loss of the sidebar layout.</strong> The Apéro theme has options for adding a nicely styled sidebar that I had been using for my blog. It included a featured image and details about the individual post like tags, categories, length, etc. All of this information is available in Quarto posts, it’s just organized a little differently.</p>
<details><summary><p>Example of the sidebar</p>
</summary><p><a href="img/blog-sidebar-2.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://silviacanelon.com/blog/2023-09-29-hello-quarto/img/blog-sidebar-2.png" class="img-fluid" alt="Post title, author, date, and some content on the left hand side, and a sidebar with metadata on the right hand side. The image featured in the sidebar is a cactus plant in a terracota planter, sitting on top of a pile of books"></a></p>
</details>
</li>
<li>
<p><strong>Loss of Utterances comments.</strong> Any interactions with folks through Utteranc.es comments did not transfer over, and I’ll miss them. The few comments on my site have been very kind (see example below) and I’ve really enjoy reading them!</p>
<details><summary><p>Example of Utterances comments</p>
</summary><p><a href="img/utterances.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><img src="https://silviacanelon.com/blog/2023-09-29-hello-quarto/img/utterances.png" class="img-fluid" alt="User @capolimia says 'Thank you so much!!!!!! This project last year helped me have a great summer, I appreciate your work!!!' and I respond 'Hi @capolimia, thank you for this comment! I don't how how I missed it. I'm happy to hear that the 2022 post was helpful to you! 🚀'"></a></p>
</details><div class="callout callout-style-simple callout-note callout-titled">
<div class="callout-header d-flex align-content-center" data-bs-toggle="collapse" data-bs-target=".callout-1-contents" aria-controls="callout-1" aria-expanded="true" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Update: Oct.&nbsp;12, 2023
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
<div id="callout-1" class="callout-1-contents callout-collapse collapse show">
<div class="callout-body-container callout-body">
<p>Thanks to Emily Riederer, I’m happy to report this is a non-issue! See her tips in the comments at the end of the post, or <a href="https://github.com/spcanelon/silvia/issues/100#issuecomment-1753438790">on GitHub</a>.</p>
</div>
</div>
</div>
</li>
<li><p><strong>Hugo Apéro collections.</strong> The Apéro theme had a way of bundling together posts that were related into a collection of posts. Garrick and I used this feature for our <a href="../../talk/2021-07-07-presentable-user2021/">user!2021 xaringan workshop</a> and it worked well to organize learning materials for different sections of our workshop. If I wanted something like this in the future, I would probably use Quarto’s sidebar navigation feature like Andrew Bray did in his <a href="https://rstudio-conf-2022.github.io/rmd-to-quarto/materials/">Rmd to Quarto workshop</a> for rstudio::conf(2022).</p></li>
<li><p><strong>Name pronunciation on the About page.</strong> Apéro had a built-in option for adding an audio clip under your name that you could use to help people learn how your name is pronounced. I never used this feature myself, but if I wanted to, I could look to <a href="https://github.com/EmilHvitfeldt/emilhvitfeldt.com/blob/main/about.qmd#L20-L24">Emil Hvitfeldt’s site</a> as an example.</p></li>
<li><p><strong>Redirects.</strong> The Apéro theme gave me the option to define the combination of date information and URL slugs for each of my posts, and I had them set up as <strong>year-slug</strong> (e.g., blog/2023-hello-quarto). Quarto does not offer that functionality and strictly creates URLs for posts based on the filepath (e.g., blog/2023-09-29-hello-quarto). In order to continue using my <strong>year-month-day-slug</strong> naming convention for my post folders, I had to set up redirects from the old URLs to the new ones so that there wouldn’t be broken links sprinkled throughout the internet. More on redirects later.</p></li>
</ul></section><section id="designing-the-site" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="designing-the-site">Designing the site</h2>
<p>Apéro had posts in the <code>content</code> folder but with Quarto I could pull blog, talk, publication, and project subfolders into the root folder.</p>
<section id="structure" class="level3"><h3 class="anchored" data-anchor-id="structure">Structure</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-1-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-1" aria-controls="tabset-1-1" aria-selected="true" href="">Quarto</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-2" aria-controls="tabset-1-2" aria-selected="false" href="">Hugo Apéro</a></li>
</ul>
<div class="tab-content">
<div id="tabset-1-1" class="tab-pane active" aria-labelledby="tabset-1-1-tab">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">.</span></span>
<span id="cb1-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> _quarto.yml</span>
<span id="cb1-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> about</span>
<span id="cb1-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> blog</span>
<span id="cb1-5"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> talk</span>
<span id="cb1-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> publication</span>
<span id="cb1-7"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> project</span>
<span id="cb1-8"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> index.qmd</span>
<span id="cb1-9"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> silvia.Rproj</span></code></pre></div></div>
</div>
<div id="tabset-1-2" class="tab-pane" aria-labelledby="tabset-1-2-tab">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">.</span></span>
<span id="cb2-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> content</span>
<span id="cb2-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── _index.md</span>
<span id="cb2-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── about    </span>
<span id="cb2-5"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── blog      </span>
<span id="cb2-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── project</span>
<span id="cb2-7"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── publication</span>
<span id="cb2-8"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   └── talk</span>
<span id="cb2-9"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> config.toml</span>
<span id="cb2-10"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> netlify.toml</span>
<span id="cb2-11"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> index.Rmd</span>
<span id="cb2-12"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> silvia.Rproj</span></code></pre></div></div>
</div>
</div>
</div>
</section><section id="about-listing-pages" class="level3 page-columns page-full"><h3 class="anchored" data-anchor-id="about-listing-pages">About &amp; listing pages</h3>
<div class="page-columns page-full"><p>I decided to use a combination of <a href="https://quarto.org/docs/websites/website-about.html">about pages</a> and <a href="https://quarto.org/docs/websites/website-listings.html">listing pages</a> to replicate the site structure I enjoyed in my Apéro site. I used an about page layout for both my home and about pages, and listing pages to generate a list of blog posts, talks, publications, and projects. There was also some custom CSS involved, but we haven’t gotten to that part of the blog post yet wink 😉 </p><div class="no-row-height column-margin column-container"><span class="margin-aside">Dear reader, it’s at this point in my blog post drafting that I start realizing that what was meant to be a brief post is turning into a novel (<em>sigh</em>)</span></div></div>
<p>One of the aspects I liked about my Apéro site was that the About page highlighted the most recent posts from the blog, talk, publication, and project groups. In my Quarto site, I achieved this by including a one-entry listing grid for each group on my <a href="../../about/index.html">About page</a>.</p>
<div class="callout callout-style-simple callout-caution callout-titled">
<div class="callout-header d-flex align-content-center collapsed" data-bs-toggle="collapse" data-bs-target=".callout-2-contents" aria-controls="callout-2" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Caution</span>CSS tip
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
<div id="callout-2" class="callout-2-contents callout-collapse collapse">
<div class="callout-body-container callout-body">
<p>These listing cards looked great on a wide screen but as the screen got narrower (think mobile device) the listing cards just became narrower and narrower 😂. I took care of this by tweaking the CSS so that the cards would wrap.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>assets/about.css</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" data-filename="assets/about.css" data-startfrom="63" style="background: #f1f3f5;"><pre class="sourceCode css code-with-copy"><code class="sourceCode css" style="counter-reset: source-line 62;"><span id="cb3-63">  <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#about-me</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.grid</span> {</span>
<span id="cb3-64">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">display</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">flex</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-65">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">flex-wrap</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">wrap</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-66">  }</span>
<span id="cb3-67"></span>
<span id="cb3-68">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/* wrap lately section */</span></span>
<span id="cb3-69">  <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#lately</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.grid</span> {</span>
<span id="cb3-70">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">display</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">flex</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-71">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">flex-wrap</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">wrap</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-72">  }</span></code></pre></div></div>
</div>
<p><a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/assets/about.css#L63-L72"><i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i> source code</a></p>
</div>
</div>
</div>
</section><section id="contact-form" class="level3"><h3 class="anchored" data-anchor-id="contact-form">Contact form</h3>
<p>The last structural piece I wanted to recreate from Apéro was a <a href="../../contact.html">contact form</a>. I saw a great example on Michael McCarthy’s <a href="https://tidytales.ca/about/">Tidy Tales blog</a>, site and did a little <a href="https://github.com/mccarthy-m-g/tidytales/blob/main/about/index.qmd#L24-L46">repo-diving</a> to get ideas on how to organize the content. I ended up using the <a href="https://quarto.org/docs/output-formats/page-layout.html#css-grid">Bootstrap CSS Grid</a> to layout the content exactly how I wanted to. See what I mean about Quarto offering a lot of flexibility in content layout?</p>
<div class="callout callout-style-simple callout-tip callout-titled">
<div class="callout-header d-flex align-content-center collapsed" data-bs-toggle="collapse" data-bs-target=".callout-3-contents" aria-controls="callout-3" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Bones of the contact page
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
<div id="callout-3" class="callout-3-contents callout-collapse collapse">
<div class="callout-body-container callout-body">
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>contact.qmd</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" data-filename="contact.qmd" style="background: #f1f3f5;"><pre class="sourceCode html code-with-copy"><code class="sourceCode html"><span id="cb4-1"></span>
<span id="cb4-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;!-- start grid --&gt;</span></span>
<span id="cb4-3">::: {.grid} </span>
<span id="cb4-4"></span>
<span id="cb4-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;!-- column for the body text --&gt;</span></span>
<span id="cb4-6">::: {.g-col-5}</span>
<span id="cb4-7"></span>
<span id="cb4-8"># Send me a note</span>
<span id="cb4-9"></span>
<span id="cb4-10"><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span> Body text&gt;</span>
<span id="cb4-11"></span>
<span id="cb4-12"><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span> HTML code for social media icons &gt;</span>
<span id="cb4-13"></span>
<span id="cb4-14">:::</span>
<span id="cb4-15"></span>
<span id="cb4-16"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;!-- column for spacing --&gt;</span></span>
<span id="cb4-17">::: {.g-col-1}</span>
<span id="cb4-18">:::</span>
<span id="cb4-19"></span>
<span id="cb4-20"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;!-- column for the form --&gt;</span></span>
<span id="cb4-21">::: {.g-col-6}</span>
<span id="cb4-22"></span>
<span id="cb4-23"><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span> HTML embed code provided by Formspree &gt;</span>
<span id="cb4-24"></span>
<span id="cb4-25">:::</span>
<span id="cb4-26"></span>
<span id="cb4-27">:::</span>
<span id="cb4-28"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;!-- end grid --&gt;</span></span></code></pre></div></div>
</div>
<p><a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/contact.qmd#L18-L60"><i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i> source code</a></p>
</div>
</div>
</div>
</section></section><section id="adapting-old-posts" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="adapting-old-posts">Adapting old posts</h2>
<section id="yaml-fields" class="level3"><h3 class="anchored" data-anchor-id="yaml-fields">YAML fields</h3>
<p>Ok so once I figured out how to incorporate all of the structural elements I wanted, I had to deal with the (relatively small) challenge of porting my old posts to Quarto. Quarto was designed to be compatible with existing R Markdown documents, but I didn’t actually want it trying to re-render old R Markdown files so I had Quarto ignore those completely<sup>2</sup> and render the Markdown version of each post instead<sup>3</sup>. There were also a handful of YAML fields that I had to remove or modify to play nicely with Quarto:</p>
<ul>
<li>Remove <code>layout:</code> (e.g., <code>layout: single-sidebar</code>)</li>
<li>Remove <code>publishDate</code>
</li>
<li>Remove <code>lastUpdated</code>
</li>
<li>Remove <code>featured</code> (e.g., <code>featured: yes</code>)</li>
<li>Merge <code>categories</code> with <code>tags</code> and keep <code>tags</code>
</li>
<li>Add <code>image</code> (e.g.&nbsp;<code>image: featured.png</code>)</li>
</ul></section><section id="partials" class="level3 page-columns page-full"><h3 class="anchored" data-anchor-id="partials">Partials</h3>
<p>If you’ve used Apéro you might have come to love the cute button links created from the <code>links</code> field in the YAML, like the one at the top of this post, pointing to the Quarto docs.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb5-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">links</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span></span>
<span id="cb5-2"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">icon</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> journal-text</span></span>
<span id="cb5-3"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">name</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Quarto Docs</span></span>
<span id="cb5-4"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">url</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> https://quarto.org/docs/websites/</span></span></code></pre></div></div>
<p>Well, these button links are not ready-made by Quarto, but lucky for me (us!), Garrick figured out a way to bring them in right where we I need them. I repo-dived and found that he modified an <a href="https://quarto.org/docs/journals/templates.html#html-partials">HTML partial for title blocks</a>, which controls the layout and styling of the post title, description, and tags, shown at the top of the page.</p>
<p>The original title block partial has sections controlling the placement and styling of text provided in the title, subtitle, authors, date, and abstract fields of the document YAML.</p>
<div class="page-columns page-full"><p></p><div class="no-row-height column-margin column-container"><span class="margin-aside">As an example, line 2 might read:<br>If there’s something in the <strong>title</strong> field of the YAML, give it a level 1 heading and style it with CSS class <code>.title</code></span></div></div>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>github.com/quarto-dev/quarto-cli/src/resources/formats/html/pandoc/title-block.html</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" data-filename="github.com/quarto-dev/quarto-cli/src/resources/formats/html/pandoc/title-block.html" style="background: #f1f3f5;"><pre class="sourceCode numberSource html number-lines code-with-copy"><code class="sourceCode html"><span id="cb6-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">header</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title-block-header"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-2">$if(title)$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">h1</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$title$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">h1</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$endif$</span>
<span id="cb6-3">$if(subtitle)$</span>
<span id="cb6-4"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$subtitle$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-5">$endif$</span>
<span id="cb6-6">$for(author)$</span>
<span id="cb6-7"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"author"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$author$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-8">$endfor$</span>
<span id="cb6-9"></span>
<span id="cb6-10">$if(date)$</span>
<span id="cb6-11"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"date"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$date$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">p</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-12">$endif$</span>
<span id="cb6-13">$if(abstract)$</span>
<span id="cb6-14"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"abstract"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-15"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"abstract-title"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$abstract-title$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-16">$abstract$</span>
<span id="cb6-17"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb6-18">$endif$</span>
<span id="cb6-19"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">header</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span></code></pre></div></div>
</div>
<p>The <a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/_partials/title-block-link-buttons/title-block.html">modified partial <i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i></a> includes some additional sections but I’ll break down the one for links.</p>
<div class="page-columns page-full"><p></p><div class="no-row-height column-margin column-container"><span class="margin-aside">There’s more styling going on in the modified partial, but starting on line 6, the structure for the link buttons is effectively:<br><br>If the <strong>links</strong> field is populated in the YAML, create an HTML container styled by some CSS, and give it some specific HTML properies.<br><br>Then, for each sub-item of the <strong>links</strong> field: create a hyperlink from the <strong>url</strong> sub-item, apply some CSS classes to create the button, add a Bootstrap icon defined by the <strong>icon</strong> sub-item, and finally add hyperlink text defined by the <strong>name</strong> sub-item.</span></div></div>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>_partials/title-block-link-buttons/title-block.html</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" data-filename="_partials/title-block-link-buttons/title-block.html" style="background: #f1f3f5;"><pre class="sourceCode numberSource html number-lines code-with-copy"><code class="sourceCode html"><span id="cb7-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">header</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title-block-header"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"quarto-title-block default page-columns"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb7-2">...</span>
<span id="cb7-3">$if(links)$</span>
<span id="cb7-4"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"mt-4 d-flex flex-row flex-wrap gap-1 justify-content-left justify-content-sm-start"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> role</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"group"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> aria-label</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Links"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb7-5">$for(links)$</span>
<span id="cb7-6"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">a</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> href</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"$links.url$"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"btn btn-secondary text-capitalize"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">i</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bi bi-$links.icon$ me-1"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">i</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>$links.name$<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">a</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb7-7">$endfor$</span>
<span id="cb7-8"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb7-9">$endif$</span>
<span id="cb7-10">...</span>
<span id="cb7-11"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">header</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span></code></pre></div></div>
</div>
</section></section><section id="styling-the-site" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="styling-the-site">Styling the site</h2>
<section id="scss-variables" class="level3"><h3 class="anchored" data-anchor-id="scss-variables">SCSS variables</h3>
<p>I may have published my brand new Quarto site in the fall of 2023, but I had actually taken my first go at porting it from Apéro in the fall of 2022. In an attempt to replicate the styling of my old site I tried to strong-arm my Quarto site into using tachyons<sup>4</sup>, and I wrote <strong>way too much</strong> custom CSS in the process 😩.</p>
<p>Something didn’t feel right about it, so I took a break and came back to my in-progress Quarto site several months later – outside of the Quarto release craze, and with the perspective that I wanted to work <em>with</em> the built-in theming capabilities, rather than against them 😌. This time around I leaned into the Bootstrap SCSS variables, and added custom styling as needed.</p>
<p>To be more specific, I created a <a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/assets/silvia-theme.scss">custom theme <i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i></a><sup>5</sup>, and populated it with definitions for some of the <a href="https://quarto.org/docs/output-formats/html-themes.html#sass-variables">built-in Bootstrap Sass variables</a>. If you poke around my custom theme, you will notice that some colors are defined by color variables that start with <code>$spc-</code>. These are variables pointing to colors that I’ve defined elsewhere, and they can be replaced with a hex code of your choosing! 🎨</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>assets/silvia-theme.scss</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" data-filename="assets/silvia-theme.scss" style="background: #f1f3f5;"><pre class="sourceCode scss code-with-copy"><code class="sourceCode scss"><span id="cb8-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/*-- scss:defaults --*/</span></span>
<span id="cb8-2"></span>
<span id="cb8-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Colors</span></span>
<span id="cb8-4"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$primary</span>:                    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-primary-light</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb8-5"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$secondary</span>:                  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-secondary</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
</div>
<p>The Sass variables listed in the documentation got me pretty far, but there were still elements of my site using default colors and styling that I wanted to change. So I repo-dived to learn about additional Quarto Bootstrap variables and rules:</p>
<ul>
<li>Bootstrap variables: <a href="https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-variables.scss" class="uri">https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-variables.scss</a>
</li>
<li>Bootstrap rules: <a href="https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-rules.scss" class="uri">https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-rules.scss</a>
</li>
</ul>
<p>To give you an example, someone in the Quarto Discussions forum asked <a href="https://github.com/quarto-dev/quarto-cli/discussions/2490">how to set the color of block quotes, figure captions, and outlines</a>, something not defined in the documentation. One of the replies suggested using the browser’s inspector to find the CSS rule applied to the element in question, we’ll say the figure caption, and then looking at how Quarto implemented that rule. I’ll make that process a little more explicit here and use the figure caption as an example:</p>
<ol type="1">
<li><p>Use the browser inspector to highlight a figure caption</p></li>
<li><p>The inspector will reveal that the element is styled by CSS class <code>.figure-caption</code></p></li>
<li><p>Run a keyword search for “figure-caption” in the <a href="https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-variables.scss">Bootstrap variables file</a>. This will yield no results 🤔</p></li>
<li>
<p>Run the same keyword search in the <a href="https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/bootstrap/_bootstrap-rules.scss">Bootstrap rules file</a> – success! We have a clue, which is that <code>.figure-caption</code> is styled by a variable named <code>body-secondary</code> 🔍</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode scss code-with-copy"><code class="sourceCode scss"><span id="cb9-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.panel-caption</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb9-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.figure-caption</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb9-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.subfigure-caption</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb9-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.table-caption</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb9-5">figcaption<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.quarto-float-caption</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb9-6">caption {</span>
<span id="cb9-7">  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">font-size</span>: <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.9</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">rem</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb9-8">  <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">@include</span> body-secondary<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb9-9">}</span></code></pre></div></div>
</li>
<li>
<p>Define your own <code>body-secondary</code> color variable in your custom theme file</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>assets/custom-theme.scss</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" data-filename="assets/custom-theme.scss" style="background: #f1f3f5;"><pre class="sourceCode scss code-with-copy"><code class="sourceCode scss"><span id="cb10-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/*-- scss:defaults --*/</span></span>
<span id="cb10-2"></span>
<span id="cb10-3"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$body-secondary</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#6C757D</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
</div>
</li>
<li><p>Enjoy the fruits of your labor as a CSS detective 🕵🏽‍♀️</p></li>
</ol></section><section id="individual-page-styling" class="level3"><h3 class="anchored" data-anchor-id="individual-page-styling">Individual page styling</h3>
<p>In some cases, I wanted to style individual pages differently than I was styling my entire site. Poking around Garrick’s repo (again!), I learned that you can reference CSS stylesheets in the YAML of any particular document. I used this approach to separately style my Home, About, and listing pages.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>index.qmd</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" data-filename="index.qmd" data-startfrom="42" style="background: #f1f3f5;"><pre class="sourceCode numberSource yml number-lines code-with-copy"><code class="sourceCode yaml" style="counter-reset: source-line 41;"><span id="cb11-42"></span>
<span id="cb11-43"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">execute</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span></span>
<span id="cb11-44"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">freeze</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">false</span></span>
<span id="cb11-45"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">echo</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">false</span></span></code></pre></div></div>
</div>
<ul>
<li>
<code>index.qmd</code> <a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/index.qmd#L42-L45"><i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i> source code</a>
</li>
<li>
<code>assets/index.css</code> <a href="https://github.com/spcanelon/silvia/blob/32853dd0e70a71514b0922ee306f80ed5897f776/assets/index.css"><i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i> source code</a>
</li>
</ul></section><section id="background-image-for-title-blocks" class="level3 page-columns page-full"><h3 class="anchored" data-anchor-id="background-image-for-title-blocks">Background image for title blocks</h3>
<p>Ok one of the aesthetic pieces I was excited to add to my Quarto site that I <em>didn’t</em> have in my old site is a featured image at the top of each post. I was inspired by Matt Worthington’s site while I was reading one of his excellent blog posts on <a href="https://www.mrworthington.com/articles/rstats/mapping-in-r/">a workflow for interactive maps in R</a> – I loved that the title block included an image in the background! 🤩</p>
<p>After some web inspecting and <a href="https://github.com/mrworthington/mrworthington.github.io/blob/master/articles/rstats/mapping-in-r/page_header.css">repo-diving in Matt’s website repo</a> I came up with some styling that I could apply to the title block of each post. It took modifying the title block partial described earlier, and adding some CSS to my custom theme.</p>
<p>For styling that I wanted to apply uniformly to all post title blocks, I created a <code>.featured-image</code> CSS class in my custom theme:</p>
<div class="page-columns page-full"><p></p><div class="no-row-height column-margin column-container"><span class="margin-aside">Don’t miss the <a href="https://quarto.org/docs/authoring/code-annotation.html">code annotations</a> for this code chunk! 👀 <br>Such a cool feature!</span></div></div>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>assets/custom-theme.scss</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="annotated-cell-6" data-filename="assets/custom-theme.scss" style="background: #f1f3f5;"><pre class="sourceCode scss code-annotation-code code-with-copy code-annotated"><code class="sourceCode scss"><span id="annotated-cell-6-1">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// style background image on posts</span></span>
<span id="annotated-cell-6-2">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.featured-image</span> {</span>
<a class="code-annotation-anchor" data-target-cell="annotated-cell-6" data-target-annotation="1" onclick="event.preventDefault();">1</a><span id="annotated-cell-6-3" class="code-annotation-target">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">background-size</span>: <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">cover</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<a class="code-annotation-anchor" data-target-cell="annotated-cell-6" data-target-annotation="2" onclick="event.preventDefault();">2</a><span id="annotated-cell-6-4" class="code-annotation-target">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">background-position</span>: <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">center</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<a class="code-annotation-anchor" data-target-cell="annotated-cell-6" data-target-annotation="3" onclick="event.preventDefault();">3</a><span id="annotated-cell-6-5" class="code-annotation-target">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">color</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">white</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<a class="code-annotation-anchor" data-target-cell="annotated-cell-6" data-target-annotation="4" onclick="event.preventDefault();">4</a><span id="annotated-cell-6-6" class="code-annotation-target">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">box-shadow</span>: <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">inset</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">px</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rgba(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">38</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">66</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.75</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="annotated-cell-6-7">  }</span><div class="code-annotation-gutter-bg"></div><div class="code-annotation-gutter"></div></code></pre></div></div>
</div>
<dl class="code-annotation-container-grid">
<dt data-target-cell="annotated-cell-6" data-target-annotation="1">1</dt>
<dd>
<span data-code-cell="annotated-cell-6" data-code-lines="3" data-code-annotation="1">Have the image cover the background</span>
</dd>
<dt data-target-cell="annotated-cell-6" data-target-annotation="2">2</dt>
<dd>
<span data-code-cell="annotated-cell-6" data-code-lines="4" data-code-annotation="2">Center the image</span>
</dd>
<dt data-target-cell="annotated-cell-6" data-target-annotation="3">3</dt>
<dd>
<span data-code-cell="annotated-cell-6" data-code-lines="5" data-code-annotation="3">Make the overlaying text color white</span>
</dd>
<dt data-target-cell="annotated-cell-6" data-target-annotation="4">4</dt>
<dd>
<span data-code-cell="annotated-cell-6" data-code-lines="6" data-code-annotation="4">Add shadowing that gives the appearance of a dark overlay</span>
</dd>
</dl>
<p>Alright, but why didn’t I use a <code>background-image</code> property to define the image? If I define the background image in my <code>.featured-image</code> class then that is the image that’s going to show up in all of the posts across my site. I want the title block of each post to display the featured image belonging to each individual post. That’s where the partial comes back in.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>_partials/title-block-link-buttons/title-block.html</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" data-filename="_partials/title-block-link-buttons/title-block.html" style="background: #f1f3f5;"><pre class="sourceCode html code-with-copy"><code class="sourceCode html"><span id="cb12-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> </span></span>
<span id="cb12-2"><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title-block-header-title"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> </span></span>
<span id="cb12-3"><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"quarto-title page-columns page-full page-layout-full featured-image p-4"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> </span></span>
<span id="cb12-4"><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">style</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb12-5">...</span>
<span id="cb12-6"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">div</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span></code></pre></div></div>
</div>
<p>Along with some other CSS classes, the div container for the title block is styled with the <code>featured-image</code> class defined earlier, using the <code>class=</code> property. In addition, the div itself is styled using the <code>style=</code> property, and that’s where I defined the background image. The partial will look for a featured image of some kind either in the same folder as the post, or in the parent folder, and display it in the background of the title block.</p>
<p>This is a hacky way of getting what I really want which is for the partial to check for a featured image in the order I specify and then just stop once it finds one. As it stands right now, the styling attempts to layer on all three images, with the first image on the top and the last image on the bottom. This means that I get a warning every time I preview or render my site because the partial can’t find one or two of the other urls, but I’m ok with that!</p>
<div class="callout callout-style-simple callout-caution callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Caution</span>Example warning
</div>
</div>
<div class="callout-body-container callout-body">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb13-1">/blog/2023-09-29-hello-quarto/featured.png (404: Not Found)</span></code></pre></div></div>
</div>
</div>
</section></section><section id="setting-up-redirects" class="level2"><h2 class="anchored" data-anchor-id="setting-up-redirects">Setting up redirects</h2>
<section id="resources" class="level3"><h3 class="anchored" data-anchor-id="resources">Resources</h3>
<p>Last but not least, I can’t finish this blog post without talking about the necessary task of redirecting old Apéro URLs to new Quarto ones <sup>6</sup>. Many thanks to Danielle Navarro and Tom Mock for documenting their solutions for automatically generating a <code>_redirects</code> file with each render of the site.</p>
<ul>
<li>Danielle’s blog post: <a href="https://blog.djnavarro.net/posts/2022-04-20_porting-to-quarto/#netlify-redirects">Notes from a data witch - Porting a distill blog to quarto</a>
</li>
<li>Tom’s source code: <a href="https://github.com/jthomasmock/themockup-blog/blob/bb069ef7315ad47d877f27c5052cc886ad80818e/index.qmd#L27C1-L48C4">index.qmd - The MockUp</a>
</li>
</ul>
<p>I adapted their code to (1) fit my site, which has multiple folders of posts that all need redirects, and (2) combine these automatically generated redirects with ones I had already defined manually. I placed this code within my <a href="https://github.com/spcanelon/silvia/blob/main/index.qmd#L61-L114">home page index.qmd file <i class="fa-solid fa-code-branch" title="Git" aria-label="code-branch"></i></a> and I specified <code>freeze: false</code> in the YAML so that the code would run each time I rendered the site. The following sections will take a look at the code piece by piece.</p>
</section><section id="importing-manual-redirects" class="level3"><h3 class="anchored" data-anchor-id="importing-manual-redirects">Importing manual redirects</h3>
<p>The first step imports the manually-defined redirects that I had already been using in my old site. These redirects primarily have the task of redirecting my <code>rbind.io</code> domain to my custom domain <code>silviacanelon.com</code>.</p>
<div class="cell">
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>index.qmd</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">manual_redirects</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">readr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org/reference/read_table.html">read_table</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://here.r-lib.org/reference/here.html">here</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"static"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"_manualredirects.txt"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                    col_names <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>redirect <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">X1</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">X2</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">X3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">manual_redirects</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">manual_redirects</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirect</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">manual_redirects</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] "https://silvia.rbind.io/authors/silvia/avatar.png https://silviacanelon.com/about/sidebar/avatar.png 301!"
[2] "https://silvia.rbind.io/post/* https://silviacanelon.com/blog/:splat 301!"                                
[3] "https://silvia.rbind.io/blog/* https://silviacanelon.com/blog/:splat 301!"                                
[4] "https://silvia.rbind.io/talk/* https://silviacanelon.com/talk/:splat 301!"                                
[5] "https://silvia.rbind.io/project/* https://silviacanelon.com/project/:splat 301!"                          
[6] "http://silvia.rbind.io/* https://silviacanelon.com/:splat 301!"                                           </code></pre>
</div>
</div>
</section><section id="listing-subdirectories" class="level3"><h3 class="anchored" data-anchor-id="listing-subdirectories">Listing subdirectories</h3>
<p>The next step defines a function that obtains a list of subdirectories, iterates it over the four groups of posts in my site (blog posts, talks, publications, and projects), and compiles the files into a data frame.</p>
<div class="cell">
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>index.qmd</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># function: obtain list of post paths</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">list_paths</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.files.html">list.dirs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    path <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://here.r-lib.org/reference/here.html">here</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    full.names <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,</span>
<span>    recursive <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tibble</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tibble.tidyverse.org/reference/as_tibble.html">as_tibble_col</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>column_name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"path"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>folder <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># define post folders</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folders</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"blog"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"project"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"publication"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"talk"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># list post paths by folder</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">purrr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folders</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">list_paths</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">purrr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/reference/list_c.html">list_rbind</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell-output-display">
<div data-pagedtable="false">
  <script data-pagedtable-source="" type="application/json">
{"columns":[{"label":["path"],"name":[1],"type":["chr"],"align":["left"]},{"label":["folder"],"name":[2],"type":["chr"],"align":["left"]}],"data":[{"1":"2020-05-12-trello-to-airtable","2":"blog"},{"1":"2020-05-26-dark-mode-custom-with-atom","2":"blog"},{"1":"2020-10-07-rstudio-instructor-certification-tidyverse","2":"blog"},{"1":"2021-03-16-deploying-xaringan-slides","2":"blog"},{"1":"2021-06-01-hello-hugo-apero","2":"blog"},{"1":"2021-06-02-wave-audit-1","2":"blog"}],"options":{"columns":{"min":{},"max":[10]},"rows":{"min":[10],"max":[10]},"pages":{}}}
  </script>
</div>
</div>
</div>
</section><section id="defining-redirects" class="level3"><h3 class="anchored" data-anchor-id="defining-redirects">Defining redirects</h3>
<p>This next chunk removes the month and day from <strong>year-month-day-slug</strong> so that I’m left with shorter paths with the format <strong>year-slug</strong>, and uses these paths and the folders they are housed in to create redirects.</p>
<p>The resulting redirects will point the short <strong>year-slug</strong> link to this blog post:</p>
<p><a href="https://silviacanelon.com/blog/2023-hello-quarto" class="uri">https://silviacanelon.com/blog/2023-hello-quarto</a></p>
<p>To the longer <strong>year-month-day-slug</strong> Quarto link to this post:</p>
<p><a href="https://silviacanelon.com/blog/2023-09-29-hello-quarto" class="uri">https://silviacanelon.com/blog/2023-09-29-hello-quarto</a></p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extract short paths and create redirects</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extract the year-slugs</span></span>
<span>    short_path <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_remove.html">str_remove</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">path</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"(?!\\d{4}-)\\d{2}-\\d{2}-(?!\\d)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># create short paths</span></span>
<span>    short_path <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folder</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">short_path</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># create lines to insert to a netlify _redirect file</span></span>
<span>    redirects <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">short_path</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">folder</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">path</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div data-pagedtable="false">
  <script data-pagedtable-source="" type="application/json">
{"columns":[{"label":["path"],"name":[1],"type":["chr"],"align":["left"]},{"label":["folder"],"name":[2],"type":["chr"],"align":["left"]},{"label":["short_path"],"name":[3],"type":["chr"],"align":["left"]},{"label":["redirects"],"name":[4],"type":["chr"],"align":["left"]}],"data":[{"1":"2020-05-12-trello-to-airtable","2":"blog","3":"blog/2020-trello-to-airtable","4":"/blog/2020-trello-to-airtable /blog/2020-05-12-trello-to-airtable"},{"1":"2020-05-26-dark-mode-custom-with-atom","2":"blog","3":"blog/2020-dark-mode-custom-with-atom","4":"/blog/2020-dark-mode-custom-with-atom /blog/2020-05-26-dark-mode-custom-with-atom"},{"1":"2020-10-07-rstudio-instructor-certification-tidyverse","2":"blog","3":"blog/2020-rstudio-instructor-certification-tidyverse","4":"/blog/2020-rstudio-instructor-certification-tidyverse /blog/2020-10-07-rstudio-instructor-certification-tidyverse"},{"1":"2021-03-16-deploying-xaringan-slides","2":"blog","3":"blog/2021-deploying-xaringan-slides","4":"/blog/2021-deploying-xaringan-slides /blog/2021-03-16-deploying-xaringan-slides"},{"1":"2021-06-01-hello-hugo-apero","2":"blog","3":"blog/2021-hello-hugo-apero","4":"/blog/2021-hello-hugo-apero /blog/2021-06-01-hello-hugo-apero"},{"1":"2021-06-02-wave-audit-1","2":"blog","3":"blog/2021-wave-audit-1","4":"/blog/2021-wave-audit-1 /blog/2021-06-02-wave-audit-1"}],"options":{"columns":{"min":{},"max":[10]},"rows":{"min":[10],"max":[10]},"pages":{}}}
  </script>
</div>
</div>
</div>
</section><section id="writing-redirects-file" class="level3"><h3 class="anchored" data-anchor-id="writing-redirects-file">Writing redirects file</h3>
<p>The last step takes the <strong>redirects</strong> from the data frame produced in the previous step, combines them with the manual redirects, and writes them to a new text file <code>_redirects</code>. This file is written into the <code>_site</code> folder where my Quarto site is rendered, and where Netlify will know to find it.</p>
<div class="cell">
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>index.qmd</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extract redirects</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirects</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">posts</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirects</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># combine with manual redirects</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirects_combined</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">manual_redirects</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirects</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># write the _redirect file</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/writeLines.html">writeLines</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">redirects_combined</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://here.r-lib.org/reference/here.html">here</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"_site"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"_redirects"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</div>
</section></section><section id="fin" class="level2"><h2 class="anchored" data-anchor-id="fin">Fin</h2>
<p>Now that it’s been over a year since Quarto made its debut, there are so many wonderful blog posts walking folks through how to create a Quarto site. My hope is that the notes I took in this blog post help provide some stepping stones for folks making the transition from blogdown sites, and offer some ideas for what is possible with the flexibility of this new publishing framework. I, for one, am looking forward to growing my digital garden with Quarto tools 🌱.</p>
</section><a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section id="acknowledgments" class="level2 appendix"><h2 class="anchored quarto-appendix-heading">Acknowledgments</h2><div class="quarto-appendix-contents">
<p>Featured photo by <a href="https://unsplash.com/@anneliesgeneyn?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Annelies Geneyn</a> on <a href="https://unsplash.com/photos/bhBONc07WsI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>.</p>


</div></section><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>
<ol>
<li id="fn1"><p>See also <a href="https://www.technologyreview.com/2020/09/03/1007716/digital-gardens-let-you-cultivate-your-own-little-bit-of-the-internet/">Digital gardens let you cultivate your own little bit of the internet | MIT Technology Review</a>↩︎</p></li>
<li id="fn2"><p>By adding an underscore prefix (e.g., _index.Rmarkdown)↩︎</p></li>
<li id="fn3"><p>I.e., index.markdown↩︎</p></li>
<li id="fn4"><p>A CSS design system used in the Hugo Apéro theme: <a href="https://tachyons.io" class="uri">https://tachyons.io</a>↩︎</p></li>
<li id="fn5"><p>For more on custom theming, see <a href="https://quarto.org/docs/output-formats/html-themes.html#custom-themes">Quarto - HTML Theming</a> and <a href="https://quarto.org/docs/output-formats/html-themes-more.html">Quarto - More About Quarto Themes</a>↩︎</p></li>
<li id="fn6"><p>Don’t skip this step! People will almost certainly have shared one or more of your posts somewhere on the internet, and it helps everyone if you can point them to the right spot↩︎</p></li>
</ol></section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2023" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2023. <span>“Hello Quarto: Porting My Website from Hugo
Apéro.”</span> September 29. <a href="https://silviacanelon.com/blog/2023-09-29-hello-quarto/">https://silviacanelon.com/blog/2023-09-29-hello-quarto/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>quarto</category>
  <category>website</category>
  <guid>https://silviacanelon.com/blog/2023-09-29-hello-quarto/</guid>
  <pubDate>Fri, 29 Sep 2023 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2023-09-29-hello-quarto/featured.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Creating the Philly Center City SIPS Interactive Map</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2022-05-31-ccd-sips/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<script src="index_files/libs/clipboard-2.0.6/clipboard.min.js"></script>
<link href="index_files/libs/font-awesome-5.1.0/css/all.css" rel="stylesheet"> <link href="index_files/libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet">
<script src="index_files/libs/htmlwidgets-1.5.4/htmlwidgets.js"></script>
<script src="index_files/libs/jquery-1.12.4/jquery.min.js"></script>
<link href="index_files/libs/leaflet-1.3.1/leaflet.css" rel="stylesheet">
<script src="index_files/libs/leaflet-1.3.1/leaflet.js"></script>
<link href="index_files/libs/leafletfix-1.0.0/leafletfix.css" rel="stylesheet">
<script src="index_files/libs/proj4-2.6.2/proj4.min.js"></script>
<script src="index_files/libs/Proj4Leaflet-1.0.1/proj4leaflet.js"></script>
<link href="index_files/libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css" rel="stylesheet">
<script src="index_files/libs/leaflet-binding-2.1.1/leaflet.js"></script>
<script src="index_files/libs/leaflet-providers-1.9.0/leaflet-providers_1.9.0.js"></script>
<script src="index_files/libs/leaflet-providers-plugin-2.1.1/leaflet-providers-plugin.js"></script>
<link href="index_files/libs/leaflet-awesomemarkers-2.0.3/leaflet.awesome-markers.css" rel="stylesheet">
<script src="index_files/libs/leaflet-awesomemarkers-2.0.3/leaflet.awesome-markers.min.js"></script>
<link href="index_files/libs/fontawesome-4.7.0/font-awesome.min.css" rel="stylesheet"> <link href="index_files/libs/lfx-fullscreen-1.0.2/lfx-fullscreen-prod.css" rel="stylesheet">
<script src="index_files/libs/lfx-fullscreen-1.0.2/lfx-fullscreen-prod.js"></script>
<p>Philly’s Center City District posted a list of restaurants and bars participating in Philly’s 2022 <a href="https://centercityphila.org/explore-center-city/ccdsips">CCD Sips</a>. CCD Sips is a series of summer Wednesday evenings (4:30-7pm) filled with <strong>happy hour specials</strong>, between June 1st and August 31st.</p>
<p>I prefer to take in this information as a <strong>map</strong> instead of a list, so I scraped some information from the website and made one! You can click or tap on the circle map markers to see information about each restaurant/bar along with a direct link to their posted happy hour specials.</p>
<p>Check out the link at the top of this post for a larger version of the interactive map below. And jump down to the tutorial if you’d like to learn how I used R to build the interactive map!</p>
<!--https://dannyda.com/2021/06/09/how-to-make-html-iframe-responsive-iframe-height-equal-to-viewport-screen-height/-->
<style>
iframe {
display: block;
background: #FFFBF2;
border: none; /* Reset default border */
height: 70vh; /* Viewport-relative units */
width: 100%;
}
</style>
<iframe src="map.html" scrolling="no">
</iframe>
<section id="tutorial-start" class="level2">
<h2 class="anchored" data-anchor-id="tutorial-start">Tutorial start</h2>
<p>Aside from the <code>tidyverse</code> and <code>here</code> packages, I used a handful of R packages to bring this map project together.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 25%">
<col style="width: 61%">
<col style="width: 12%">
</colgroup>
<thead>
<tr class="header">
<th>Package</th>
<th>Purpose</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>robotstxt</code></td>
<td>Check website for scraping permissions</td>
<td>0.7.13</td>
</tr>
<tr class="even">
<td><code>rvest</code></td>
<td>Scrape the information off of the website</td>
<td>1.0.1</td>
</tr>
<tr class="odd">
<td><code>ggmap</code></td>
<td>Geocode the restaurant addresses</td>
<td>3.0.0</td>
</tr>
<tr class="even">
<td><code>leaflet</code></td>
<td>Build the interactive map</td>
<td>2.0.4.1</td>
</tr>
<tr class="odd">
<td><code>leaflet.extras</code></td>
<td>Add extra functionality to map</td>
<td>1.0.0</td>
</tr>
</tbody>
</table>
</section>
<section id="scraping-the-data" class="level2">
<h2 class="anchored" data-anchor-id="scraping-the-data">Scraping the data</h2>
<section id="checking-site-permissions" class="level3">
<h3 class="anchored" data-anchor-id="checking-site-permissions">Checking site permissions</h3>
<p>Check the site’s terms of service using the <a href="https://docs.ropensci.org/robotstxt/">robotstxt</a> package, which downloads and parses the site’s robots.txt file.</p>
<p>What I wanted to look for was whether any pages are not allowed to be crawled by bots/scrapers. In my case there weren’t any, indicated by <code>Allow: /</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">get_robotstxt</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view"</span>)</span></code></pre></div></div>
<details>
<summary>
Output
</summary>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">robots.txt</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span id="cb2-2">--------------------------------------</span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"># robots.txt overwrite by: on_suspect_content</span></span>
<span id="cb2-5"></span>
<span id="cb2-6">User-agent: *</span>
<span id="cb2-7">Allow: /</span>
<span id="cb2-8"></span>
<span id="cb2-9"></span>
<span id="cb2-10"></span>
<span id="cb2-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">events</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span id="cb2-12">--------------------------------------</span>
<span id="cb2-13"></span>
<span id="cb2-14">requested:   https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view/robots.txt </span>
<span id="cb2-15">downloaded:  https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view/robots.txt </span>
<span id="cb2-16"></span>
<span id="cb2-17">$on_not_found</span>
<span id="cb2-18">$on_not_found$status_code</span>
<span id="cb2-19"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">1</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> 404</span>
<span id="cb2-20"></span>
<span id="cb2-21"></span>
<span id="cb2-22">$on_file_type_mismatch</span>
<span id="cb2-23">$on_file_type_mismatch$content_type</span>
<span id="cb2-24"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">1</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> "text/html; charset=utf-8"</span>
<span id="cb2-25"></span>
<span id="cb2-26"></span>
<span id="cb2-27">$on_suspect_content</span>
<span id="cb2-28">$on_suspect_content$parsable</span>
<span id="cb2-29"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">1</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> FALSE</span>
<span id="cb2-30"></span>
<span id="cb2-31">$on_suspect_content$content_suspect</span>
<span id="cb2-32"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">1</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> TRUE</span>
<span id="cb2-33"></span>
<span id="cb2-34"></span>
<span id="cb2-35"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">attributes</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span id="cb2-36">--------------------------------------</span>
<span id="cb2-37"></span>
<span id="cb2-38">problems, cached, request, class</span></code></pre></div></div>
</details>
</section>
<section id="harvesting-data-from-the-first-page" class="level3">
<h3 class="anchored" data-anchor-id="harvesting-data-from-the-first-page">Harvesting data from the first page</h3>
<p>Then I used the <a href="https://rvest.tidyverse.org/index.html">rvest</a> package to scrape the information from the tables of restaurants/bars participating in CCD Sips.</p>
<p>I’ve learned that ideally you would only scrape each page once, so I checked my approach with the first page before I wrote a function to scrape the remaining pages.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># define the page</span></span>
<span id="cb3-2">url <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1"</span></span>
<span id="cb3-3"></span>
<span id="cb3-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># read the page html</span></span>
<span id="cb3-5">html1 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">read_html</span>(url)</span>
<span id="cb3-6"></span>
<span id="cb3-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extract table info</span></span>
<span id="cb3-8">table1 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb3-9">  html1 <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb3-10">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_node</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"table"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb3-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_table</span>()</span>
<span id="cb3-12">table1 <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> kableExtra<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>()</span></code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align:left;">
Name
</th>
<th style="text-align:left;">
Address
</th>
<th style="text-align:left;">
Phone
</th>
<th style="text-align:left;">
CCD SIPS Specials
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
1225 Raw Sushi and Sake Lounge
</td>
<td style="text-align:left;">
1225 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.238.1903
</td>
<td style="text-align:left;">
CCD SIPS Specials
</td>
</tr>
<tr>
<td style="text-align:left;">
1518 Bar and Grill
</td>
<td style="text-align:left;">
1518 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
267.639.6851
</td>
<td style="text-align:left;">
CCD SIPS Specials
</td>
</tr>
<tr>
<td style="text-align:left;">
Air Grille Garden at Dilworth Park
</td>
<td style="text-align:left;">
1 S 15th St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.587.2761
</td>
<td style="text-align:left;">
CCD SIPS Specials
</td>
</tr>
</tbody>
</table>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extract hyperlinks to specific restaurant/bar specials</span></span>
<span id="cb4-2">links <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb4-3">  html1 <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb4-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_elements</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">".o-table__tag.ccd-text-link"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb4-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_attr</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"href"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb4-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_tibble</span>()</span>
<span id="cb4-7">links <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> kableExtra<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>()</span></code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align:left;">
value
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
#1225-raw-sushi-and-sake-lounge
</td>
</tr>
<tr>
<td style="text-align:left;">
#1518-bar-and-grill
</td>
</tr>
<tr>
<td style="text-align:left;">
#air-grill-garden-dilworth-park
</td>
</tr>
</tbody>
</table>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add full hyperlinks to the table info</span></span>
<span id="cb5-2">table1Mod <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span></span>
<span id="cb5-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">bind_cols</span>(table1, links) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb5-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Specials =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(url, value)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb5-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">CCD SIPS Specials</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, value))</span>
<span id="cb5-6">table1Mod <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> kableExtra<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>()</span></code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align:left;">
Name
</th>
<th style="text-align:left;">
Address
</th>
<th style="text-align:left;">
Phone
</th>
<th style="text-align:left;">
Specials
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
1225 Raw Sushi and Sake Lounge
</td>
<td style="text-align:left;">
1225 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.238.1903
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge
</td>
</tr>
<tr>
<td style="text-align:left;">
1518 Bar and Grill
</td>
<td style="text-align:left;">
1518 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
267.639.6851
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill
</td>
</tr>
<tr>
<td style="text-align:left;">
Air Grille Garden at Dilworth Park
</td>
<td style="text-align:left;">
1 S 15th St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.587.2761
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park
</td>
</tr>
</tbody>
</table>
</section>
<section id="harvesting-data-from-the-remaining-pages" class="level3">
<h3 class="anchored" data-anchor-id="harvesting-data-from-the-remaining-pages">Harvesting data from the remaining pages</h3>
<p>Once I could confirm that the above approach harvested the information I needed, I adapted the code into a function that I could apply to pages 2-3 of the site.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1">getTables <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span>(pageNumber) {</span>
<span id="cb6-2">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Sys.sleep</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>)</span>
<span id="cb6-3">  </span>
<span id="cb6-4">  url <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page="</span>, pageNumber)</span>
<span id="cb6-5">  </span>
<span id="cb6-6">  html <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">read_html</span>(url)</span>
<span id="cb6-7">  </span>
<span id="cb6-8">  table <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb6-9">    html <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-10">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_node</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"table"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb6-11">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_table</span>()</span>
<span id="cb6-12">  </span>
<span id="cb6-13">  links <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb6-14">    html <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-15">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_elements</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">".o-table__tag.ccd-text-link"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-16">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html_attr</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"href"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-17">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_tibble</span>()</span>
<span id="cb6-18">  </span>
<span id="cb6-19">  tableSpecials <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;&lt;-</span></span>
<span id="cb6-20">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">bind_cols</span>(table, links) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-21">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Specials =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(url, value)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb6-22">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">CCD SIPS Specials</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, value))</span>
<span id="cb6-23">}</span></code></pre></div></div>
<p>I used my <code>getTable()</code> function and the <code>purrr::map_df()</code> function to harvest the table of restaurants/bars from pages 2 and 3. Then I combined all the data frames together and saved the complete data frame as an <code>.Rds</code> object so that I wouldn’t have to scrape the data again.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># get remaining tables</span></span>
<span id="cb7-2">table2 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">map_df</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>, getTables) </span>
<span id="cb7-3"></span>
<span id="cb7-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># combine all tables</span></span>
<span id="cb7-5">table <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">bind_rows</span>(table1Mod, table2)</span>
<span id="cb7-6">table <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> kableExtra<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>()</span></code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align:left;">
Name
</th>
<th style="text-align:left;">
Address
</th>
<th style="text-align:left;">
Phone
</th>
<th style="text-align:left;">
Specials
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
1028 Yamitsuki Sushi &amp; Ramen
</td>
<td style="text-align:left;">
1028 Arch Street, Philadelphia, PA 19107
</td>
<td style="text-align:left;">
215.629.3888
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen
</td>
</tr>
<tr>
<td style="text-align:left;">
1225 Raw Sushi and Sake Lounge
</td>
<td style="text-align:left;">
1225 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.238.1903
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge
</td>
</tr>
<tr>
<td style="text-align:left;">
1518 Bar and Grill
</td>
<td style="text-align:left;">
1518 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
267.639.6851
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill
</td>
</tr>
</tbody>
</table>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb8-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># save full table to file</span></span>
<span id="cb8-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write_rds</span>(</span>
<span id="cb8-3">  table,</span>
<span id="cb8-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">file =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content/blog/2022-05-31-ccd-sips/specialsScraped.Rds"</span>)</span>
<span id="cb8-5">  )</span></code></pre></div></div>
</section>
</section>
<section id="geocoding-addresses" class="level2">
<h2 class="anchored" data-anchor-id="geocoding-addresses">Geocoding addresses</h2>
<p>The next step was to use geocoding to convert the restaurant/bar addresses to geographical coordinates (longitude and latitude) that I could map. I used the <a href="https://github.com/dkahle/ggmap">ggmap</a> package and the Google Geocoding API service because this was a small project (59 addresses/requests) which wouldn’t make a dent in the <a href="https://mapsplatform.google.com/pricing/">free credit available on the platform</a>.</p>
<p>The last time I geocoded addresses was for an <a href="../2019-ccd-sips">almost identical project in 2019</a> and I had issues using the same API key from back then, so I made a new one. I restricted my new key to the Geocoding and Geolocation APIs.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb9-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># register my API key</span></span>
<span id="cb9-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># ggmap::register_google(key = "[your key]")</span></span>
<span id="cb9-3"></span>
<span id="cb9-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># geocode addresses</span></span>
<span id="cb9-5">specials_ggmap <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb9-6">  table <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb9-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate_geocode</span>(Address)</span>
<span id="cb9-8"></span>
<span id="cb9-9"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># rename new variables</span></span>
<span id="cb9-10">specials <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span id="cb9-11">  specials_ggmap <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb9-12">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rename</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Longitude =</span> lon,</span>
<span id="cb9-13">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Latitude =</span> lat) </span>
<span id="cb9-14">specials <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> kableExtra<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>()</span></code></pre></div></div>
<table>
<thead>
<tr>
<th style="text-align:left;">
Name
</th>
<th style="text-align:left;">
Address
</th>
<th style="text-align:left;">
Phone
</th>
<th style="text-align:left;">
Specials
</th>
<th style="text-align:right;">
Longitude
</th>
<th style="text-align:right;">
Latitude
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
1028 Yamitsuki Sushi &amp; Ramen
</td>
<td style="text-align:left;">
1028 Arch Street, Philadelphia, PA 19107
</td>
<td style="text-align:left;">
215.629.3888
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen
</td>
<td style="text-align:right;">
-75.15746
</td>
<td style="text-align:right;">
39.95354
</td>
</tr>
<tr>
<td style="text-align:left;">
1225 Raw Sushi and Sake Lounge
</td>
<td style="text-align:left;">
1225 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
215.238.1903
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge
</td>
<td style="text-align:right;">
-75.16149
</td>
<td style="text-align:right;">
39.95004
</td>
</tr>
<tr>
<td style="text-align:left;">
1518 Bar and Grill
</td>
<td style="text-align:left;">
1518 Sansom St, Philadelphia, PA 19102
</td>
<td style="text-align:left;">
267.639.6851
</td>
<td style="text-align:left;">
https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill
</td>
<td style="text-align:right;">
-75.16665
</td>
<td style="text-align:right;">
39.95020
</td>
</tr>
</tbody>
</table>
<p>I made sure to save the new data frame with geographical coordinates as an <code>.Rds</code> object so I wouldn’t have to geocode the data again! This would be particularly important if I was working on a large project.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb10-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># save table with geocoded addresses to file</span></span>
<span id="cb10-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write_rds</span>(</span>
<span id="cb10-3">  specials,</span>
<span id="cb10-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">file =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content/blog/2022-05-31-ccd-sips/specialsGeocoded.Rds"</span>))</span></code></pre></div></div>
</section>
<section id="building-the-map" class="level2">
<h2 class="anchored" data-anchor-id="building-the-map">Building the map</h2>
<p>To build the map, I used the <a href="https://rstudio.github.io/leaflet/">leaflet</a> package. Some of the resources I found helpful, in addition to the package documentation:</p>
<ul>
<li><a href="https://www.zevross.com/blog/2015/05/19/scrape-website-data-with-the-new-r-package-rvest/">Scrape website data with the new R package rvest (+ a postscript on interacting with web pages with RSelenium) · Hollie at ZevRoss</a> – how to style pop-ups</li>
<li><a href="https://www.jla-data.net/eng/leaflet-markers-in-r/">Leaflet Map Markers in R · Jindra Lacko</a> – how to customize marker icons</li>
<li><a href="https://leafletjs.com/examples/accessibility/">A guide to basic Leaflet accessibility · Leaflet</a> – accessibility considerations. Though it’s unclear to me how these features built into the Leaflet library translate over to the leaflet R package. For example, I couldn’t find an option for adding alt-text or a title to each marker, but maybe I wasn’t looking in the right place within the documentation.</li>
</ul>
<section id="customizing-map-markers" class="level3">
<h3 class="anchored" data-anchor-id="customizing-map-markers">Customizing map markers</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb11-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># style pop-ups for the map with inline css styling</span></span>
<span id="cb11-2"></span>
<span id="cb11-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># marker for the restaurants/bars</span></span>
<span id="cb11-4">popInfoCircles <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'&gt;"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;a style='color: #00857A;' href="</span>, specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Specials, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&gt;"</span>, specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Name, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;/a&gt;&lt;/h2&gt;"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'&gt;"</span>, specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Address, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;/p&gt;"</span>)</span>
<span id="cb11-5"></span>
<span id="cb11-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># marker for the center of the map</span></span>
<span id="cb11-7">popInfoMarker<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;h1 style='padding-top: 0.5em; margin-top: 1em; margin-bottom: 0.5em; font-family: Red Hat Text, sans-serif; font-size: 1.8em; color:#43464C;'&gt;"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;a style='color: #00857A;' href='https://centercityphila.org/explore-center-city/ccdsips'&gt;"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Center City District Sips 2022"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;/a&gt;&lt;/h1&gt;&lt;p style='color:#9197A6; font-family: Red Hat Text, sans-serif; font-size: 1.5em; padding-bottom: 1em;'&gt;"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Philadelphia, PA"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;/p&gt;"</span>)</span>
<span id="cb11-8"></span>
<span id="cb11-9"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># custom icon for the center of the map</span></span>
<span id="cb11-10">awesome <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span></span>
<span id="cb11-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">makeAwesomeIcon</span>(</span>
<span id="cb11-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">icon =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"map-pin"</span>,</span>
<span id="cb11-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">iconColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FFFFFF"</span>,</span>
<span id="cb11-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">markerColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"darkblue"</span>,</span>
<span id="cb11-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">library =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"fa"</span></span>
<span id="cb11-16">  )</span></code></pre></div></div>
</section>
<section id="plotting-the-restaurantsbars" class="level3">
<h3 class="anchored" data-anchor-id="plotting-the-restaurantsbars">Plotting the restaurants/bars</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb12-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> specials, </span>
<span id="cb12-2">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, </span>
<span id="cb12-3">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">height =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"850px"</span>,</span>
<span id="cb12-4">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># https://stackoverflow.com/a/42170340</span></span>
<span id="cb12-5">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">options =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tileOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">minZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb12-6">                              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb12-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map markers ----</span></span>
<span id="cb12-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircles</span>(</span>
<span id="cb12-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude, </span>
<span id="cb12-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude, </span>
<span id="cb12-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#009E91"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#olivedrab goldenrod</span></span>
<span id="cb12-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillOpacity =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>, </span>
<span id="cb12-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">stroke =</span> F,</span>
<span id="cb12-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">radius =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, </span>
<span id="cb12-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoCircles,</span>
<span id="cb12-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> Name,</span>
<span id="cb12-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb12-18">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb12-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb12-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb12-21">      ))</span></code></pre></div></div>
<div id="htmlwidget-8da517f516a7434828d6" class="leaflet html-widget" style="width:100%;height:850px;">

</div>
<script type="application/json" data-for="htmlwidget-8da517f516a7434828d6">{"x":{"options":{"minZoom":15,"maxZoom":19,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false},"calls":[{"method":"addCircles","args":[[39.9535423,39.9500363,39.9501977,39.9526642,39.9488888,39.9527827,39.9467935,39.9517476,39.9506007,39.9543618,39.9500062,39.9490852,39.9482475,39.950472,39.9477828,39.9520312,39.9554292,39.9511145,39.9557898,39.9524665,39.9645357,39.9557404,39.9519308,39.9491023,39.9518233,39.9497054,39.9521221,39.95006,39.949742,39.9592359,39.9504997,39.9510645,39.9504002,39.9512789,39.9505301,39.9502943,39.9502786,39.9496281,39.9503869,39.9543944,39.9486272,39.9485658,39.9556688,39.9539205,39.9477453,39.9499506,39.9495269,39.9498662,39.9485127,39.9500493,39.9495688,39.950494,39.9505038,39.9539766,39.9517805,39.9489914,39.9495639,39.9509174,39.9497121],[-75.1574552,-75.1614924,-75.1666453,-75.1649353,-75.1611295,-75.1703617,-75.165297,-75.1602294,-75.1703389,-75.1578357,-75.1621608,-75.1678993,-75.1666834,-75.1625679,-75.1621493,-75.1749899,-75.1664549,-75.17157,-75.1697556,-75.1562495,-75.160513,-75.1683553,-75.1704529,-75.1543329,-75.173394,-75.1621847,-75.1720716,-75.162397,-75.160578,-75.1617433,-75.1666931,-75.1713807,-75.1616684,-75.1695181,-75.1668181,-75.150981,-75.1669645,-75.1518931,-75.1671925,-75.16985,-75.1666453,-75.1598508,-75.1708177,-75.1736121,-75.159542,-75.1621737,-75.1622446,-75.1604892,-75.1680322,-75.1624957,-75.1589615,-75.162746,-75.1625185,-75.1696621,-75.1729152,-75.1701493,-75.1617091,-75.1596095,-75.1588397],12,null,null,{"interactive":true,"className":"","stroke":false,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#009E91","fillOpacity":0.6},["<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen > 1028 Yamitsuki Sushi & Ramen <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1028 Arch Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge > 1225 Raw Sushi and Sake Lounge <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1225 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill > 1518 Bar and Grill <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1518 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park > Air Grille Garden at Dilworth Park <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1 S 15th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#aki-nom-nom > Aki Nom Nom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1210 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#artbar > ArtBar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1800 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#balcony-bar-at-the-kimmel-center > Balcony Bar at the Kimmel Center <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 300 S Broad St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bank-and-bourbon > Bank and Bourbon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1200 Market St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-bombon > Bar Bombon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 133 S 18th St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-ly-chinatown > Bar-Ly Chinatown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 101 N. 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#barbuzzo > Barbuzzo <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bellini > Bellini <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 220 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#blume > Blume <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1500 Locust Street, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#brü-craft-wurst > Brü Craft & Wurst <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1318 Chestnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bud-marilyns > Bud & Marilyn's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1234 Locust St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#butcher-bar > Butcher Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2034 Chestnut St, Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#capriccio-café-and-bar > Capriccio Café and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 N 16th St, Philadelphia PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#cavanaugh-s-rittenhouse > Cavanaugh's Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1823 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-tap-house-logan-square > City Tap House Logan Square <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2 Logan Square, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-winery > City Winery <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 990 Filbert St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#clementine-s-stable-cafe > Clementine's Stable Cafe <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 631 N. Broad St, Philadelphia, PA 19123 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#con-murphy-s-irish-pub > Con Murphy's Irish Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1700 Ben Franklin Pkwy, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#continental-midtown-2 > Continental Midtown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#craftsman-row-saloon > Craftsman Row Saloon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S. 8th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#dim-sum-house-by-jane-g-s > Dim Sum House by Jane G's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1930 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#doubleknot > Double Knot <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 120 S 13th St. , Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drinker-s-pub > Drinker's Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1903 Chestnut St., Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drury-beer-garden > Drury Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1311 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#finn-mccools-ale-house > Finn McCools Ale House <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 118 S 12th Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gabi > Gabi <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 339 North Broad St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#giuseppe-and-sons > Giuseppe and Sons <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1523 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#the-goat-rittenhouse > The Goat Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1907 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#good-luck-pizza-co > Good Luck Pizza Co. <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 105 S. 13th St., Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gran-caffe-l-aquila > Gran Caffe L'Aquila <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1716 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#harp-crown1 > Harp & Crown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1525 Sansom St, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#independence-beer-garden > Independence Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 100 S Independence Mall W, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#ladder-15 > Ladder 15 <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1528 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#lascalas > LaScala's Fire <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 615 Chestnut St, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#marathon-16th-sansom > Marathon 16th & Sansom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 121 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#misconduct-tavern > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#misconduct-tavern8 > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1511 Locust St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#moriarty-s-restaurant > Moriarty's Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1116 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-mulberry-on-arch > The Mulberry on Arch <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1835 Arch St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#paganos-market-and-bar > Pagano's Market and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2001 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#picanha-brazilian-steakhouse > Picanha Brazilian Steakhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1111 Locust St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#prunella > Prunella <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sampan7 > Sampan <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 124 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sueno > Sueno <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 114 S. 12th St., Philadelphia PA, 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tequilas-restaurant > Tequilas Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1602 Locust St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#time-restaurant > Time Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1315 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#top-tomato-bar-pizza > Top Tomato Bar & Pizza <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 116 S 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tradesman-s > Tradesman's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1322 Chestnut Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#u-bahn > U-Bahn <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1320 Chestnut St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#uptown-beer-garden > Uptown Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1735 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#veda > Veda <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1920 Chestnut St., Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#via-locust > Via Locusta <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1723 Locust St,  Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#vintage-wine-bar-bistro > Vintage Wine Bar & Bistro <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 129 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-wayward-canopy > The Wayward <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1170 Ludlow St., Philadelphia, PA <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#wrap-shack > Wrap Shack <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 11th St., Philadelphia, PA 19107 <\/p>"],null,["1028 Yamitsuki Sushi &amp; Ramen","1225 Raw Sushi and Sake Lounge","1518 Bar and Grill","Air Grille Garden at Dilworth Park","Aki Nom Nom","ArtBar","Balcony Bar at the Kimmel Center","Bank and Bourbon","Bar Bombon","Bar-Ly Chinatown","Barbuzzo","Bellini","Blume","Brü Craft &amp; Wurst","Bud &amp; Marilyn's","Butcher Bar","Capriccio Café and Bar","Cavanaugh's Rittenhouse","City Tap House Logan Square","City Winery","Clementine's Stable Cafe","Con Murphy's Irish Pub","Continental Midtown","Craftsman Row Saloon","Dim Sum House by Jane G's","Double Knot","Drinker's Pub","Drury Beer Garden","Finn McCools Ale House","Gabi","Giuseppe and Sons","The Goat Rittenhouse","Good Luck Pizza Co.","Gran Caffe L'Aquila","Harp &amp; Crown","Independence Beer Garden","Ladder 15","LaScala's Fire","Marathon 16th &amp; Sansom","Misconduct Tavern","Misconduct Tavern","Moriarty's Restaurant","The Mulberry on Arch","Pagano's Market and Bar","Picanha Brazilian Steakhouse","Prunella","Sampan","Sueno","Tequilas Restaurant","Time Restaurant","Top Tomato Bar &amp; Pizza","Tradesman's","U-Bahn","Uptown Beer Garden","Veda","Via Locusta","Vintage Wine Bar &amp; Bistro","The Wayward","Wrap Shack"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null,null]}],"limits":{"lat":[39.9467935,39.9645357],"lng":[-75.1749899,-75.150981]}},"evals":[],"jsHooks":[]}</script>
</section>
<section id="adding-the-map-background" class="level3">
<h3 class="anchored" data-anchor-id="adding-the-map-background">Adding the map background</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb13-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> specials, </span>
<span id="cb13-2">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, </span>
<span id="cb13-3">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">height =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"850px"</span>,</span>
<span id="cb13-4">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># https://stackoverflow.com/a/42170340</span></span>
<span id="cb13-5">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">options =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tileOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">minZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb13-6">                              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb13-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map markers ----</span></span>
<span id="cb13-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircles</span>(</span>
<span id="cb13-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude, </span>
<span id="cb13-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude, </span>
<span id="cb13-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#009E91"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#olivedrab goldenrod</span></span>
<span id="cb13-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillOpacity =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>, </span>
<span id="cb13-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">stroke =</span> F,</span>
<span id="cb13-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">radius =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, </span>
<span id="cb13-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoCircles,</span>
<span id="cb13-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> Name,</span>
<span id="cb13-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb13-18">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb13-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb13-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb13-21">      )) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb13-22">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map tiles in the background ----</span></span>
<span id="cb13-23">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addProviderTiles</span>(providers<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>CartoDB.Positron)</span></code></pre></div></div>
<div id="htmlwidget-7dc4ee36115a567df670" class="leaflet html-widget" style="width:100%;height:850px;">

</div>
<script type="application/json" data-for="htmlwidget-7dc4ee36115a567df670">{"x":{"options":{"minZoom":15,"maxZoom":19,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false},"calls":[{"method":"addCircles","args":[[39.9535423,39.9500363,39.9501977,39.9526642,39.9488888,39.9527827,39.9467935,39.9517476,39.9506007,39.9543618,39.9500062,39.9490852,39.9482475,39.950472,39.9477828,39.9520312,39.9554292,39.9511145,39.9557898,39.9524665,39.9645357,39.9557404,39.9519308,39.9491023,39.9518233,39.9497054,39.9521221,39.95006,39.949742,39.9592359,39.9504997,39.9510645,39.9504002,39.9512789,39.9505301,39.9502943,39.9502786,39.9496281,39.9503869,39.9543944,39.9486272,39.9485658,39.9556688,39.9539205,39.9477453,39.9499506,39.9495269,39.9498662,39.9485127,39.9500493,39.9495688,39.950494,39.9505038,39.9539766,39.9517805,39.9489914,39.9495639,39.9509174,39.9497121],[-75.1574552,-75.1614924,-75.1666453,-75.1649353,-75.1611295,-75.1703617,-75.165297,-75.1602294,-75.1703389,-75.1578357,-75.1621608,-75.1678993,-75.1666834,-75.1625679,-75.1621493,-75.1749899,-75.1664549,-75.17157,-75.1697556,-75.1562495,-75.160513,-75.1683553,-75.1704529,-75.1543329,-75.173394,-75.1621847,-75.1720716,-75.162397,-75.160578,-75.1617433,-75.1666931,-75.1713807,-75.1616684,-75.1695181,-75.1668181,-75.150981,-75.1669645,-75.1518931,-75.1671925,-75.16985,-75.1666453,-75.1598508,-75.1708177,-75.1736121,-75.159542,-75.1621737,-75.1622446,-75.1604892,-75.1680322,-75.1624957,-75.1589615,-75.162746,-75.1625185,-75.1696621,-75.1729152,-75.1701493,-75.1617091,-75.1596095,-75.1588397],12,null,null,{"interactive":true,"className":"","stroke":false,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#009E91","fillOpacity":0.6},["<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen > 1028 Yamitsuki Sushi & Ramen <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1028 Arch Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge > 1225 Raw Sushi and Sake Lounge <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1225 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill > 1518 Bar and Grill <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1518 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park > Air Grille Garden at Dilworth Park <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1 S 15th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#aki-nom-nom > Aki Nom Nom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1210 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#artbar > ArtBar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1800 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#balcony-bar-at-the-kimmel-center > Balcony Bar at the Kimmel Center <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 300 S Broad St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bank-and-bourbon > Bank and Bourbon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1200 Market St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-bombon > Bar Bombon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 133 S 18th St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-ly-chinatown > Bar-Ly Chinatown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 101 N. 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#barbuzzo > Barbuzzo <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bellini > Bellini <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 220 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#blume > Blume <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1500 Locust Street, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#brü-craft-wurst > Brü Craft & Wurst <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1318 Chestnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bud-marilyns > Bud & Marilyn's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1234 Locust St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#butcher-bar > Butcher Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2034 Chestnut St, Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#capriccio-café-and-bar > Capriccio Café and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 N 16th St, Philadelphia PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#cavanaugh-s-rittenhouse > Cavanaugh's Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1823 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-tap-house-logan-square > City Tap House Logan Square <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2 Logan Square, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-winery > City Winery <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 990 Filbert St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#clementine-s-stable-cafe > Clementine's Stable Cafe <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 631 N. Broad St, Philadelphia, PA 19123 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#con-murphy-s-irish-pub > Con Murphy's Irish Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1700 Ben Franklin Pkwy, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#continental-midtown-2 > Continental Midtown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#craftsman-row-saloon > Craftsman Row Saloon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S. 8th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#dim-sum-house-by-jane-g-s > Dim Sum House by Jane G's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1930 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#doubleknot > Double Knot <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 120 S 13th St. , Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drinker-s-pub > Drinker's Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1903 Chestnut St., Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drury-beer-garden > Drury Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1311 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#finn-mccools-ale-house > Finn McCools Ale House <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 118 S 12th Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gabi > Gabi <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 339 North Broad St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#giuseppe-and-sons > Giuseppe and Sons <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1523 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#the-goat-rittenhouse > The Goat Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1907 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#good-luck-pizza-co > Good Luck Pizza Co. <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 105 S. 13th St., Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gran-caffe-l-aquila > Gran Caffe L'Aquila <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1716 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#harp-crown1 > Harp & Crown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1525 Sansom St, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#independence-beer-garden > Independence Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 100 S Independence Mall W, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#ladder-15 > Ladder 15 <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1528 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#lascalas > LaScala's Fire <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 615 Chestnut St, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#marathon-16th-sansom > Marathon 16th & Sansom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 121 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#misconduct-tavern > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#misconduct-tavern8 > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1511 Locust St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#moriarty-s-restaurant > Moriarty's Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1116 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-mulberry-on-arch > The Mulberry on Arch <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1835 Arch St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#paganos-market-and-bar > Pagano's Market and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2001 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#picanha-brazilian-steakhouse > Picanha Brazilian Steakhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1111 Locust St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#prunella > Prunella <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sampan7 > Sampan <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 124 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sueno > Sueno <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 114 S. 12th St., Philadelphia PA, 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tequilas-restaurant > Tequilas Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1602 Locust St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#time-restaurant > Time Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1315 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#top-tomato-bar-pizza > Top Tomato Bar & Pizza <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 116 S 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tradesman-s > Tradesman's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1322 Chestnut Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#u-bahn > U-Bahn <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1320 Chestnut St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#uptown-beer-garden > Uptown Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1735 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#veda > Veda <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1920 Chestnut St., Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#via-locust > Via Locusta <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1723 Locust St,  Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#vintage-wine-bar-bistro > Vintage Wine Bar & Bistro <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 129 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-wayward-canopy > The Wayward <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1170 Ludlow St., Philadelphia, PA <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#wrap-shack > Wrap Shack <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 11th St., Philadelphia, PA 19107 <\/p>"],null,["1028 Yamitsuki Sushi &amp; Ramen","1225 Raw Sushi and Sake Lounge","1518 Bar and Grill","Air Grille Garden at Dilworth Park","Aki Nom Nom","ArtBar","Balcony Bar at the Kimmel Center","Bank and Bourbon","Bar Bombon","Bar-Ly Chinatown","Barbuzzo","Bellini","Blume","Brü Craft &amp; Wurst","Bud &amp; Marilyn's","Butcher Bar","Capriccio Café and Bar","Cavanaugh's Rittenhouse","City Tap House Logan Square","City Winery","Clementine's Stable Cafe","Con Murphy's Irish Pub","Continental Midtown","Craftsman Row Saloon","Dim Sum House by Jane G's","Double Knot","Drinker's Pub","Drury Beer Garden","Finn McCools Ale House","Gabi","Giuseppe and Sons","The Goat Rittenhouse","Good Luck Pizza Co.","Gran Caffe L'Aquila","Harp &amp; Crown","Independence Beer Garden","Ladder 15","LaScala's Fire","Marathon 16th &amp; Sansom","Misconduct Tavern","Misconduct Tavern","Moriarty's Restaurant","The Mulberry on Arch","Pagano's Market and Bar","Picanha Brazilian Steakhouse","Prunella","Sampan","Sueno","Tequilas Restaurant","Time Restaurant","Top Tomato Bar &amp; Pizza","Tradesman's","U-Bahn","Uptown Beer Garden","Veda","Via Locusta","Vintage Wine Bar &amp; Bistro","The Wayward","Wrap Shack"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null,null]},{"method":"addProviderTiles","args":["CartoDB.Positron",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]}],"limits":{"lat":[39.9467935,39.9645357],"lng":[-75.1749899,-75.150981]}},"evals":[],"jsHooks":[]}</script>
</section>
<section id="setting-the-map-view" class="level3">
<h3 class="anchored" data-anchor-id="setting-the-map-view">Setting the map view</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb14-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> specials, </span>
<span id="cb14-2">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, </span>
<span id="cb14-3">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">height =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"850px"</span>,</span>
<span id="cb14-4">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># https://stackoverflow.com/a/42170340</span></span>
<span id="cb14-5">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">options =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tileOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">minZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb14-6">                              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb14-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map markers ----</span></span>
<span id="cb14-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircles</span>(</span>
<span id="cb14-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude, </span>
<span id="cb14-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude, </span>
<span id="cb14-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#009E91"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#olivedrab goldenrod</span></span>
<span id="cb14-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillOpacity =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>, </span>
<span id="cb14-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">stroke =</span> F,</span>
<span id="cb14-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">radius =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, </span>
<span id="cb14-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoCircles,</span>
<span id="cb14-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> Name,</span>
<span id="cb14-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb14-18">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb14-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb14-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb14-21">      )) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb14-22">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map tiles in the background ----</span></span>
<span id="cb14-23">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addProviderTiles</span>(providers<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>CartoDB.Positron) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb14-24">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># set the map view</span></span>
<span id="cb14-25">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">setView</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude), </span>
<span id="cb14-26">          <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude), </span>
<span id="cb14-27">          <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">zoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>)</span></code></pre></div></div>
<div id="htmlwidget-c1824e6f3608ae690abe" class="leaflet html-widget" style="width:100%;height:850px;">

</div>
<script type="application/json" data-for="htmlwidget-c1824e6f3608ae690abe">{"x":{"options":{"minZoom":15,"maxZoom":19,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false},"calls":[{"method":"addCircles","args":[[39.9535423,39.9500363,39.9501977,39.9526642,39.9488888,39.9527827,39.9467935,39.9517476,39.9506007,39.9543618,39.9500062,39.9490852,39.9482475,39.950472,39.9477828,39.9520312,39.9554292,39.9511145,39.9557898,39.9524665,39.9645357,39.9557404,39.9519308,39.9491023,39.9518233,39.9497054,39.9521221,39.95006,39.949742,39.9592359,39.9504997,39.9510645,39.9504002,39.9512789,39.9505301,39.9502943,39.9502786,39.9496281,39.9503869,39.9543944,39.9486272,39.9485658,39.9556688,39.9539205,39.9477453,39.9499506,39.9495269,39.9498662,39.9485127,39.9500493,39.9495688,39.950494,39.9505038,39.9539766,39.9517805,39.9489914,39.9495639,39.9509174,39.9497121],[-75.1574552,-75.1614924,-75.1666453,-75.1649353,-75.1611295,-75.1703617,-75.165297,-75.1602294,-75.1703389,-75.1578357,-75.1621608,-75.1678993,-75.1666834,-75.1625679,-75.1621493,-75.1749899,-75.1664549,-75.17157,-75.1697556,-75.1562495,-75.160513,-75.1683553,-75.1704529,-75.1543329,-75.173394,-75.1621847,-75.1720716,-75.162397,-75.160578,-75.1617433,-75.1666931,-75.1713807,-75.1616684,-75.1695181,-75.1668181,-75.150981,-75.1669645,-75.1518931,-75.1671925,-75.16985,-75.1666453,-75.1598508,-75.1708177,-75.1736121,-75.159542,-75.1621737,-75.1622446,-75.1604892,-75.1680322,-75.1624957,-75.1589615,-75.162746,-75.1625185,-75.1696621,-75.1729152,-75.1701493,-75.1617091,-75.1596095,-75.1588397],12,null,null,{"interactive":true,"className":"","stroke":false,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#009E91","fillOpacity":0.6},["<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen > 1028 Yamitsuki Sushi & Ramen <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1028 Arch Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge > 1225 Raw Sushi and Sake Lounge <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1225 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill > 1518 Bar and Grill <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1518 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park > Air Grille Garden at Dilworth Park <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1 S 15th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#aki-nom-nom > Aki Nom Nom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1210 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#artbar > ArtBar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1800 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#balcony-bar-at-the-kimmel-center > Balcony Bar at the Kimmel Center <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 300 S Broad St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bank-and-bourbon > Bank and Bourbon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1200 Market St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-bombon > Bar Bombon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 133 S 18th St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-ly-chinatown > Bar-Ly Chinatown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 101 N. 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#barbuzzo > Barbuzzo <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bellini > Bellini <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 220 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#blume > Blume <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1500 Locust Street, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#brü-craft-wurst > Brü Craft & Wurst <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1318 Chestnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bud-marilyns > Bud & Marilyn's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1234 Locust St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#butcher-bar > Butcher Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2034 Chestnut St, Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#capriccio-café-and-bar > Capriccio Café and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 N 16th St, Philadelphia PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#cavanaugh-s-rittenhouse > Cavanaugh's Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1823 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-tap-house-logan-square > City Tap House Logan Square <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2 Logan Square, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-winery > City Winery <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 990 Filbert St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#clementine-s-stable-cafe > Clementine's Stable Cafe <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 631 N. Broad St, Philadelphia, PA 19123 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#con-murphy-s-irish-pub > Con Murphy's Irish Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1700 Ben Franklin Pkwy, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#continental-midtown-2 > Continental Midtown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#craftsman-row-saloon > Craftsman Row Saloon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S. 8th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#dim-sum-house-by-jane-g-s > Dim Sum House by Jane G's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1930 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#doubleknot > Double Knot <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 120 S 13th St. , Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drinker-s-pub > Drinker's Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1903 Chestnut St., Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drury-beer-garden > Drury Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1311 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#finn-mccools-ale-house > Finn McCools Ale House <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 118 S 12th Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gabi > Gabi <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 339 North Broad St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#giuseppe-and-sons > Giuseppe and Sons <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1523 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#the-goat-rittenhouse > The Goat Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1907 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#good-luck-pizza-co > Good Luck Pizza Co. <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 105 S. 13th St., Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gran-caffe-l-aquila > Gran Caffe L'Aquila <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1716 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#harp-crown1 > Harp & Crown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1525 Sansom St, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#independence-beer-garden > Independence Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 100 S Independence Mall W, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#ladder-15 > Ladder 15 <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1528 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#lascalas > LaScala's Fire <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 615 Chestnut St, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#marathon-16th-sansom > Marathon 16th & Sansom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 121 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#misconduct-tavern > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#misconduct-tavern8 > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1511 Locust St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#moriarty-s-restaurant > Moriarty's Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1116 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-mulberry-on-arch > The Mulberry on Arch <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1835 Arch St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#paganos-market-and-bar > Pagano's Market and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2001 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#picanha-brazilian-steakhouse > Picanha Brazilian Steakhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1111 Locust St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#prunella > Prunella <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sampan7 > Sampan <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 124 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sueno > Sueno <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 114 S. 12th St., Philadelphia PA, 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tequilas-restaurant > Tequilas Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1602 Locust St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#time-restaurant > Time Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1315 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#top-tomato-bar-pizza > Top Tomato Bar & Pizza <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 116 S 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tradesman-s > Tradesman's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1322 Chestnut Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#u-bahn > U-Bahn <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1320 Chestnut St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#uptown-beer-garden > Uptown Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1735 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#veda > Veda <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1920 Chestnut St., Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#via-locust > Via Locusta <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1723 Locust St,  Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#vintage-wine-bar-bistro > Vintage Wine Bar & Bistro <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 129 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-wayward-canopy > The Wayward <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1170 Ludlow St., Philadelphia, PA <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#wrap-shack > Wrap Shack <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 11th St., Philadelphia, PA 19107 <\/p>"],null,["1028 Yamitsuki Sushi &amp; Ramen","1225 Raw Sushi and Sake Lounge","1518 Bar and Grill","Air Grille Garden at Dilworth Park","Aki Nom Nom","ArtBar","Balcony Bar at the Kimmel Center","Bank and Bourbon","Bar Bombon","Bar-Ly Chinatown","Barbuzzo","Bellini","Blume","Brü Craft &amp; Wurst","Bud &amp; Marilyn's","Butcher Bar","Capriccio Café and Bar","Cavanaugh's Rittenhouse","City Tap House Logan Square","City Winery","Clementine's Stable Cafe","Con Murphy's Irish Pub","Continental Midtown","Craftsman Row Saloon","Dim Sum House by Jane G's","Double Knot","Drinker's Pub","Drury Beer Garden","Finn McCools Ale House","Gabi","Giuseppe and Sons","The Goat Rittenhouse","Good Luck Pizza Co.","Gran Caffe L'Aquila","Harp &amp; Crown","Independence Beer Garden","Ladder 15","LaScala's Fire","Marathon 16th &amp; Sansom","Misconduct Tavern","Misconduct Tavern","Moriarty's Restaurant","The Mulberry on Arch","Pagano's Market and Bar","Picanha Brazilian Steakhouse","Prunella","Sampan","Sueno","Tequilas Restaurant","Time Restaurant","Top Tomato Bar &amp; Pizza","Tradesman's","U-Bahn","Uptown Beer Garden","Veda","Via Locusta","Vintage Wine Bar &amp; Bistro","The Wayward","Wrap Shack"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null,null]},{"method":"addProviderTiles","args":["CartoDB.Positron",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]}],"limits":{"lat":[39.9467935,39.9645357],"lng":[-75.1749899,-75.150981]},"setView":[[39.9512667101695,-75.1645457186441],16,[]]},"evals":[],"jsHooks":[]}</script>
</section>
<section id="adding-a-marker-at-the-center" class="level3">
<h3 class="anchored" data-anchor-id="adding-a-marker-at-the-center">Adding a marker at the center</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb15-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> specials, </span>
<span id="cb15-2">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, </span>
<span id="cb15-3">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">height =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"850px"</span>,</span>
<span id="cb15-4">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># https://stackoverflow.com/a/42170340</span></span>
<span id="cb15-5">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">options =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tileOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">minZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb15-6">                              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb15-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map markers ----</span></span>
<span id="cb15-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircles</span>(</span>
<span id="cb15-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude, </span>
<span id="cb15-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude, </span>
<span id="cb15-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#009E91"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#olivedrab goldenrod</span></span>
<span id="cb15-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillOpacity =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>,</span>
<span id="cb15-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">stroke =</span> F,</span>
<span id="cb15-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">radius =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, </span>
<span id="cb15-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoCircles,</span>
<span id="cb15-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> Name,</span>
<span id="cb15-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb15-18">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb15-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb15-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb15-21">      )) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb15-22">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map tiles in the background ----</span></span>
<span id="cb15-23">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addProviderTiles</span>(providers<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>CartoDB.Positron) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb15-24">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># set the map view</span></span>
<span id="cb15-25">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">setView</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude), </span>
<span id="cb15-26">          <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude), </span>
<span id="cb15-27">          <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">zoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb15-28">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add marker at the center ----</span></span>
<span id="cb15-29">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addAwesomeMarkers</span>(</span>
<span id="cb15-30">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">icon =</span> awesome,</span>
<span id="cb15-31">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude), </span>
<span id="cb15-32">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude), </span>
<span id="cb15-33">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Center City District Sips 2022"</span>,</span>
<span id="cb15-34">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb15-35">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb15-36">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb15-37">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb15-38">      ),</span>
<span id="cb15-39">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoMarker,</span>
<span id="cb15-40">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popupOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">popupOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxWidth =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">250</span>))</span></code></pre></div></div>
<div id="htmlwidget-f05211b106559ee0aae9" class="leaflet html-widget" style="width:100%;height:850px;">

</div>
<script type="application/json" data-for="htmlwidget-f05211b106559ee0aae9">{"x":{"options":{"minZoom":15,"maxZoom":19,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false},"calls":[{"method":"addCircles","args":[[39.9535423,39.9500363,39.9501977,39.9526642,39.9488888,39.9527827,39.9467935,39.9517476,39.9506007,39.9543618,39.9500062,39.9490852,39.9482475,39.950472,39.9477828,39.9520312,39.9554292,39.9511145,39.9557898,39.9524665,39.9645357,39.9557404,39.9519308,39.9491023,39.9518233,39.9497054,39.9521221,39.95006,39.949742,39.9592359,39.9504997,39.9510645,39.9504002,39.9512789,39.9505301,39.9502943,39.9502786,39.9496281,39.9503869,39.9543944,39.9486272,39.9485658,39.9556688,39.9539205,39.9477453,39.9499506,39.9495269,39.9498662,39.9485127,39.9500493,39.9495688,39.950494,39.9505038,39.9539766,39.9517805,39.9489914,39.9495639,39.9509174,39.9497121],[-75.1574552,-75.1614924,-75.1666453,-75.1649353,-75.1611295,-75.1703617,-75.165297,-75.1602294,-75.1703389,-75.1578357,-75.1621608,-75.1678993,-75.1666834,-75.1625679,-75.1621493,-75.1749899,-75.1664549,-75.17157,-75.1697556,-75.1562495,-75.160513,-75.1683553,-75.1704529,-75.1543329,-75.173394,-75.1621847,-75.1720716,-75.162397,-75.160578,-75.1617433,-75.1666931,-75.1713807,-75.1616684,-75.1695181,-75.1668181,-75.150981,-75.1669645,-75.1518931,-75.1671925,-75.16985,-75.1666453,-75.1598508,-75.1708177,-75.1736121,-75.159542,-75.1621737,-75.1622446,-75.1604892,-75.1680322,-75.1624957,-75.1589615,-75.162746,-75.1625185,-75.1696621,-75.1729152,-75.1701493,-75.1617091,-75.1596095,-75.1588397],12,null,null,{"interactive":true,"className":"","stroke":false,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#009E91","fillOpacity":0.6},["<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen > 1028 Yamitsuki Sushi & Ramen <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1028 Arch Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge > 1225 Raw Sushi and Sake Lounge <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1225 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill > 1518 Bar and Grill <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1518 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park > Air Grille Garden at Dilworth Park <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1 S 15th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#aki-nom-nom > Aki Nom Nom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1210 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#artbar > ArtBar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1800 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#balcony-bar-at-the-kimmel-center > Balcony Bar at the Kimmel Center <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 300 S Broad St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bank-and-bourbon > Bank and Bourbon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1200 Market St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-bombon > Bar Bombon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 133 S 18th St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-ly-chinatown > Bar-Ly Chinatown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 101 N. 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#barbuzzo > Barbuzzo <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bellini > Bellini <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 220 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#blume > Blume <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1500 Locust Street, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#brü-craft-wurst > Brü Craft & Wurst <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1318 Chestnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bud-marilyns > Bud & Marilyn's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1234 Locust St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#butcher-bar > Butcher Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2034 Chestnut St, Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#capriccio-café-and-bar > Capriccio Café and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 N 16th St, Philadelphia PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#cavanaugh-s-rittenhouse > Cavanaugh's Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1823 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-tap-house-logan-square > City Tap House Logan Square <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2 Logan Square, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-winery > City Winery <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 990 Filbert St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#clementine-s-stable-cafe > Clementine's Stable Cafe <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 631 N. Broad St, Philadelphia, PA 19123 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#con-murphy-s-irish-pub > Con Murphy's Irish Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1700 Ben Franklin Pkwy, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#continental-midtown-2 > Continental Midtown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#craftsman-row-saloon > Craftsman Row Saloon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S. 8th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#dim-sum-house-by-jane-g-s > Dim Sum House by Jane G's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1930 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#doubleknot > Double Knot <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 120 S 13th St. , Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drinker-s-pub > Drinker's Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1903 Chestnut St., Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drury-beer-garden > Drury Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1311 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#finn-mccools-ale-house > Finn McCools Ale House <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 118 S 12th Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gabi > Gabi <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 339 North Broad St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#giuseppe-and-sons > Giuseppe and Sons <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1523 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#the-goat-rittenhouse > The Goat Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1907 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#good-luck-pizza-co > Good Luck Pizza Co. <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 105 S. 13th St., Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gran-caffe-l-aquila > Gran Caffe L'Aquila <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1716 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#harp-crown1 > Harp & Crown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1525 Sansom St, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#independence-beer-garden > Independence Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 100 S Independence Mall W, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#ladder-15 > Ladder 15 <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1528 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#lascalas > LaScala's Fire <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 615 Chestnut St, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#marathon-16th-sansom > Marathon 16th & Sansom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 121 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#misconduct-tavern > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#misconduct-tavern8 > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1511 Locust St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#moriarty-s-restaurant > Moriarty's Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1116 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-mulberry-on-arch > The Mulberry on Arch <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1835 Arch St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#paganos-market-and-bar > Pagano's Market and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2001 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#picanha-brazilian-steakhouse > Picanha Brazilian Steakhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1111 Locust St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#prunella > Prunella <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sampan7 > Sampan <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 124 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sueno > Sueno <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 114 S. 12th St., Philadelphia PA, 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tequilas-restaurant > Tequilas Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1602 Locust St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#time-restaurant > Time Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1315 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#top-tomato-bar-pizza > Top Tomato Bar & Pizza <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 116 S 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tradesman-s > Tradesman's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1322 Chestnut Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#u-bahn > U-Bahn <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1320 Chestnut St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#uptown-beer-garden > Uptown Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1735 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#veda > Veda <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1920 Chestnut St., Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#via-locust > Via Locusta <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1723 Locust St,  Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#vintage-wine-bar-bistro > Vintage Wine Bar & Bistro <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 129 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-wayward-canopy > The Wayward <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1170 Ludlow St., Philadelphia, PA <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#wrap-shack > Wrap Shack <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 11th St., Philadelphia, PA 19107 <\/p>"],null,["1028 Yamitsuki Sushi &amp; Ramen","1225 Raw Sushi and Sake Lounge","1518 Bar and Grill","Air Grille Garden at Dilworth Park","Aki Nom Nom","ArtBar","Balcony Bar at the Kimmel Center","Bank and Bourbon","Bar Bombon","Bar-Ly Chinatown","Barbuzzo","Bellini","Blume","Brü Craft &amp; Wurst","Bud &amp; Marilyn's","Butcher Bar","Capriccio Café and Bar","Cavanaugh's Rittenhouse","City Tap House Logan Square","City Winery","Clementine's Stable Cafe","Con Murphy's Irish Pub","Continental Midtown","Craftsman Row Saloon","Dim Sum House by Jane G's","Double Knot","Drinker's Pub","Drury Beer Garden","Finn McCools Ale House","Gabi","Giuseppe and Sons","The Goat Rittenhouse","Good Luck Pizza Co.","Gran Caffe L'Aquila","Harp &amp; Crown","Independence Beer Garden","Ladder 15","LaScala's Fire","Marathon 16th &amp; Sansom","Misconduct Tavern","Misconduct Tavern","Moriarty's Restaurant","The Mulberry on Arch","Pagano's Market and Bar","Picanha Brazilian Steakhouse","Prunella","Sampan","Sueno","Tequilas Restaurant","Time Restaurant","Top Tomato Bar &amp; Pizza","Tradesman's","U-Bahn","Uptown Beer Garden","Veda","Via Locusta","Vintage Wine Bar &amp; Bistro","The Wayward","Wrap Shack"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null,null]},{"method":"addProviderTiles","args":["CartoDB.Positron",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addAwesomeMarkers","args":[39.9512667101695,-75.1645457186441,{"icon":"map-pin","markerColor":"darkblue","iconColor":"#FFFFFF","spin":false,"squareMarker":false,"iconRotate":0,"font":"monospace","prefix":"fa"},null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},"<h1 style='padding-top: 0.5em; margin-top: 1em; margin-bottom: 0.5em; font-family: Red Hat Text, sans-serif; font-size: 1.8em; color:#43464C;'> <a style='color: #00857A;' href='https://centercityphila.org/explore-center-city/ccdsips'> Center City District Sips 2022 <\/a><\/h1><p style='color:#9197A6; font-family: Red Hat Text, sans-serif; font-size: 1.5em; padding-bottom: 1em;'> Philadelphia, PA <\/p>",{"maxWidth":250,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":true,"className":""},null,null,"Center City District Sips 2022",{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null]}],"limits":{"lat":[39.9467935,39.9645357],"lng":[-75.1749899,-75.150981]},"setView":[[39.9512667101695,-75.1645457186441],16,[]]},"evals":[],"jsHooks":[]}</script>
</section>
<section id="adding-fullscreen-control" class="level3">
<h3 class="anchored" data-anchor-id="adding-fullscreen-control">Adding fullscreen control</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb16-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> specials, </span>
<span id="cb16-2">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, </span>
<span id="cb16-3">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">height =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"850px"</span>,</span>
<span id="cb16-4">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># https://stackoverflow.com/a/42170340</span></span>
<span id="cb16-5">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">options =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tileOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">minZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb16-6">                              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxZoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb16-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map markers ----</span></span>
<span id="cb16-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircles</span>(</span>
<span id="cb16-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude, </span>
<span id="cb16-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude, </span>
<span id="cb16-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillColor =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#009E91"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#olivedrab goldenrod</span></span>
<span id="cb16-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fillOpacity =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>, </span>
<span id="cb16-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">stroke =</span> F,</span>
<span id="cb16-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">radius =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, </span>
<span id="cb16-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoCircles,</span>
<span id="cb16-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> Name,</span>
<span id="cb16-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb16-18">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb16-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb16-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb16-21">      )) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb16-22">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add map tiles in the background ----</span></span>
<span id="cb16-23">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addProviderTiles</span>(providers<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>CartoDB.Positron) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb16-24">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># set the map view</span></span>
<span id="cb16-25">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">setView</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude), </span>
<span id="cb16-26">          <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude), </span>
<span id="cb16-27">          <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">zoom =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb16-28">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add marker at the center ----</span></span>
<span id="cb16-29">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addAwesomeMarkers</span>(</span>
<span id="cb16-30">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">icon =</span> awesome,</span>
<span id="cb16-31">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lng =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Longitude), </span>
<span id="cb16-32">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">lat =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(specials<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Latitude), </span>
<span id="cb16-33">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">label =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Center City District Sips 2022"</span>,</span>
<span id="cb16-34">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labelOptions</span>(</span>
<span id="cb16-35">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">style =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb16-36">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-family"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Red Hat Text, sans-serif"</span>,</span>
<span id="cb16-37">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"font-size"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.2em"</span>)</span>
<span id="cb16-38">      ),</span>
<span id="cb16-39">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> popInfoMarker,</span>
<span id="cb16-40">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popupOptions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">popupOptions</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maxWidth =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">250</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span> </span>
<span id="cb16-41">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># add fullscreen control button ----</span></span>
<span id="cb16-42">  leaflet.extras<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addFullscreenControl</span>()</span></code></pre></div></div>
<div id="htmlwidget-e817ae84c38d566ca5a5" class="leaflet html-widget" style="width:100%;height:850px;">

</div>
<script type="application/json" data-for="htmlwidget-e817ae84c38d566ca5a5">{"x":{"options":{"minZoom":15,"maxZoom":19,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"fullscreenControl":{"position":"topleft","pseudoFullscreen":false}},"calls":[{"method":"addCircles","args":[[39.9535423,39.9500363,39.9501977,39.9526642,39.9488888,39.9527827,39.9467935,39.9517476,39.9506007,39.9543618,39.9500062,39.9490852,39.9482475,39.950472,39.9477828,39.9520312,39.9554292,39.9511145,39.9557898,39.9524665,39.9645357,39.9557404,39.9519308,39.9491023,39.9518233,39.9497054,39.9521221,39.95006,39.949742,39.9592359,39.9504997,39.9510645,39.9504002,39.9512789,39.9505301,39.9502943,39.9502786,39.9496281,39.9503869,39.9543944,39.9486272,39.9485658,39.9556688,39.9539205,39.9477453,39.9499506,39.9495269,39.9498662,39.9485127,39.9500493,39.9495688,39.950494,39.9505038,39.9539766,39.9517805,39.9489914,39.9495639,39.9509174,39.9497121],[-75.1574552,-75.1614924,-75.1666453,-75.1649353,-75.1611295,-75.1703617,-75.165297,-75.1602294,-75.1703389,-75.1578357,-75.1621608,-75.1678993,-75.1666834,-75.1625679,-75.1621493,-75.1749899,-75.1664549,-75.17157,-75.1697556,-75.1562495,-75.160513,-75.1683553,-75.1704529,-75.1543329,-75.173394,-75.1621847,-75.1720716,-75.162397,-75.160578,-75.1617433,-75.1666931,-75.1713807,-75.1616684,-75.1695181,-75.1668181,-75.150981,-75.1669645,-75.1518931,-75.1671925,-75.16985,-75.1666453,-75.1598508,-75.1708177,-75.1736121,-75.159542,-75.1621737,-75.1622446,-75.1604892,-75.1680322,-75.1624957,-75.1589615,-75.162746,-75.1625185,-75.1696621,-75.1729152,-75.1701493,-75.1617091,-75.1596095,-75.1588397],12,null,null,{"interactive":true,"className":"","stroke":false,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#009E91","fillOpacity":0.6},["<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1028-yamitsuki-sushi-ramen > 1028 Yamitsuki Sushi & Ramen <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1028 Arch Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1225-raw-sushi-and-sake-lounge > 1225 Raw Sushi and Sake Lounge <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1225 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#1518-bar-and-grill > 1518 Bar and Grill <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1518 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#air-grill-garden-dilworth-park > Air Grille Garden at Dilworth Park <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1 S 15th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#aki-nom-nom > Aki Nom Nom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1210 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#artbar > ArtBar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1800 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#balcony-bar-at-the-kimmel-center > Balcony Bar at the Kimmel Center <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 300 S Broad St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bank-and-bourbon > Bank and Bourbon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1200 Market St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-bombon > Bar Bombon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 133 S 18th St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bar-ly-chinatown > Bar-Ly Chinatown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 101 N. 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#barbuzzo > Barbuzzo <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bellini > Bellini <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 220 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#blume > Blume <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1500 Locust Street, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#brü-craft-wurst > Brü Craft & Wurst <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1318 Chestnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#bud-marilyns > Bud & Marilyn's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1234 Locust St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#butcher-bar > Butcher Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2034 Chestnut St, Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#capriccio-café-and-bar > Capriccio Café and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 110 N 16th St, Philadelphia PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#cavanaugh-s-rittenhouse > Cavanaugh's Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1823 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-tap-house-logan-square > City Tap House Logan Square <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2 Logan Square, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=1#city-winery > City Winery <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 990 Filbert St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#clementine-s-stable-cafe > Clementine's Stable Cafe <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 631 N. Broad St, Philadelphia, PA 19123 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#con-murphy-s-irish-pub > Con Murphy's Irish Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1700 Ben Franklin Pkwy, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#continental-midtown-2 > Continental Midtown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#craftsman-row-saloon > Craftsman Row Saloon <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S. 8th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#dim-sum-house-by-jane-g-s > Dim Sum House by Jane G's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1930 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#doubleknot > Double Knot <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 120 S 13th St. , Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drinker-s-pub > Drinker's Pub <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1903 Chestnut St., Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#drury-beer-garden > Drury Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1311 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#finn-mccools-ale-house > Finn McCools Ale House <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 118 S 12th Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gabi > Gabi <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 339 North Broad St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#giuseppe-and-sons > Giuseppe and Sons <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1523 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#the-goat-rittenhouse > The Goat Rittenhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1907 Sansom St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#good-luck-pizza-co > Good Luck Pizza Co. <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 105 S. 13th St., Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#gran-caffe-l-aquila > Gran Caffe L'Aquila <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1716 Chestnut St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#harp-crown1 > Harp & Crown <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1525 Sansom St, Philadelphia, PA, 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#independence-beer-garden > Independence Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 100 S Independence Mall W, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#ladder-15 > Ladder 15 <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1528 Sansom St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#lascalas > LaScala's Fire <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 615 Chestnut St, Philadelphia, PA 19106 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#marathon-16th-sansom > Marathon 16th & Sansom <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 121 S 16th St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=2#misconduct-tavern > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1801 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#misconduct-tavern8 > Misconduct Tavern <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1511 Locust St, Philadelphia, PA 19102 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#moriarty-s-restaurant > Moriarty's Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1116 Walnut St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-mulberry-on-arch > The Mulberry on Arch <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1835 Arch St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#paganos-market-and-bar > Pagano's Market and Bar <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 2001 Market St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#picanha-brazilian-steakhouse > Picanha Brazilian Steakhouse <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1111 Locust St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#prunella > Prunella <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sampan7 > Sampan <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 124 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#sueno > Sueno <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 114 S. 12th St., Philadelphia PA, 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tequilas-restaurant > Tequilas Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1602 Locust St, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#time-restaurant > Time Restaurant <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1315 Sansom St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#top-tomato-bar-pizza > Top Tomato Bar & Pizza <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 116 S 11th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#tradesman-s > Tradesman's <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1322 Chestnut Street, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#u-bahn > U-Bahn <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1320 Chestnut St, Philadephia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#uptown-beer-garden > Uptown Beer Garden <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1735 John F Kennedy Blvd, Philadelphia, PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#veda > Veda <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1920 Chestnut St., Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#via-locust > Via Locusta <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1723 Locust St,  Philadelphia PA 19103 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#vintage-wine-bar-bistro > Vintage Wine Bar & Bistro <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 129 S 13th St, Philadelphia, PA 19107 <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#the-wayward-canopy > The Wayward <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 1170 Ludlow St., Philadelphia, PA <\/p>","<h2 style='font-family: Red Hat Text, sans-serif; font-size: 1.6em; color:#43464C;'> <a style='color: #00857A;' href= https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view?page=3#wrap-shack > Wrap Shack <\/a><\/h2> <p style='font-family: Red Hat Text, sans-serif; font-weight: normal; font-size: 1.5em; color:#9197A6;'> 112 S 11th St., Philadelphia, PA 19107 <\/p>"],null,["1028 Yamitsuki Sushi &amp; Ramen","1225 Raw Sushi and Sake Lounge","1518 Bar and Grill","Air Grille Garden at Dilworth Park","Aki Nom Nom","ArtBar","Balcony Bar at the Kimmel Center","Bank and Bourbon","Bar Bombon","Bar-Ly Chinatown","Barbuzzo","Bellini","Blume","Brü Craft &amp; Wurst","Bud &amp; Marilyn's","Butcher Bar","Capriccio Café and Bar","Cavanaugh's Rittenhouse","City Tap House Logan Square","City Winery","Clementine's Stable Cafe","Con Murphy's Irish Pub","Continental Midtown","Craftsman Row Saloon","Dim Sum House by Jane G's","Double Knot","Drinker's Pub","Drury Beer Garden","Finn McCools Ale House","Gabi","Giuseppe and Sons","The Goat Rittenhouse","Good Luck Pizza Co.","Gran Caffe L'Aquila","Harp &amp; Crown","Independence Beer Garden","Ladder 15","LaScala's Fire","Marathon 16th &amp; Sansom","Misconduct Tavern","Misconduct Tavern","Moriarty's Restaurant","The Mulberry on Arch","Pagano's Market and Bar","Picanha Brazilian Steakhouse","Prunella","Sampan","Sueno","Tequilas Restaurant","Time Restaurant","Top Tomato Bar &amp; Pizza","Tradesman's","U-Bahn","Uptown Beer Garden","Veda","Via Locusta","Vintage Wine Bar &amp; Bistro","The Wayward","Wrap Shack"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null,null]},{"method":"addProviderTiles","args":["CartoDB.Positron",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addAwesomeMarkers","args":[39.9512667101695,-75.1645457186441,{"icon":"map-pin","markerColor":"darkblue","iconColor":"#FFFFFF","spin":false,"squareMarker":false,"iconRotate":0,"font":"monospace","prefix":"fa"},null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},"<h1 style='padding-top: 0.5em; margin-top: 1em; margin-bottom: 0.5em; font-family: Red Hat Text, sans-serif; font-size: 1.8em; color:#43464C;'> <a style='color: #00857A;' href='https://centercityphila.org/explore-center-city/ccdsips'> Center City District Sips 2022 <\/a><\/h1><p style='color:#9197A6; font-family: Red Hat Text, sans-serif; font-size: 1.5em; padding-bottom: 1em;'> Philadelphia, PA <\/p>",{"maxWidth":250,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":true,"className":""},null,null,"Center City District Sips 2022",{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"style":{"font-family":"Red Hat Text, sans-serif","font-size":"1.2em"},"className":"","sticky":true},null]}],"limits":{"lat":[39.9467935,39.9645357],"lng":[-75.1749899,-75.150981]},"setView":[[39.9512667101695,-75.1645457186441],16,[]]},"evals":[],"jsHooks":[]}</script>
</section>
</section>
<section id="creating-the-map-with-quarto" class="level2">
<h2 class="anchored" data-anchor-id="creating-the-map-with-quarto">Creating the map with Quarto</h2>
<p>The first time around, I created a standalone map by first running an R script with the necessary code, and then exporting the HTML output as a webpage. This worked well enough, except that I realized:</p>
<ol type="1">
<li>The title of the map webpage (the name that is displayed on a browser tab) was just “map” because the name of the HTML file was <code>map.html</code>. I wanted something more descriptive.</li>
<li>The map wasn’t mobile-responsive. In other words, the map markers and text looked too small when viewed on a mobile device.</li>
</ol>
<section id="changing-the-webpage-title" class="level3">
<h3 class="anchored" data-anchor-id="changing-the-webpage-title">Changing the webpage title</h3>
<p>The webpage title was a quick one to fix thanks to a Stack Overflow response to a <a href="https://stackoverflow.com/questions/59668347/rmarkdown-turn-off-title">question about turning off the title in an R Markdown document</a>. The <code>pagetitle</code> YAML option lets you set the HTML’s title tag independently of the document title:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb17-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">pagetitle</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Philly CCD Sips 2022 Map"</span></span></code></pre></div></div>
</section>
<section id="fixing-the-mobile-responsiveness" class="level3">
<h3 class="anchored" data-anchor-id="fixing-the-mobile-responsiveness">Fixing the mobile-responsiveness</h3>
<p>The mobile-responsiveness issue could be solved by adding metadata to the map HTML, but I would need to be able to blend HTML with R code. I have been practicing using <a href="https://quarto.org/">Quarto</a> and figured I could make a standalone map from a Quarto document (<code>.qmd</code>) rather than an R Markdown one (<code>.Rmd</code> or <code>.Rmarkdown</code>). You can find the map’s Quarto document <a href="https://github.com/spcanelon/silvia/blob/main/blog/2022-05-31-ccd-sips/_map.qmd">alongside this blog post</a>.</p>
<p>According to the <a href="https://leafletjs.com/examples/mobile/">Leaflet library documentation</a> and <a href="https://stackoverflow.com/a/42796918">this Stack Overflow answer</a>, fixing the map to be mobile-responsive required adding the following metadata to the HTML code:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode html code-with-copy"><code class="sourceCode html"><span id="cb18-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">meta</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> name</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"viewport"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> content</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"> </span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">/&gt;</span></span></code></pre></div></div>
<p>I used the <a href="https://pkg.garrickadenbuie.com/metathis">metathis</a> R package to add this metadata to an R code chunk in my Quarto document using the <code>meta_viewport()</code> function:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb19-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># make mobile-responsive</span></span>
<span id="cb19-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">meta_viewport</span>(</span>
<span id="cb19-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"device-width"</span>,</span>
<span id="cb19-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">initial_scale =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.0"</span>,</span>
<span id="cb19-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">maximum_scale =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1.0"</span>,</span>
<span id="cb19-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">user_scalable =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"no"</span></span>
<span id="cb19-7">  )</span></code></pre></div></div>
<blockquote class="blockquote">
<p>Update: In the process of updating this post I’m noticing that specifying the viewport metadata tag doesn’t seem to be necessary anymore, and I don’t understand why 🤔 …so I’ll leave the step as is, just in case it’s helpful to anyone 🤷🏽‍♀️</p>
</blockquote>
</section>
<section id="adding-social-media-tags" class="level3">
<h3 class="anchored" data-anchor-id="adding-social-media-tags">Adding social media tags</h3>
<p>Then I added more metadata. I was particularly interested in adding social media tags so that if I (or anyone else) shared this map webpage, <a href="https://twitter.com/spcanelon/status/1531644079687229441">an informative preview would display as a social card</a>.</p>
<p>I used the <code>meta_social()</code> function to add these tags:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb20-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># tags for social media</span></span>
<span id="cb20-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">meta_social</span>(</span>
<span id="cb20-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">title =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Philly CCD Sips 2022 Interactive Map"</span>,</span>
<span id="cb20-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">url =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://www.silviacanelon.com/blog/2022-ccd-sips/map.html"</span>,</span>
<span id="cb20-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">image =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://github.com/spcanelon/silvia/blob/main/content/blog/2022-05-31-ccd-sips/featured.png?raw=true"</span>,</span>
<span id="cb20-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">image_alt =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Map of Philly's Center City with a pop-up saying Center City District Sips 2022"</span>,</span>
<span id="cb20-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">og_type =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"website"</span>,</span>
<span id="cb20-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">og_author =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Silvia Canelón"</span>,</span>
<span id="cb20-9">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">twitter_card_type =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"summary_large_image"</span>,</span>
<span id="cb20-10">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">twitter_creator =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"@spcanelon"</span></span>
<span id="cb20-11">)</span></code></pre></div></div>
<p>Great, I had added all of the metadata I was interested in! Except that because I was using Quarto, and not one of the <a href="https://pkg.garrickadenbuie.com/metathis/index.html#works-in">more common outputs</a> I had a couple of extra steps to take:</p>
<ol type="1">
<li><p>Write my metadata tags to an HTML file, using the <code>write_meta()</code> function:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb21-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># write meta tags to file</span></span>
<span id="cb21-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write_meta</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">path =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"meta-map.html"</span>)</span></code></pre></div></div></li>
<li><p>Manually include this HTML in my webpage via the Quarto file. The <a href="https://quarto.org/docs/output-formats/html-basics.html#includes"><code>include-in-header</code></a> Quarto YAML option helped me here:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb22-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">include-in-header</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> meta-map.html</span></span></code></pre></div></div></li>
</ol>
</section>
<section id="making-the-map-fullscreen" class="level3">
<h3 class="anchored" data-anchor-id="making-the-map-fullscreen">Making the map fullscreen</h3>
<p>A side effect of creating the map from a Quarto (or R Markdown) document is that the output is styled by default to fit within the width of an article (in this case 900 pixels). I wanted the map to take up the whole width of the page, so I made use of the <a href="https://quarto.org/docs/interactive/layout.html#full-page-layout"><code>page-layout</code></a> Quarto YAML option:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb23-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">format</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span></span>
<span id="cb23-2"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span></span>
<span id="cb23-3"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">page-layout</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> custom</span></span></code></pre></div></div>
<p>Another option that worked pretty well was to use the <code>column: screen</code> code chunk option built into Quarto. The Quarto documentation even shows an <a href="https://quarto.org/docs/authoring/article-layout.html#screen-column">example to display a Leaflet map</a> I but it left a thin margin at the top margin, and I wanted the map to be flush against the top edge of the webpage.</p>
</section>
<section id="rendering-the-standalone-map" class="level3">
<h3 class="anchored" data-anchor-id="rendering-the-standalone-map">Rendering the standalone map</h3>
<p>Lastly, I added one more option to the YAML that would render the Quarto document into a <a href="https://quarto.org/docs/output-formats/html-publishing.html#standalone-html">self-contained HTML</a> with all of the content needed to create the map.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb24-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">format</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span></span>
<span id="cb24-2"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">html</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span></span>
<span id="cb24-3"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">page-layout</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> custom</span></span>
<span id="cb24-4"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">self-contained</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">true</span></span></code></pre></div></div>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2022" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2022. <span>“Creating the Philly Center City SIPS
Interactive Map.”</span> May 31. <a href="https://silviacanelon.com/blog/2022-05-31-ccd-sips/">https://silviacanelon.com/blog/2022-05-31-ccd-sips/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>journalism</category>
  <category>tutorial</category>
  <category>maps</category>
  <category>webscraping</category>
  <category>robotstxt</category>
  <category>rvest</category>
  <category>leaflet</category>
  <category>ggmap</category>
  <guid>https://silviacanelon.com/blog/2022-05-31-ccd-sips/</guid>
  <pubDate>Tue, 31 May 2022 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2022-05-31-ccd-sips/featured.png" medium="image" type="image/png" height="75" width="144"/>
</item>
<item>
  <title>Hello Umami: Deploying a Privacy-Friendly Open Source Tool for Web Analytics</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2022-01-18-hello-umami/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<style type="text/css">
.page-main img {
  box-shadow: 0px 0px 2px 2px rgba( 0, 0, 0, 0.2 );
}

.tweet-timestamp {
  display: block;
  position: relative;
  font-size: 1em;
}
.tweet-timestamp a .tweet-timestamp__text {
  color: var(--text-light);
}
.tweet-timestamp a:hover .tweet-timestamp__text {
  color: var(--text-mild);
}
.tweet-timestamp .tweet-link > i {
    display: inline-block;
    position: absolute;
  left: -1.5em;
  top: 3px;
}
</style>
<section id="what-to-expect" class="level2">
<h2 class="anchored" data-anchor-id="what-to-expect">What to expect</h2>
<p>A brief walkthrough of the steps I took to deploy Umami web analytics for my personal website, as documented in a short Twitter thread.</p>
<!-- Code modified from https://github.com/gadenbuie/garrickadenbuie-com/blob/main/content/blog/2020/setting-up-a-new-macbook-pro/index.Rmarkdown -->
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703744220319750" title="2022-01-11 00:50:57" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>Months ago I removed GA from my <a href="https://twitter.com/hashtag/RStats">#RStats</a> <a href="https://twitter.com/hashtag/blogdown">#blogdown</a> site &amp; this weekend I added <a href="http://umami.is" class="uri">http://umami.is</a> 🍚 (<a href="https://twitter.com/caozilla">@caozilla</a>) as an open source, privacy-friendly, web analytics alternative</p>
<p>I was intimidated by the self-hosting aspect, but the docs + <a href="https://twitter.com/Railway">@Railway</a> made it possible! Steps in 🧵</p>
<p><a href="img/FIx3DDLXMAUdyi1.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://silviacanelon.com/blog/2022-01-18-hello-umami/img/FIx3DDLXMAUdyi1.jpg" class="img-fluid"></a></p>
</section>
<section id="installation" class="level2">
<h2 class="anchored" data-anchor-id="installation">Installation</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703746728505346" title="2022-01-11 00:50:58" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>Steps I followed:</p>
<ol type="1">
<li><p>Install Railway CLI with Homebrew <a href="https://docs.railway.app/develop/cli" class="uri">https://docs.railway.app/develop/cli</a></p></li>
<li><p>Install PostgreSQL with Homebrew <a href="https://wiki.postgresql.org/wiki/Homebrew" class="uri">https://wiki.postgresql.org/wiki/Homebrew</a></p></li>
<li><p>Fork Umami repo &amp; follow steps in “Running on Railway from a forked repository” at <a href="https://umami.is/docs/running-on-railway" class="uri">https://umami.is/docs/running-on-railway</a></p></li>
<li><p>Clone repo locally w git</p></li>
</ol>
</section>
<section id="railway" class="level2">
<h2 class="anchored" data-anchor-id="railway">Railway</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703748586590214" title="2022-01-11 00:50:58" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>5. Link local setup to Railway project in the terminal w/ <code>railway link &lt;projectid&gt;</code>. Project ID is in the Railway dashboard under Setup</p>
<ol start="6" type="1">
<li>Create PostgreSQL tables using <code>railway run</code> in local umami directory + steps in “Create database tables” at <a href="https://umami.is/docs/running-on-railway" class="uri">https://umami.is/docs/running-on-railway</a></li>
</ol>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703750247440385" title="2022-01-11 00:50:58" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>7. Deploy with <code>railway up</code>! 🚄</p>
<ol start="8" type="1">
<li><p>Follow steps in Umami Getting Started docs <a href="https://umami.is/docs/login" class="uri">https://umami.is/docs/login</a> to login &amp; add website</p></li>
<li><p>Add tracking code to website. In my <a href="https://twitter.com/hashtag/HugoApero">#HugoApero</a> <a href="https://twitter.com/hashtag/blogdown">#blogdown</a> site I added it to layouts/partials/head.html. My example at <a href="https://github.com/spcanelon/silvia/blob/7d407b5967ae5d1bfe9df97e9a395fd02adeb985/layouts/partials/head.html#L21-L29" class="uri">https://github.com/spcanelon/silvia/blob/7d407b5967ae5d1bfe9df97e9a395fd02adeb985/layouts/partials/head.html#L21-L29</a></p></li>
</ol>
</section>
<section id="tracker-configuration" class="level2">
<h2 class="anchored" data-anchor-id="tracker-configuration">Tracker Configuration</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703752017436677" title="2022-01-11 00:50:59" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>10. In order to not track my own visits to my site, I followed the tip in <a href="https://twitter.com/DeepankarBhade">@DeepankarBhade</a>’s post <a href="https://dpnkr.in/blog/self-host-umami" class="uri">https://dpnkr.in/blog/self-host-umami</a> and disabled Umami from my browser’s local storage. He kindly explained the steps to me in this thread 😅 <a href="https://twitter.com/DeepankarBhade/status/1480214508987551750?s=20" class="uri">https://twitter.com/DeepankarBhade/status/1480214508987551750?s=20</a></p>
</section>
<section id="pricing" class="level2">
<h2 class="anchored" data-anchor-id="pricing">Pricing</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703754018050048" title="2022-01-11 00:50:59" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:50pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>A note about Railway pricing <a href="https://docs.railway.app/reference/limits" class="uri">https://docs.railway.app/reference/limits</a>:</p>
<p>I’m using the free tier, the Starter Plan, which has $5 of credits. In the past 2 days I’ve used $0.7258 of my credits &amp; it’s estimated I’ll use $3.04 by the end of the month. My site receives relatively low traffic, so YMMV</p>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703755733635072" title="2022-01-11 00:51:00" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:51pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>There is a free-ish $10 credit Railway plan available also, where you would only get billed for any usage above $10</p>
<p>For a fully free &amp; more adventurous experience you could give up the convenience of Railway &amp; self-host! See the Umami docs for options <a href="https://umami.is/docs/hosting" class="uri">https://umami.is/docs/hosting</a></p>
</section>
<section id="goatcounter" class="level2">
<h2 class="anchored" data-anchor-id="goatcounter">GoatCounter</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1480703757344284672" title="2022-01-11 00:51:00" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">07:51pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>I’ll leave you with another great free, open source, privacy-friendly option, which is GoatCounter 🐐 <a href="https://www.goatcounter.com/" class="uri">https://www.goatcounter.com/</a>. And <a href="https://twitter.com/mattdray">@mattdray</a> wrote a blogdown post about it! <a href="https://twitter.com/mattdray/status/1306353556706992128?s=20" class="uri">https://twitter.com/mattdray/status/1306353556706992128?s=20</a></p>
<p>For more convos about GA web analytics alternatives, see <a href="https://twitter.com/ma_salmon/status/1379363183526285312?s=20" class="uri">https://twitter.com/ma_salmon/status/1379363183526285312?s=20</a></p>
</section>
<section id="updating-umami" class="level2">
<h2 class="anchored" data-anchor-id="updating-umami">Updating Umami</h2>
<p><span class="tweet-timestamp"><a class="tweet-link" href="https://twitter.com/spcanelon/status/1483512641159147531" title="2022-01-18 18:52:30" target="_blank" rel="noopener noreferrer"><span class="tweet-timestamp__text">01:52pm<i class="pl2 fab fa-twitter fa-fw"></i></span></a></span>Note to self – how to update <a href="http://umami.is" class="uri">http://umami.is</a> with new releases:</p>
<p>Recent update to v1.25.0 <a href="https://github.com/mikecao/umami/releases/tag/v1.25.0" class="uri">https://github.com/mikecao/umami/releases/tag/v1.25.0</a></p>
<ol type="1">
<li>Fetch upstream from my umami fork</li>
<li>Locally in terminal, change to my umami directory</li>
<li>git pull, npm install, railway up 🚄</li>
</ol>
<p>🚀 <a href="https://twitter.com/hashtag/WebAnalytics">#WebAnalytics</a></p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2022" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2022. <span>“Hello Umami: Deploying a Privacy-Friendly
Open Source Tool for Web Analytics.”</span> January 18. <a href="https://silviacanelon.com/blog/2022-01-18-hello-umami/">https://silviacanelon.com/blog/2022-01-18-hello-umami/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>website</category>
  <category>blogdown</category>
  <category>test</category>
  <category>hugo</category>
  <guid>https://silviacanelon.com/blog/2022-01-18-hello-umami/</guid>
  <pubDate>Tue, 18 Jan 2022 05:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2022-01-18-hello-umami/featured.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Resources for Data Viz Accessibility</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/</link>
  <description><![CDATA[ <!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html --><!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
--><!-- <header id="title-block-header" class="quarto-title-block default page-columns"> --><!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> --><div class="cell">
<style type="text/css">
/*.main {
  display: grid | inline-grid;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 4fr;
  grid-auto-flow: row;
  grid-gap: 10px 10px;
}


.grid-item {
  /*background-color: rgba(255, 255, 255, 0.8);*/
  border: 1px solid rgba(0, 0, 0, 0.8);
  /*padding: 20px;
  font-size: 18px;
  line-height: 1.5em;*/
  text-align: left;
  height: auto;
} */

/* -- css for images --*/  
.page-main img {
  box-shadow: 0px 0px 2px 2px rgba( 0, 0, 0, 0.2 );
  #/* ease | ease-in | ease-out | linear */
  transition: transform ease-in-out 2s;
}

.page-main img:hover {
  transform: scale(1.4);
}
</style>
</div>
<p><strong>Updated on 2021-11-19</strong> to include a link to a series of educational blog posts written by Mara Averick that cover <code>highcharter</code> and the accessibility module in detail. Thank you Mara!</p>
<hr>
<section id="general-resources" class="level2"><h2 class="anchored" data-anchor-id="general-resources">General resources</h2>
<ul>
<li><p><strong>Note:</strong> There is an extensive list of data viz accessibility resources at <a href="https://github.com/dataviza11y/resources" class="uri">https://github.com/dataviza11y/resources</a></p></li>
<li><p>Article by Doug Schepers that provides great background on data viz accessibility, explains how data visualization itself is assistive technology, and offers considerations for a variety of readers: <a href="https://medium.com/nightingale/accessibility-is-at-the-heart-of-data-visualization-64a38d6c505b">Why Accessibility Is at the Heart of Data Visualization</a></p></li>
<li><p>The <a href="https://chartability.fizz.studio/">Chartability methodology</a> helps data viz practitioners audit their data viz, and it’s language/tool-agnostic. Chartability was created by Frank Elavsky with input from the broader community and is the most thorough set of standards I’ve come across.</p></li>
<li>
<p>Øystein Moseng provides some basic practices to consider in the post <a href="https://www.highcharts.com/blog/tutorials/10-guidelines-for-dataviz-accessibility/">10 Guidelines for DataViz Accessibility</a>. Among those included are these two which I don’t see covered as often:</p>
<ul>
<li><p>Do not rely on color alone to convey information. I’ve also heard this referred to as “color independence” and in some cases as “dual-encoding” of information</p></li>
<li>
<p>Prefer simple, familiar visualizations over complex novelties.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/guidelines-oystein-moseng.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Pie chart from Øystein’s post using color and (optional) patterns to encode information"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/guidelines-oystein-moseng.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The pie chart using color and pattern to differentiate between slices. This screenshot also demos an interactive chart element in action: hovering over one pie slice enlarges the slice, reveals more information about the selected slice, and dims the non-selected slices."></a></p>
</figure>
</div>
<figcaption>Pie chart from Øystein’s post using color and (optional) patterns to encode information</figcaption></figure>
</div>
</li>
</ul>
</li>
<li><p>Talk at the Data Visualization Society’s Outlier conference earlier this year, by Frank Elavsky, Larene Le Gassick, and Sarah Fossheim: <a href="https://www.youtube.com/watch?v=SWB-KLXN-Ok">Are your visualizations excluding people?</a></p></li>
<li>
<p>Guidelines by Amy Cesal on how to write alt text for data visualizations: <a href="https://medium.com/nightingale/writing-alt-text-for-data-visualization-2a218ef43f81">Writing Alt Text for Data Visualization</a></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/alt-text-amy-cesal.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Example template from Amy’s post"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/alt-text-amy-cesal.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="Example alt text format that reads: Chart type of type of data where reason for including chart. Also the recommendation to include a link to the data source somewhere in the text."></a></p>
</figure>
</div>
<figcaption>Example template from Amy’s post</figcaption></figure>
</div>
</li>
<li>
<p>Post by Lisa Charlotte Muth on how to pick colors for your data viz that everyone can appreciate: <a href="https://blog.datawrapper.de/beautifulcolors/">How to pick more beautiful colors for your data visualizations - Datawrapper Blog</a></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/datawrapper.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="Example from Charlotte’s post of two different approaches to improving a pie chart"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/datawrapper.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The first pie chart uses colors of similar lightness that end up appearing the same when checked under grayscale simulation. The first option for improvement picks different colors that all stand out from one another in grayscale. The second option keeps the original colors but delineates pie slices with a contrasting border."></a></p>
</figure>
</div>
<figcaption>Example from Charlotte’s post of two different approaches to improving a pie chart</figcaption></figure>
</div>
</li>
<li>
<p>Post by Gareth Ford Williams from The Readability Group about how to make more informed font choices: <a href="https://medium.com/the-readability-group/a-guide-to-understanding-what-makes-a-typeface-accessible-and-how-to-make-informed-decisions-9e5c0b9040a0">A Guide to Understanding What Makes a Typeface Accessible</a></p>
<ul>
<li>
<p>Related is a talk from The Readability Group sharing findings from a survey study about font preferences including 2000+ participants. Among these were participants with dyslexia characteristics and participants with poor near vision: <a href="https://youtu.be/h8IOqUl1zII?t=1029">Don’t Believe the Type!</a></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/typeface-poor-near-vision.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="Bar graph showing the frequency by which 20 different fonts were selected by study participants with strong poor near vision in comparison with users with no poor near vision."><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/typeface-poor-near-vision.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The fonts selected most often in this group were San Francisco Pro, Red Hat Text, Calibri, and Segoe UI, in that order. San Francisco Pro was selected by 68% of participants The fonts selected least often were Open Dyslexic, Dyslexie, Comic Sans MS, and Sylexiad Sans. Open Dyslexic was selected by 12% of participants. Both Times New Roman and Helvetica are highlighted as showing the largest differences between users with poor near vision and those without. Times New Roman was the 6th least selected and Helvetica was in the middle learning towards the most selected fonts."></a></p>
</figure>
</div>
<figcaption>Bar graph showing the frequency by which 20 different fonts were selected by study participants with strong poor near vision in comparison with users with no poor near vision.</figcaption></figure>
</div>
</li>
</ul>
</li>
<li>
<p>Sarah Fossheim authored a post titled <a href="https://fossheim.io/writing/posts/accessible-dataviz-design/">An intro to designing accessible data visualizations</a> which uses real-word applications to demonstrate 10 different accessibility practices.</p>
<p>Sarah also provides a code-through showing how to make screenreader-friendly graphs using D3.js in their post <a href="https://fossheim.io/writing/posts/apple-dataviz-a11y-tutorial/">How to create a screen reader accessible graph like Apple’s with D3.js</a></p>
<p><a href="img/d3js-apple-rings.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/d3js-apple-rings.png" class="img-fluid" alt=""></a></p>
</li>
<li>
<p>Amber Thomas provides an example of how to make scrollytales more accessible in a piece created with Ofunne Amaka for The Pudding: <a href="https://pudding.cool/2021/03/foundation-names/">The Naked Truth</a></p>
<blockquote class="twitter-tweet blockquote" data-conversation="none">
<p lang="en" dir="ltr">
</p>
<p>I'm excited to release this project for many reasons, but one among them is that I introduced lots of new (to me) <a href="https://twitter.com/hashtag/a11y?src=hash&amp;ref_src=twsrc%5Etfw">#a11y</a> features. My favorite: the ability to turn off scrollytelling 💖 Would love to hear what folks think! <a href="https://t.co/eDSQr9RjFe">pic.twitter.com/eDSQr9RjFe</a></p>

<p>— Amber Thomas (@ProQuesAsker) <a href="https://twitter.com/ProQuesAsker/status/1375159092684058626?ref_src=twsrc%5Etfw">March 25, 2021</a></p>
</blockquote>
<script async="" src="img/https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</li>
<li>
<p>Chris DeMartini has a series of blog posts documenting his journey auditing one of his public Tableau visualizations for accessibility:</p>
<ol type="1">
<li><a href="https://datablick.com/blog/2021/2/4/a-tableau-accessibility-journey-part-i">A Tableau Accessibility Journey</a></li>
<li><a href="https://datablick.com/blog/2021/2/18/a-tableau-accessibility-journey-part-ii-focus-order">Focus Order</a></li>
<li><a href="https://www.datablick.com/blog/2021/4/15/a-tableau-accessibility-journey-part-iii-color-contrast-and-font-size">Color Contrast and Font Size</a></li>
<li>
<a href="https://www.datablick.com/blog/2021/8/10/a-tableau-accessibility-journey-part-iv-keyboard-accessibility">Keyboard Accessibility</a> <br><br>
</li>
</ol>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/tableau-chris-demartini.png" class="lightbox" data-gallery="quarto-lightbox-gallery-6" title="Title of Chris’s Tableau visualization being checked for color contrast."><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/tableau-chris-demartini.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The user is using a kind of selection tool to hover over an area of the visualization, in this case the title, and check font color contrast against its background. The tool pulls up details along the bottom of the page, including WCAG pass/fail test results, background and foreground color hex codes, and other color characteristics."></a></p>
</figure>
</div>
<figcaption>Title of Chris’s Tableau visualization being checked for color contrast.</figcaption></figure>
</div>
</li>
</ul></section><section id="r-resources" class="level2"><h2 class="anchored" data-anchor-id="r-resources">R resources</h2>
<ul>
<li>
<p><a href="https://twitter.com/DogGeneticsLLC">Liz Hare</a> and I gave a talk earlier this year on alt text in data viz shared as a part of TidyTuesday on Twitter. After web-scraping alt text from TidyTuesday tweets we found that only 3% of data viz tweets had alt text to accompany them (over the first 3 years of the TidyTuesday project). Links to the video recording, slides, and resources at https://github.com/spcanelon/csvConf2021. The talk includes guidelines on what makes effective alt text for data viz (complementary to those Amy Cesal includes in her post).</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/alt-text-silvia-liz.png" class="lightbox" data-gallery="quarto-lightbox-gallery-7" title="Slide from our presentation summarizing the most useful alt-text features found among 196 data viz tweets"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/alt-text-silvia-liz.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="Effective alt includes a description that conveys meaning in the data, variables on the axes, scale described within the description, description of the type of plot. Direct link to slide: https://spcanelon.github.io/csvConf2021/slides/indexLH.html#11"></a></p>
</figure>
</div>
<figcaption>Slide from our presentation summarizing the most useful alt-text features found among 196 data viz tweets</figcaption></figure>
</div>
</li>
<li>
<p>Post from RStudio on how to add alt text to visualizations produced in R Markdown using code chunk option <code>fig.alt</code>: <a href="https://blog.rstudio.com/2021/04/20/knitr-fig-alt/">New in knitr: Improved accessibility with image alt text</a>. <br><strong>New in knitr v1.35:</strong> You can now add code chunk options <a href="https://github.com/yihui/knitr/blob/master/NEWS.md#new-features-1">inside the code chunk</a>!</p>
<p>Example updated thanks to a <a href="https://twitter.com/grrrck/status/1442941720455368704?s=20">heads-up from Garrick</a>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#| fig.cap: Bigger flippers, bigger bills </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#| fig.alt: Scatterplot of flipper length by bill length of 3 penguin species, where we show penguins with bigger flippers have bigger bills.</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguins</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">flipper_length_mm</span>,</span>
<span>                            y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bill_length_mm</span>,</span>
<span>                            color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_point</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shape <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, alpha <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">scale_color_manual</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"darkorange"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"purple"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cyan4"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
<p class="caption" style="text-align:center;">
</p>
<p>Code chunk adapted from the RStudio blog post</p>

<details><p>The previous example included <code>fig.cap</code> and <code>fig.alt</code> in the code chunk heading:</p>
<div class="cell">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="index_files/figure-html/unnamed-chunk-2-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-8" title="Bigger flippers, bigger bills"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/index_files/figure-html/unnamed-chunk-2-1.png" class="img-fluid figure-img" alt="Scatterplot of flipper length by bill length of 3 penguin species, where we show penguins with bigger flippers have bigger bills." width="672"></a></p>
<figcaption>Bigger flippers, bigger bills</figcaption></figure>
</div>
</div>
</div>
</details>
</li>
<li>
<p>The <a href="https://coolbutuseless.github.io/package/ggpattern/index.html">ggpattern R package</a> developed by Mike FC supports filling ggplot2 geometries with patterns. If used judiciously, patterns can help make visualizations more accessible by providing an additional way to encode information without relying on color. Below is one example using ggpattern v0.2.2:</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/trevorld/ggpattern">ggpattern</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguinColors</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"darkorange"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"purple"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cyan4"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguins</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_bar_pattern</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span>,</span>
<span>                    pattern <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span>,</span>
<span>                    pattern_color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">species</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguinColors</span>,</span>
<span>  alpha <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,</span>
<span>  linewidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,</span>
<span>  color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguinColors</span>,</span>
<span>  pattern_color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguinColors</span>,</span>
<span>  pattern_fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">penguinColors</span>,</span>
<span>  pattern_spacing <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.025</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">theme_minimal</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">theme</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>legend.position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'none'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="index_files/figure-html/unnamed-chunk-3-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-9" title="Different patterns mapped onto penguin species along with different colors"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/index_files/figure-html/unnamed-chunk-3-1.png" class="img-fluid figure-img" alt="Bar chart showing 3 penguin species along the x axis and the number of observations on the y axis. The bar for the Adelie species uses the color orange and diagonal stripes, the bar for Chinstrap species uses the color purple and crosshatches, and the bar for the Gentoo species uses the color cyan and a dotted pattern." width="672"></a></p>
<figcaption>Different patterns mapped onto penguin species along with different colors</figcaption></figure>
</div>
</div>
</div>
</li>
<li>
<p>The <a href="https://jkunst.com/highcharter/index.html">Highcharter R package</a> developed by Joshua Kunst adds interactivity to data viz using Highcharts JavaScript components designed with <a href="https://www.highcharts.com/accessibility/#exploreFeatures">web accessibility in mind</a>. The package has a learning curve, but lucky for us Mara Averick wrote an excellent <a href="https://dataand.me/index.html#category:highcharter">series of blog posts on using the Highcharts accessibility module with {highcharter}</a>.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/highcharter-mara-averick.png" class="lightbox" data-gallery="quarto-lightbox-gallery-10" title="Interactive scatterplot from Mara’s post using color and shape to encode information about penguin species"><img src="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/img/highcharter-mara-averick.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="Scatterplot of the palmerpenguins dataset showing data points clustered by species and the highcharter package making it possible to focus on one cluster and identify the x and y values of a specific data point. In this case the data point is a Chinstrap penguin observation mapping to a flipper length of 201mm and bill length of 54.2mm. Explore this data viz with a screen reader in Mara's blog post: https://dataand.me/posts/2021-11-15-accessible-highcharter-part-4/#an-accessible-penguin-plot"></a></p>
</figure>
</div>
<figcaption>Interactive scatterplot from Mara’s post using color and shape to encode information about penguin species</figcaption></figure>
</div>
</li>
</ul>


</section><a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2021" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2021. <span>“Resources for Data Viz
Accessibility.”</span> September 23. <a href="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/">https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>journalism</category>
  <category>data viz</category>
  <category>a11y</category>
  <category>ggpattern</category>
  <category>highcharter</category>
  <guid>https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/</guid>
  <pubDate>Thu, 23 Sep 2021 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2021-09-23-data-viz-a11y/featured.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>WAVE Audit No. 1</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2021-06-02-wave-audit-1/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<blockquote class="blockquote">
<p><strong>Did you know that 97.4% of home pages have web accessibility failures???</strong> 😱</p>
</blockquote>
<p>This finding is one of many from an accessibility analysis that non-profit WebAIM (Web Accessibility in Mind) conducts annually on home pages of the top one million websites. You can find a summary of these findings in a WebAIM <a href="https://webaim.org/blog/webaim-million-2021/">blog post</a> and detailed information in the <a href="https://webaim.org/projects/million/#wcag">full report</a>, both published on April 30, 2021.</p>
<p>Learning about all of the ways that digital content is made inaccessible to people with disabilities has made me take inventory of the different ways that I have contributed to this problem (there was some shame to process here 🙈).</p>
<p>The magic of <a href="https://bookdown.org/yihui/rmarkdown/">R Markdown</a> has given me the gift of turning R code into a variety of HTML outputs including R notebooks, <a href="../../project/#category=xaringan">xaringan presentation slides</a>, and websites like this one – all of which I’ve been able to share freely online with others. This magic though (like all magic?) comes with limitations. R tools (and technology more broadly) can’t automatically ensure that its various outputs are accessible to everyone. That’s where we come in as software developers and content creators and take personal responsibility. At the risk of extending this metaphor too far, I’ll finish by offering the framework that we all need to practice (accessibility) spells/skills in order to use these magical tools responsibly.</p>
<p>All of this to say that gaining awareness about accessibility as a way to create the more inclusive world that I want to live in has motivated me to do better. I even found myself excited to conduct accessibility audits on my digital content, including my personal website (<a href="https://chartability.fizz.studio/">data viz</a> too)!</p>
<section id="my-audit-results" class="level3">
<h3 class="anchored" data-anchor-id="my-audit-results">My audit results</h3>
<p>I relied on WebAIM’s <a href="https://wave.webaim.org/">Web Accessibility Evaluation Tool (WAVE)</a> to help me get started. I installed the <a href="https://wave.webaim.org/extension/">Firefox extension</a> to conduct my audit. Here’s what I found at a high level, and each section of the post contains an itemized list of failures for the page along with a screenshot:</p>
<ul>
<li><p>Most errors corresponded with missing alt-text for any images that are used to decorate page sidebars or populate thumbnails</p></li>
<li><p>Some of my alt-text descriptions are too long! 😆 I’ll use this example to highlight some of the super helpful features of the WAVE tool. Below is a screenshot of the tool when I select the alert next to the super long alt-text description for a hex logo 🤦‍♀️</p>
<details>
<summary>
<p>WAVE tool reference and code accompanying an alert</p>
</summary>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-ex-alt-text.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Reference pane of the tool elaborates on what the alert means, why it matters, how to fix it, a note on the tool’s algorithm, and a link to the WCAG standards and guidelines. Code section is expanded along the bottom and highlights exactly what part of the HTML code the alert is refering to."><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-ex-alt-text.png" class="img-fluid figure-img" alt="Reference pane of the tool elaborates on what the alert means, why it matters, how to fix it, a note on the tool's algorithm, and a link to the WCAG standards and guidelines. Code section is expanded along the bottom and highlights exactly what part of the HTML code the alert is refering to."></a></p>
<figcaption>Reference pane of the tool elaborates on what the alert means, why it matters, how to fix it, a note on the tool’s algorithm, and a link to the WCAG standards and guidelines. Code section is expanded along the bottom and highlights exactly what part of the HTML code the alert is refering to.</figcaption>
</figure>
</div>
</details></li>
<li><p>My blog and talk listings have redundant links because these layouts have thumbnails enabled and both the thumbnail and the title of the post are active links</p></li>
<li><p>There are 5 alerts (combined) in the navigation bar and footer that appear on every page. These correspond to redundant title links. For example, the link for my Blog has the name “Blog” and also the title “Blog.” This is something I can fix easily in the <strong>config.toml</strong> configuration file. I was wondering how these two fields were different in that file and now I know!</p></li>
<li><p>The blog post example I documented here contained 177 low contrast errors! These were all related to the <a href="https://xyproto.github.io/splash/docs/arduino.html">arduino syntax highlighting</a> in the various code chunks that I included. The code chunks currently feature primarily gray code against a white background.</p></li>
</ul>
</section>
<section id="next-steps" class="level3">
<h3 class="anchored" data-anchor-id="next-steps">Next steps</h3>
<p>I’m <em>definitely</em> not an accessibility expert by any stretch of the imagination. But the great thing is, I don’t have to be an expert in order to correct some of these failures! :muscle:</p>
<p>I’m going to need some more Hugo knowledge to correct some of the other ones but I <em>think</em> I’ve become familiar enough with the Hugo Apéro theme building this site that I <em>might</em> be able to poke around and make some changes. In either case, I’ll be documenting my changes in this <a href="https://silviacanelon.com/blog/#category=a11y">a11y series of blog posts</a>, so stay tuned and follow along with me!</p>
<blockquote class="blockquote">
<p>Update (June 7, 2021): I’ve opened <a href="https://github.com/spcanelon/silvia/issues/28">issue #28</a> and have the first changes in branch <code>wave-audit-1</code> <a href="https://deploy-preview-29--silvia.netlify.app/">available to preview</a> before merging.</p>
</blockquote>
<p>I’ll be learning from the <a href="https://tetralogical.com/articles/wcag-primer/">WCAG primer from TetraLogical</a>, recommended by the <a href="https://www.a11yproject.com/checklist/#further-reading">a11y Project</a>, and the <a href="https://www.w3.org/WAI/roles/designers/">WCAG resources from WebAIM</a>.</p>
<p>And last but not least:</p>
<blockquote class="blockquote">
<p><strong>Even if I manage to correct all of these errors and alerts, it doesn’t mean my site is fully accessible.</strong></p>
</blockquote>
<p>It just means it’s more accessible than when I began. There are numerous accessibility considerations that are very hard to test for failure (e.g.&nbsp;cognitive accessibility, flexibility, etc.) that I continue to learn about. Also, accessibility is changing all of the time, and we need to be ready to change with it. So just like with R, the learning doesn’t stop! 🤓</p>
</section>
<section id="home-page" class="level2">
<h2 class="anchored" data-anchor-id="home-page">Home page</h2>
<p>Link: <a href="../..">https://silvia.rbind.io/</a></p>
<p>Audit results:</p>
<ul>
<li>1 error
<ul>
<li>1 x Missing alternative text</li>
</ul></li>
<li>6 alerts
<ul>
<li>1 x Suspicious link text</li>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-home.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Figure 1: Audit for my home page"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-home.png" class="img-fluid figure-img" alt="There is an error symbol next to the decorative image on the home page. There are also alert symbols for links in the navigation bar and footer."></a></p>
<figcaption>Figure 1: Audit for my home page</figcaption>
</figure>
</div>
</section>
<section id="about-page" class="level2">
<h2 class="anchored" data-anchor-id="about-page">About page</h2>
<p>Link: <a href="../../about/">https://silvia.rbind.io/about/</a></p>
<p>Audit results:</p>
<ul>
<li>4 errors
<ul>
<li>3 x Linked image missing alternative text</li>
<li>1 x Empty link</li>
</ul></li>
<li>19 alerts
<ul>
<li>2 x Skipped heading level</li>
<li>1 x Possible heading</li>
<li>4 x Suspicious link text</li>
<li>7 x Redundant link</li>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-about-header.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="Figure 2: Audit for my About page header"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-about-header.png" class="img-fluid figure-img" alt="About page showing an alert in my blurb"></a></p>
<figcaption>Figure 2: Audit for my About page header</figcaption>
</figure>
</div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-about-main-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="Figure 3: Audit for the main section of my About page"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-about-main-top.png" class="img-fluid figure-img" alt="An alert is shown next to some heading items, and a link. An error is shown next to a thumbnail image for the featured blog post"></a></p>
<figcaption>Figure 3: Audit for the main section of my About page</figcaption>
</figure>
</div>
<details>
<summary>
Full page screenshot
</summary>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-about.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5" title="Figure 4: Audit for my About page in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-about.png" class="img-fluid figure-img" alt="Alerts are shown for links in the navigation bar and footer, for some heading items, and for a few links throughout the page"></a></p>
<figcaption>Figure 4: Audit for my About page in full page view</figcaption>
</figure>
</div>
</details>
</section>
<section id="blog-page" class="level2">
<h2 class="anchored" data-anchor-id="blog-page">Blog page</h2>
<p>Link: <a href="../../blog/">https://silvia.rbind.io/blog/</a></p>
<p>Audit results:</p>
<ul>
<li>6 errors
<ul>
<li>1 x Missing alternative text</li>
<li>5 x Linked image missing alternative text</li>
</ul></li>
<li>10 alerts
<ul>
<li>5 x Redundant link</li>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-blog.png" class="lightbox" data-gallery="quarto-lightbox-gallery-6" title="Figure 5: Audit for my Blog listing page in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-blog.png" class="img-fluid figure-img" alt="Alerts are shown for the navigation bar and footer, and for blog post links. Errors shown for the decorative image for the page and for the blog post thumbnails."></a></p>
<figcaption>Figure 5: Audit for my Blog listing page in full page view</figcaption>
</figure>
</div>
<section id="blog-example" class="level3">
<h3 class="anchored" data-anchor-id="blog-example">Blog example</h3>
<p>Link: <a href="../../blog/2021-hello-hugo-apero/">https://silvia.rbind.io/blog/hello-hugo-apero/</a></p>
<p>Audit results:</p>
<ul>
<li>25 errors
<ul>
<li>1 x Missing alternative text</li>
<li>24 x Empty link</li>
</ul></li>
<li>177 contrast errors
<ul>
<li>177 x Very low contrast</li>
</ul></li>
<li>17 alerts
<ul>
<li>9 x Long alternative text</li>
<li>1 x Skipped heading level</li>
<li>1 x Broken same-page link</li>
<li>6 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-blog-hha-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-7" title="Alerts shown for links in the navigation bar and for a heading item. Errors shown for the blog decorative image and for a link symbol next to a header."><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-blog-hha-top.png" class="img-fluid figure-img" alt="Figure 6: Audit for my Hello Hugo Apéro blog post"></a></p>
<figcaption>Alerts shown for links in the navigation bar and for a heading item. Errors shown for the blog decorative image and for a link symbol next to a header.</figcaption>
</figure>
</div>
</section>
</section>
<section id="talk-page" class="level2">
<h2 class="anchored" data-anchor-id="talk-page">Talk page</h2>
<p>Link: <a href="../../talk/">https://silvia.rbind.io/talk/</a></p>
<p>Audit results:</p>
<ul>
<li>5 errors
<ul>
<li>5 x Linked image missing alternative text</li>
</ul></li>
<li>13 alerts
<ul>
<li>5 x Linked image missing alternative text</li>
<li>2 x Skipped heading level</li>
<li>5 x Redundant link</li>
<li>5 x Redundant title text</li>
<li>1 x YouTube video</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-talks-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-8" title="Figure 7: Audit for my Talk listing page"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-talks-top.png" class="img-fluid figure-img" alt="Alerts displayed for a heading item and the primary link to a talk. An error is displayed for the talk thumbnail."></a></p>
<figcaption>Figure 7: Audit for my Talk listing page</figcaption>
</figure>
</div>
<details>
<summary>
Full page screenshot
</summary>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-talks.png" class="lightbox" data-gallery="quarto-lightbox-gallery-9" title="Figure 8: Audit for my About page header in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-talks.png" class="img-fluid figure-img" alt="Alerts displayed in the navigation bar and footer, some heading items, all primary talk links, and a YouTube button link. Errors displayed for all talk thumbnail images."></a></p>
<figcaption>Figure 8: Audit for my About page header in full page view</figcaption>
</figure>
</div>
</details>
<section id="talk-example" class="level3">
<h3 class="anchored" data-anchor-id="talk-example">Talk example</h3>
<p>Link: <a href="../../talk/2021-data-viz-accessibility/">https://silvia.rbind.io/talk/2021-data-viz-accessibility/</a></p>
<p>Audit results:</p>
<ul>
<li>1 error
<ul>
<li>1 x Empty link</li>
</ul></li>
<li>6 alerts
<ul>
<li>1 x Skipped heading level</li>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-talks-csvconf.png" class="lightbox" data-gallery="quarto-lightbox-gallery-10" title="Figure 9: Audit for my CSV Conf talk post in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-talks-csvconf.png" class="img-fluid figure-img" alt="Alerts displayed for the navigation bar and footer, as well as the talk summary. No errors are displayed."></a></p>
<figcaption>Figure 9: Audit for my CSV Conf talk post in full page view</figcaption>
</figure>
</div>
</section>
</section>
<section id="publication-page" class="level2">
<h2 class="anchored" data-anchor-id="publication-page">Publication page</h2>
<p>Link: <a href="../../publication/">https://silvia.rbind.io/publication/</a></p>
<p>Audit results:</p>
<ul>
<li>0 errors</li>
<li>5 alerts
<ul>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-pubs-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-11" title="Figure 10: Audit for my Publication listing page"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-pubs-top.png" class="img-fluid figure-img" alt="No errors or alerts displayed for this view"></a></p>
<figcaption>Figure 10: Audit for my Publication listing page</figcaption>
</figure>
</div>
<details>
<summary>
Full page screenshot
</summary>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-pubs.png" class="lightbox" data-gallery="quarto-lightbox-gallery-12" title="Alerts displayed for the navigation bar and footer"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-pubs.png" class="img-fluid figure-img" alt="Figure 11: Audit for my Publication listing page in full page view"></a></p>
<figcaption>Alerts displayed for the navigation bar and footer</figcaption>
</figure>
</div>
</details>
<section id="publication-example" class="level3">
<h3 class="anchored" data-anchor-id="publication-example">Publication example</h3>
<p>Link: <a href="../../publication/2021-geospatial-analysis-pregnancy-outcomes/">https://silvia.rbind.io/publication/2021-geospatial-analysis-pregnancy-outcomes/</a></p>
<p>Audit results:</p>
<ul>
<li>1 errors
<ul>
<li>1 x Empty link</li>
</ul></li>
<li>6 alerts
<ul>
<li>1 x Skipped heading level</li>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-pubs-geo.png" class="lightbox" data-gallery="quarto-lightbox-gallery-13" title="Figure 12: Audit for my geospatial analysis publication in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-pubs-geo.png" class="img-fluid figure-img" alt="Alerts displayed for the header bar and footer and for the publication summary"></a></p>
<figcaption>Figure 12: Audit for my geospatial analysis publication in full page view</figcaption>
</figure>
</div>
</section>
</section>
<section id="project-page" class="level2">
<h2 class="anchored" data-anchor-id="project-page">Project page</h2>
<p>Link: <a href="../../project/">https://silvia.rbind.io/project/</a></p>
<p>Audit results:</p>
<ul>
<li>3 errors
<ul>
<li>3 x Empty link</li>
</ul></li>
<li>5 alerts
<ul>
<li>5 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-projects-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-14" title="Figure 13: Audit for my Project listing page"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-projects-top.png" class="img-fluid figure-img" alt="Errors displayed next to each project thumbnail image"></a></p>
<figcaption>Figure 13: Audit for my Project listing page</figcaption>
</figure>
</div>
<section id="project-example" class="level3">
<h3 class="anchored" data-anchor-id="project-example">Project example</h3>
<p>Link: <a href="../../project/2021-tidy-tuesday-alt-text/">https://silvia.rbind.io/project/2021-tidy-tuesday-alt-text/</a></p>
<p>Audit results:</p>
<ul>
<li>2 errors
<ul>
<li>2 x Empty link</li>
</ul></li>
<li>10 alerts
<ul>
<li>3 x Long alternative text</li>
<li>1 x Skipped heading level</li>
<li>6 x Redundant title text</li>
</ul></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-projects-ttat-top.png" class="lightbox" data-gallery="quarto-lightbox-gallery-15" title="Figure 14: Audit for my TidyTuesdayAltText project post"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-projects-ttat-top.png" class="img-fluid figure-img" alt="Alert displayed in the project summary and next to an image alt-text. Error dislayed next to a link symbol accompanying a heading."></a></p>
<figcaption>Figure 14: Audit for my TidyTuesdayAltText project post</figcaption>
</figure>
</div>
<details>
<summary>
Full page screenshot
</summary>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="img/wave-projects-ttat.png" class="lightbox" data-gallery="quarto-lightbox-gallery-16" title="Figure 15: Audit for my TidyTuesdayAltText project post in full page view"><img src="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/img/wave-projects-ttat.png" class="img-fluid figure-img" alt="Alerts shown in the navigation bar and footer, project summary, and image alt-text. Errors shown next to link symbols accompanying headings."></a></p>
<figcaption>Figure 15: Audit for my TidyTuesdayAltText project post in full page view</figcaption>
</figure>
</div>
</details>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2021" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2021. <span>“WAVE Audit No. 1.”</span> June 2. <a href="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/">https://silviacanelon.com/blog/2021-06-02-wave-audit-1/</a>.
</div></div></section></div> ]]></description>
  <category>website</category>
  <category>education</category>
  <category>a11y</category>
  <guid>https://silviacanelon.com/blog/2021-06-02-wave-audit-1/</guid>
  <pubDate>Wed, 02 Jun 2021 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2021-06-02-wave-audit-1/featured.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Hello Hugo Apéro: Converting a Blogdown Site from Hugo Academic</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/</link>
  <description><![CDATA[ <!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html --><!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
--><!-- <header id="title-block-header" class="quarto-title-block default page-columns"> --><!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> --><div class="cell">
<div class="cell-output cell-output-stderr">
<pre><code>Warning: package 'xaringanExtra' was built under R version 4.3.3</code></pre>
</div>
<div class="cell-output-display">

</div>
</div>
<div class="cell" data-layout-align="center">
<style type="text/css">
.page-main img {
  box-shadow: 0px 0px 2px 2px rgba( 0, 0, 0, 0.2 );
}
</style>
</div>
<section id="what-to-expect" class="level2"><h2 class="anchored" data-anchor-id="what-to-expect">What to expect</h2>
<p>By the end of the tutorial you will have switched your website from using the Hugo Academic theme to using the new <a href="https://alison.rbind.io/project/hugo-apero/">Hugo Apéro theme designed by Alison Hill</a> <i class="fa-solid fa-glass-cheers" aria-label="glass-cheers"></i></p>
<p>Specifically you will be able to migrate your blog, publications, and talks. If you need to migrate courses, I recommend taking a look at how <a href="https://alison.rbind.io/project/">Alison</a> and <a href="https://www.kelly-bodwin.com/courses/">Kelly Bodwin</a> organized their courses and workshops into projects using this theme. I didn’t have projects prior to converting my site, but after creating a few projects post-Apéro I’m confident any projects you’ve created pre-Apéro will carry over easily.</p>
<details><summary>
Projects on my site: https://silvia.rbind.io/project
</summary><div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-project-list.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="My Project listing: https://silvia.rbind.io/project"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-project-list.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The Project listing page for my site with a grid layout featuring thumbnail images. The top of the page says 'Projects' and below is a short description of what can be found on the page. It also includes a by-line that reads 'Written by Silvia Canelón.' There are three projects featured with a decorative thumbnail image, a title, and a summary. Items also include an author and category links but they are cut off in this screenshot." width="1265"></a></p>
</figure>
</div>
<figcaption>My Project listing: https://silvia.rbind.io/project</figcaption></figure>
</div>
</div>
</div>
</details><p>If you like videos, Alison recorded a <a href="https://youtu.be/oBtDgW9u7Nw">walkthrough of this conversion process</a> using Julia Silge’s site as an example.</p>
<p><strong>What <em>not</em> to expect</strong></p>
<p>A tutorial on how to create a Hugo Apéro site from scratch – but don’t worry! Alison covers this in a <a href="https://alison.rbind.io/talk/2021-iyo-tunis/">workshop she gave for R-Ladies Tunis</a> and in the <a href="https://hugo-apero-docs.netlify.app/start/">Get started series of blog posts</a> included in the documentation site.</p>
</section><section id="the-plan" class="level2"><h2 class="anchored" data-anchor-id="the-plan">The Plan</h2>
<p>I was lucky that Alison had already started converting her own personal site because she gave me a template and example to follow! <i class="fa-solid fa-hands-helping" aria-label="hands-helping"></i></p>
<p>We’ll follow the steps below throughout the tutorial and each of the six steps comes with its own commit in my git history, so you can see exactly what I changed and when. <i class="fa-solid fa-code-branch" aria-label="code-branch"></i></p>
{{&lt; tweet 1370027805543698432 &gt;}}
<p>Then we’ll reuse and migrate your existing content, set up a contact form, tidy up your directory, explore some resources for customizing your new site, and end with the grand finale: deploying your new site!</p>
</section><section id="prework" class="level2"><h2 class="anchored" data-anchor-id="prework">Prework</h2>
<section id="branch-deploy" class="level3"><h3 class="anchored" data-anchor-id="branch-deploy">Branch deploy</h3>
<p>Create a new <code>apero</code> branch from the primary branch of your website repository</p>
<ol type="1">
<li><p><code>git checkout -b apero</code> to create new local branch</p></li>
<li><p><code>git push --set-upstream origin apero</code> to push new branch to GitHub</p></li>
</ol>
<p>Create a new Netlify deploy from your <code>apero</code> branch by enabling branch deploys on Netlify.com. Garrick Aden-Buie kindly provided some great resources on how to do this <a href="https://twitter.com/grrrck/status/1384960915276275715">on Twitter</a>. Netlify will automatically deploy a live preview of your site from your new branch to a link like <strong>&lt;branch-name&gt;--silvia.netlify.app</strong>. In my case it was https://apero–silvia.netlify.app</p>
<p><i class="fa-solid fa-route" aria-label="route"></i> Site settings: Build &amp; deploy &gt; Continuous Deployment &gt; Deploy contexts</p>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/netlify-branch-deploy.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Netlify site settings for deploy contexts"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/netlify-branch-deploy.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:75.0%" alt="The deploy contexts section after clicking the Edit settings button. This section shows three settings that can be edited. The first is the production branch which is set to 'main' in a free text box. The second is deploy previews which is a radio button set to 'any pull request against your production branch/branch deploy branches (as opposed to 'none'). The third is branch deploys which is a radio button set to 'all' (as opposed to 'none' and 'let me add individual branches'). There are two buttons at the bottom of this section, Save and Cancel."></a></p>
</figure>
</div>
<figcaption>Netlify site settings for deploy contexts</figcaption></figure>
</div>
</div>
</div>
<p>Your new apero branch deploy at this point is an independent copy of your current website so from here on out you can make changes freely without affecting anything in your main branch :tada:</p>
</section><section id="hugo-version" class="level3"><h3 class="anchored" data-anchor-id="hugo-version">Hugo version</h3>
<p>The last piece of prework before we dive in is to update your local version of Hugo and update the Hugo version accordingly in a few different places.</p>
<ol type="1">
<li>
<p>Update Hugo locally using <code>blogdown::install_hugo()</code> (for me the latest version was v0.82.1)</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">blogdown</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_hugo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</li>
<li>
<p>Update <strong>.Rprofile</strong> and then restart R per the instructions that appear in the console.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># fix Hugo version</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>blogdown.hugo.version <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</li>
<li>
<p>Update <strong>netlify.toml</strong></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1">[context.production.environment]</span>
<span id="cb4-2">  HUGO_VERSION <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span></span>
<span id="cb4-3">  HUGO_ENV <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"production"</span></span>
<span id="cb4-4">  HUGO_ENABLEGITINFO <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"true"</span></span>
<span id="cb4-5"></span>
<span id="cb4-6">[context.branch<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>deploy.environment]</span>
<span id="cb4-7">  HUGO_VERSION <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span></span>
<span id="cb4-8"></span>
<span id="cb4-9">[context.deploy<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>preview.environment]</span>
<span id="cb4-10">  HUGO_VERSION <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span></span></code></pre></div></div>
</li>
<li>
<p>Run <code>blogdown::check_site()</code> to find any issues. In my case these checking functions found a Hugo version mismatch and I ended up having to specifically run <code>blogdown::install_hugo("0.82.1")</code> to resolve it.</p>
<details><summary><p>Console output</p>
</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1">― Checking netlify.toml...</span>
<span id="cb5-2">○ Found HUGO_VERSION <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>.<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">82.1</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> [build] context of netlify.toml.</span>
<span id="cb5-3"><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> Checking that Netlify <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span> local Hugo versions match...</span>
<span id="cb5-4"><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> Mismatch found<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span>  blogdown is using Hugo <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">version</span> (<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>.<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">69.2</span>) to build site locally.  Netlify is using Hugo <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">version</span> (<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>.<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">82.1</span>) to build site.</span>
<span id="cb5-5">● [TODO] Option <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> Change HUGO_VERSION <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.69.2"</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> netlify.toml to match local version.</span>
<span id="cb5-6">● [TODO] Option <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> Use blogdown<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_hugo</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span>) to match Netlify version, and set <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">options</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">blogdown.hugo.version =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0.82.1"</span>) <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> .Rprofile to pin this Hugo <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">version</span> (also remember to restart R).</span>
<span id="cb5-7"><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> Checking that Netlify <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span> local Hugo publish directories match...</span>
<span id="cb5-8">○ Good to go <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> blogdown and Netlify are using the same publish directory<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> public</span>
<span id="cb5-9">― Check complete<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> netlify.toml</span></code></pre></div></div>
</details>
</li>
</ol>
<p>If you end up needing to make your own changes, I recommend running <code>blogdown::check_site()</code> again when you’re done to make sure you’ve resolved all of the issues.</p>
<p>And then run <code>blogdown::serve_site()</code> to render a live preview of your site :rocket:</p>
<hr></section></section><section id="install-theme-alongside-academic-change-in-config.toml" class="level2"><h2 class="anchored" data-anchor-id="install-theme-alongside-academic-change-in-config.toml">1. Install theme alongside Academic, change in <strong>config.toml</strong>
</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/cc5d24d93676990675abc52145fd7a369c7bffa6">commit cc5d24</a></p>
</blockquote>
<p>The first step is to install all of the Hugo Apéro theme files to the <code>theme/</code> folder in your site directory:</p>
<div class="cell" data-layout-align="center">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">blogdown</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_theme</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>theme <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hugo-apero/hugo-apero"</span>,</span>
<span>                        update_config <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>, </span>
<span>                        force <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<details><summary>
Console output
</summary><div class="cell" data-layout-align="center">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1">trying URL <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'https://github.com/hugo-apero/hugo-apero/archive/main.tar.gz'</span></span>
<span id="cb7-2">downloaded <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">21.4</span> MB</span>
<span id="cb7-3"></span>
<span id="cb7-4">Do not forget to change the <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'theme'</span> option <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'config.toml'</span> to <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hugo-apero"</span></span>
<span id="cb7-5">Warning message<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb7-6">The theme has provided an example site. You should read the theme<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'s documentation and at least take a look at the config file config.toml (or .yaml) of the example site, because not all Hugo themes work with any config files. </span></span></code></pre></div></div>
</div>
</details><p>As indicated in console output, modify the <strong>config.toml</strong> file so it points to your new theme folder instead of <code>hugo-academic</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode toml code-with-copy"><code class="sourceCode toml"><span id="cb8-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#theme = "hugo-academic"</span></span>
<span id="cb8-2"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">theme</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hugo-apero"</span></span></code></pre></div></div>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> At this point you will probably start to get some error messages like the one below. Don’t panic! Let’s get through the rest of the steps first. I’m including my errors in this post in case they are helpful/validating for you!</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb9-1">Could not build site because certain shortcodes weren't found</span>
<span id="cb9-2"></span>
<span id="cb9-3">Error: Error building site: "/Users/silvia/Documents/Website/silvia/content/home/demo.md<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:58:</span>1": failed to extract shortcode: template for shortcode "alert" not found</span></code></pre></div></div>
</section><section id="copy-all-academic-shortcodes-to-layouts-root-remove-later" class="level2"><h2 class="anchored" data-anchor-id="copy-all-academic-shortcodes-to-layouts-root-remove-later">2. Copy all Academic shortcodes to <strong>layouts/</strong> root (remove later)</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/f3c7d5334b4effbd850b204eb267425f6740b4af">commit f3c7d53</a></p>
</blockquote>
<p>Copy the shortcodes</p>
<ul>
<li><p>From <code>themes/hugo-academic/layouts/shortcodes/</code></p></li>
<li><p>To <code>layouts/shortcodes/</code></p></li>
</ul>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> My error message:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb10-1"><span class="an" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">Error:</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> Error building site: TOCSS: failed to transform "style.main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 7, col 24: Invalid CSS after "...textFontFamily:": expected expression (e.g. 1px, bold), was "&lt;no value&gt;;"</span></span></code></pre></div></div>
</section><section id="remove-all-assets" class="level2"><h2 class="anchored" data-anchor-id="remove-all-assets">3. Remove all assets</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/3843c76a5da6184b2d9b547b18f96ec6810a695a">commit 3843c76</a></p>
</blockquote>
<p>Before deleting anything, I recommend making a backup of your entire website folder, just in case.</p>
<p>In the <code>assets/</code> root folder, delete:</p>
<ul>
<li><p>the <code>images/</code> folder which might contain your site icon</p></li>
<li><p>the <code>scss/</code> folder which might contain your <code>custom.scss</code> file</p></li>
</ul>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> My error message:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb11-1"><span class="an" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">Error:</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> Error building site: TOCSS: failed to transform "style.main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 7, col 24: Invalid CSS after "...textFontFamily:": expected expression (e.g. 1px, bold), was "&lt;no value&gt;;"</span></span></code></pre></div></div>
</section><section id="remove-all-custom-layouts" class="level2"><h2 class="anchored" data-anchor-id="remove-all-custom-layouts">4. Remove all custom layouts</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/1ad7e3d491d309e71e1b4fa0bbad1e3af6b9d322">commit 1ad7e3d</a></p>
</blockquote>
<p>I had a couple of partials that I deleted from the <code>layouts/</code> folder:</p>
<ul>
<li>
<strong>partials/site_footer.html</strong> which provided a custom footer for my website</li>
<li>
<strong>partials/widgets/about.html</strong> which included the custom formatting for certificates in the Education section of the About page of my Academic site</li>
</ul>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> My error message:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb12-1"><span class="an" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">Error:</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> Error building site: TOCSS: failed to transform "style.main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 7, col 24: Invalid CSS after "...textFontFamily:": expected expression (e.g. 1px, bold), was "&lt;no value&gt;;"</span></span></code></pre></div></div>
</section><section id="copy-over-apéro-example-site-config.toml-file" class="level2"><h2 class="anchored" data-anchor-id="copy-over-apéro-example-site-config.toml-file">5. Copy over Apéro example site <strong>config.toml</strong> file</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/db37289e768640522130f98353996de4a6e0abfc">commit db37289</a></p>
</blockquote>
<p>Rename <strong>config.toml</strong> in the root folder to <strong>config_old.toml</strong></p>
<p>Copy <strong>config.toml</strong></p>
<ul>
<li><p>From <code>themes/hugo-apero/exampleSite/</code></p></li>
<li><p>To your root directory (in my case it was <code>silvia/</code>)</p></li>
</ul>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> My error message:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb13-1"><span class="an" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">Error:</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at &lt;partial "head.html" .&gt;: error calling partial: "/Users/silvia/Documents/Website/silvia/themes/hugo-apero/layouts/partials/head.html:14:53": execute of template failed: template: partials/head.html:14:53: executing "partials/head.html" at &lt;js&gt;: can't evaluate field Build in type string</span></span></code></pre></div></div>
</section><section id="remove-academic-config-directory" class="level2"><h2 class="anchored" data-anchor-id="remove-academic-config-directory">6. Remove Academic <strong>config/</strong> directory</h2>
<blockquote class="blockquote">
<p><i class="fa-solid fa-code-branch" aria-label="code-branch"></i> Follow along with me at <a href="https://github.com/spcanelon/silvia/commit/5541f38871911d5067c6c8856936d54d183b3ec9">commit 5541f38</a></p>
</blockquote>
<p>Delete the <code>config/</code> folder from your root directory (in my case <code>silvia/</code>)</p>
<p>I learned <a href="https://github.com/hugo-apero/hugo-apero-docs/issues/78">the hard way</a> that the error below was due to not using an updated version of Hugo, which is why I included that step in the Prework. All this to say, I’m hoping you don’t see the error below!</p>
<p><i class="fa-solid fa-exclamation-circle" aria-label="exclamation-circle"></i> My error message:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode md code-with-copy"><code class="sourceCode markdown"><span id="cb14-1"><span class="an" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">Error:</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at &lt;partial "head.html" .&gt;: error calling partial: "/Users/silvia/Documents/Website/silvia/themes/hugo-apero/layouts/partials/head.html:14:53": execute of template failed: template: partials/head.html:14:53: executing "partials/head.html" at &lt;js&gt;: can't evaluate field Build in type string</span></span></code></pre></div></div>
<hr></section><section id="migrating-the-content" class="level2"><h2 class="anchored" data-anchor-id="migrating-the-content">Migrating the content</h2>
<p>Assuming you have made it this far and are able to at least serve a live site that uses the new Hugo Apéro theme, you are ready to start migrating your content! :tada:</p>
<p>File are organized differently in Hugo Apéro and the next steps detail the high-level changes I made to get my content to fit the new structure. The goal was to have my site parallel the <a href="https://hugo-apero.netlify.app/">Hugo Apéro example site</a> and <a href="https://alison.rbind.io">Alison’s personal site</a>.</p>
<section id="file-organization" class="level3"><h3 class="anchored" data-anchor-id="file-organization">File organization</h3>
<p>To get an overview of how the file structure is different between the Academic and Apéro themes we’ll look at the <code>content/</code> folder of the Apéro example site, my old Academic site, and my current Apéro site. These are organized into the panelsets below.</p>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-1-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-1" aria-controls="tabset-1-1" aria-selected="true" href="">Example site</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-2" aria-controls="tabset-1-2" aria-selected="false" href="">My Academic site</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-3" aria-controls="tabset-1-3" aria-selected="false" href="">My Apéro site</a></li>
</ul>
<div class="tab-content">
<div id="tabset-1-1" class="tab-pane active" aria-labelledby="tabset-1-1-tab">
<!-- {{< panelset class="content directory" >}}
{{< panel name="Example Site" >}} -->
<p><i class="fa-solid fa-route" aria-label="route"></i> Location: <code>silvia/themes/hugo-apero/exampleSite</code></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb15-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> config.toml</span>
<span id="cb15-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> content</span>
<span id="cb15-3">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> _index.md</span>
<span id="cb15-4">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> about</span>
<span id="cb15-5">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> blog</span>
<span id="cb15-6">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> collection</span>
<span id="cb15-7">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> contributors.md</span>
<span id="cb15-8">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> elements</span>
<span id="cb15-9">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> form</span>
<span id="cb15-10">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> license.md</span>
<span id="cb15-11">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> project</span>
<span id="cb15-12">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> talk</span></code></pre></div></div>
</div>
<div id="tabset-1-2" class="tab-pane" aria-labelledby="tabset-1-2-tab">
<!-- {{< /panel >}}
{{< panel name="My Academic site" >}} -->
<p><i class="fa-solid fa-route" aria-label="route"></i> Location: <code>silvia/</code></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb16-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">.</span></span>
<span id="cb16-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> config.toml</span>
<span id="cb16-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> content</span>
<span id="cb16-4">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> authors</span>
<span id="cb16-5">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> courses</span>
<span id="cb16-6">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> home</span>
<span id="cb16-7">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> license.md</span>
<span id="cb16-8">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> post</span>
<span id="cb16-9">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> project</span>
<span id="cb16-10">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> publication</span>
<span id="cb16-11">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> slides</span>
<span id="cb16-12">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> talk</span></code></pre></div></div>
</div>
<div id="tabset-1-3" class="tab-pane" aria-labelledby="tabset-1-3-tab">
<!-- {{< /panel >}}
{{< panel name="My Apéro site" >}} -->
<p><i class="fa-solid fa-route" aria-label="route"></i> Location: <code>silvia/</code></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb17-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">.</span></span>
<span id="cb17-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> config.toml</span>
<span id="cb17-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> content</span>
<span id="cb17-4">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> _index.md       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- new!</span></span>
<span id="cb17-5">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> about           <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- new!</span></span>
<span id="cb17-6">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> blog            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- renamed (formerly post)</span></span>
<span id="cb17-7">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> collection      <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- new!</span></span>
<span id="cb17-8">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> form            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- new!</span></span>
<span id="cb17-9">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> license.md</span>
<span id="cb17-10">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> project</span>
<span id="cb17-11">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> publication</span>
<span id="cb17-12">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> talk</span></code></pre></div></div>
</div>
</div>
</div>
<!-- end panel-tabset -->
</section><section id="about-page" class="level3"><h3 class="anchored" data-anchor-id="about-page">About page</h3>
<p>Resource: <a href="https://hugo-apero-docs.netlify.app/learn/about-page/">Customize your about page | Hugo Apéro</a></p>
<p>My About page:</p>
<ul>
<li><a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/about/header/index.md">content/about/header/index.md</a></li>
<li><a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/about/main/index.md">content/about/main/index.md</a></li>
<li><a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/about/sidebar/index.md">content/about/sidebar/index.md</a></li>
</ul>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-about-page-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="The header of my About page: https://silvia.rbind.io/about/"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-about-page-1.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="My About page featuring a large headline to greet visitors and a short blurb about me in the header of the site. Below this area on the left in the main area of the page is more information with a heading and some prose. To the right of the main area is the sidebar which includes a small image, a name in large font, a subheading for the name, social media icons, and a spot for an audio clip for a name pronunciation. On the top edge of the page is a navigation bar with 'About' highlighted" width="1265"></a></p>
</figure>
</div>
<figcaption>The header of my About page: https://silvia.rbind.io/about/</figcaption></figure>
</div>
</div>
</div>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-about-page-2.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="The main section of my About page: https://silvia.rbind.io/about/"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-about-page-2.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="Below the header is the main area of the page on the left with more information about me with a heading and some prose. To the right of the main area is the sidebar which includes a small image of me, my name in large font, my professional title underneath along with social media icons and a short list of my interests." width="1265"></a></p>
</figure>
</div>
<figcaption>The main section of my About page: https://silvia.rbind.io/about/</figcaption></figure>
</div>
</div>
</div>
<p>I wanted to reuse my content from the About section of my Academic site, so I did a lot of copy-and-pasting into the right spots before editing. These steps are outlined in the table below.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 5%">
<col style="width: 19%">
<col style="width: 43%">
<col style="width: 31%">
</colgroup>
<thead><tr class="header">
<th>Step</th>
<th>Content to copy</th>
<th>From</th>
<th>To</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>Folder</td>
<td>themes/hugo-apero/exampleSite/content/about/</td>
<td>content/</td>
</tr>
<tr class="even">
<td>2</td>
<td>Body part 1</td>
<td>content/authors/silvia/_index.md</td>
<td>content/about/header/index.md</td>
</tr>
<tr class="odd">
<td>3</td>
<td>Body part 2</td>
<td>content/authors/silvia/_index.md</td>
<td>content/about/main/index.md</td>
</tr>
<tr class="even">
<td>4</td>
<td>Biography → outro</td>
<td>content/authors/silvia/_index.md</td>
<td>content/about/main/index.md</td>
</tr>
<tr class="odd">
<td>5</td>
<td>Interests → link_list</td>
<td>content/authors/silvia/_index.md</td>
<td>content/about/sidebar/index.md</td>
</tr>
<tr class="even">
<td>6</td>
<td>Photo</td>
<td>content/authors/silvia/avatar.png</td>
<td>content/about/sidebar/avatar.png</td>
</tr>
</tbody>
</table></section><section id="homepage" class="level3"><h3 class="anchored" data-anchor-id="homepage">Homepage</h3>
<p>Resource: <a href="https://hugo-apero-docs.netlify.app/learn/homepage/">Customize your homepage | Hugo Apéro</a></p>
<p>My homepage: <a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/_index.md">content/_index.md</a></p>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-home-page.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5" title="My Homepage: https://silvia.rbind.io"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-home-page.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The homepage of my site which shows my name in large font on the left, my title, social media icons, a short blurb about me, and a link that says 'Read More' that can be clicked to enter the site. On the right side is a photo of one of my favorite lakes." width="960"></a></p>
</figure>
</div>
<figcaption>My Homepage: https://silvia.rbind.io</figcaption></figure>
</div>
</div>
</div>
<ol type="1">
<li><p>Copy <strong>_ index.md</strong> from <code>themes/hugo-apero/content/</code> to <code>content/</code></p></li>
<li><p>Save an image for your homepage in the <code>static/img/</code> folder</p></li>
<li><p>Specify your homepage image in <strong>_ index.md</strong></p></li>
</ol></section><section id="blog" class="level3"><h3 class="anchored" data-anchor-id="blog">Blog</h3>
<p>My blog listing: <a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/blog/_index.md">content/blog/_index.md</a></p>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-blog-list.png" class="lightbox" data-gallery="quarto-lightbox-gallery-6" title="My Blog listing: https://silvia.rbind.io/blog"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-blog-list.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The Blog listing page for my site with a sidebar layout and thumbnails enabled. There is a sidebar on the left side with some information about my blog including a blog name 'Meeting People Where They R'. It also includes my name as the blog author, a link to subscribe via RSS, and a decorative image of a small potted cactus plant sitting on top of a stack of books. On the right side in the main area of the page there are two blog posts featured, including this one. Each has a title, a summary, the date, and a decorative image as the thumbnail." width="1265"></a></p>
</figure>
</div>
<figcaption>My Blog listing: https://silvia.rbind.io/blog</figcaption></figure>
</div>
</div>
</div>
<p>Update <code>[menu]</code> options in <strong>config.toml</strong> to activate Blog by changing <code>url = "/blog/"</code> and renaming <code>content/post/</code> to <code>content/blog/</code> to activate the new Apéro layout with the sidebar on the blog post listing and to enable thumbnails</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode toml code-with-copy"><code class="sourceCode toml"><span id="cb18-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">[[menu.header]]</span></span>
<span id="cb18-2">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">name</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Blog"</span></span>
<span id="cb18-3">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Blog"</span></span>
<span id="cb18-4">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">url</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/blog/"</span></span>
<span id="cb18-5">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">weight</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- item 2 in the navigation bar</span></span></code></pre></div></div>
<p>Edit <strong>content/blog/_ index.md</strong> with heading for the Blog listing page</p>
<ul>
<li><p>Make sure <code>text_link_url: /blog/</code></p></li>
<li><p>The <code>author:</code> field will populate the by-line in each blog post unless another author is indicated in the YAML of the blog post.</p></li>
</ul></section><section id="publications" class="level3"><h3 class="anchored" data-anchor-id="publications">Publications</h3>
<p>My publication listing: <a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/publication/_index.md">content/publication/_index.md</a></p>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-publication-list.png" class="lightbox" data-gallery="quarto-lightbox-gallery-7" title="My Publication listing: https://silvia.rbind.io/publication"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-publication-list.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The Publication listing page for my site with a single layout which doesn't have a sidebar. The top of the page says 'Publications' and below is a short description of what can be found on the page. It also includes a by-line that reads 'Written by Silvia Canelón.' There is primarily one publication featured with a title, a summary, the authors, and the date. This listing visually separates publications in the list with a horizontal bar" width="1265"></a></p>
</figure>
</div>
<figcaption>My Publication listing: https://silvia.rbind.io/publication</figcaption></figure>
</div>
</div>
</div>
<p>Update <code>[menu]</code> options in <strong>config.toml</strong> to activate Publications</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode toml code-with-copy"><code class="sourceCode toml"><span id="cb19-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">[[menu.header]]</span></span>
<span id="cb19-2">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">name</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Publications"</span></span>
<span id="cb19-3">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Publications"</span></span>
<span id="cb19-4">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">url</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/publication/"</span></span>
<span id="cb19-5">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">weight</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- item 4 in the navigation bar</span></span></code></pre></div></div>
<p>Rename <strong>content/publication/_ index.md</strong> to <strong>_ index-old.md</strong> and copy over <strong>_ index.md</strong> from <code>themes/hugo-apero/exampleSite/content/blog/</code></p>
<p>Edit <strong>content/publication/_ index.md</strong> to suit your preferences</p>
<p>Modify individual publications:</p>
<ul>
<li>The Apéro theme doesn’t have a built-in “abstract” field so I copied and pasted the content in this field from the YAML of each publication page into the area below the YAML.</li>
<li>If your publications have multiple authors, they can be included as a string list in the <code>author:</code> field of the YAML</li>
</ul></section><section id="talks" class="level3"><h3 class="anchored" data-anchor-id="talks">Talks</h3>
<p>My talk listing: <a href="https://github.com/spcanelon/silvia/blob/bef8a7c9fd7b529e7cb58c3c92dafe59aa8d2259/content/talk/_index.md">content/talk/_index.md</a></p>
<div class="cell" data-layout-align="center">
<div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><a href="img/silvia-talk-list.png" class="lightbox" data-gallery="quarto-lightbox-gallery-8" title="My Talk listing: https://silvia.rbind.io/talk"><img src="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/img/silvia-talk-list.png" class="img-fluid quarto-figure quarto-figure-center figure-img" alt="The Talk listing page for my site with a single layout which doesn't have a sidebar and features decorative thumbnail images on the left. The top of the page says 'Talks' and below is a short description of what can be found on the page. This listing visually separates talks in the list by year with a horizontal bar." width="1265"></a></p>
</figure>
</div>
<figcaption>My Talk listing: https://silvia.rbind.io/talk</figcaption></figure>
</div>
</div>
</div>
<p>Rename <strong>content/talk/_ index.md</strong> to <strong>_ index-old.md</strong> and copy over <strong>_ index.md</strong> from <code>themes/hugo-apero/exampleSite/content/talk/</code></p>
<p>Edit <strong>content/talk/_ index.md</strong> to suit your preferences</p>
</section><section id="rmd-.rmarkdown" class="level3"><h3 class="anchored" data-anchor-id="rmd-.rmarkdown">.Rmd → .Rmarkdown</h3>
<p>You can create content for your blogdown site from <strong>.md</strong>, <strong>.Rmd</strong>, and <strong>.Rmarkdown</strong> files, anytime and anywhere. However, there are some limitations:</p>
<ul>
<li>
<strong>.md</strong> is great if your file doesn’t contain any R code</li>
<li>
<strong>.Rmd</strong> files generate <strong>.html</strong> files while <strong>.Rmarkdown</strong> files generate <strong>.markdown</strong> files. Both can run R code, but only <strong>.markdown</strong> files generated from <strong>.Rmarkdown</strong> benefit from some of the features available from Hugo, like the syntax highlighting built into Apéro.</li>
</ul>
<p>If you were writing R tutorials/posts/etc. in <strong>.Rmd</strong> (like me), you will notice any code chunks you were displaying will not be formatted with proper syntax highlighting :cry: To remedy this, you will have to:</p>
<ol type="1">
<li><p>Change these <strong>index.Rmd</strong> files to <strong>index.Rmarkdown</strong> (I recommend using your computer’s file explorer for this)</p></li>
<li><p>Rebuild your <strong>index.Rmarkdown</strong> files to <strong>index.markdown</strong> (using <code>blogdown::build_site(build_rmd = TRUE)</code>, see the <a href="https://pkgs.rstudio.com/blogdown/reference/build_site.html">helper functions</a> for more granular control)</p></li>
<li><p>Delete the <strong>index.html</strong> output files that had previously been generated</p></li>
</ol>
<p><i class="fas fa-exclamation-triangle pr2"></i> Rebuilding your R Markdown pages may not be a good idea if they contain code that might break, so please proceed with caution!</p>
<p>If you made it this far, <strong>congratulations</strong>! You have a brand new site! :partying_face:</p>
</section></section><section id="final-touches" class="level2"><h2 class="anchored" data-anchor-id="final-touches">Final touches</h2>
<section id="contact-form" class="level3"><h3 class="anchored" data-anchor-id="contact-form">Contact form</h3>
<p>Resource: <a href="https://hugo-apero-docs.netlify.app/learn/built-in-contact-form/">Built-in Contact Form | Hugo Apéro</a></p>
<p>If you’d like to use Apéro’s built-in contact form powered by Formspree, copy the <code>themes/hugo-apero/exampleSite/content/form/</code> folder into <code>content/</code> and edit <strong>contact.md</strong>.</p>
</section><section id="tidying-up-your-directory" class="level3"><h3 class="anchored" data-anchor-id="tidying-up-your-directory">Tidying up your directory</h3>
<p>Now you can delete all of the files and folders you don’t need anymore!</p>
<p>I’m including the files and folders I deleted as a list and as a directory tree. These are organized in the panelset below.</p>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-2-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-1" aria-controls="tabset-2-1" aria-selected="true" href="">List of items</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-2" aria-controls="tabset-2-2" aria-selected="false" href="">Directory tree</a></li>
</ul>
<div class="tab-content">
<div id="tabset-2-1" class="tab-pane active" aria-labelledby="tabset-2-1-tab">
<!-- {{< panelset class="files and folders to delete" >}}
{{< panel name="List of items" >}} -->
<ul>
<li>The content folders carried over from Hugo Academic: authors, home, post, courses, and slides</li>
<li>The config folder</li>
<li>The resources folder</li>
<li>The data folder containing fonts and themes folders</li>
<li>The assets/images folder</li>
<li>The static/img/headers, static/publications, and static/rmarkdown-libs folders</li>
<li>All of the <strong>index.html</strong> files in the blog, publication, and talks folders</li>
<li>The old config file, that I had renamed <strong>config_old.toml</strong>
</li>
<li>The old index files that I had renamed <strong>_ index-old.md</strong>
</li>
<li>The partials in layouts/shortcodes</li>
<li>And finally the themes/hugo-academic folder! 🔥</li>
</ul>
</div>
<div id="tabset-2-2" class="tab-pane" aria-labelledby="tabset-2-2-tab">
<!-- {{< /panel >}}
{{< panel name="Directory tree" >}} -->
<p>I deleted the following files:</p>
<ul>
<li>All of the <strong>index.html</strong> files in the blog, publication, and talks folders</li>
<li>The old config file, that I had renamed <strong>config_old.toml</strong>
</li>
<li>The old index files that I had renamed <strong>_ index-old.md</strong>
</li>
</ul>
<p>And I deleted the folders indicated in this directory tree:</p>
<p><i class="fa-solid fa-route" aria-label="route"></i> Location: <code>silvia/</code></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb20-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">.</span></span>
<span id="cb20-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> config                <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> resources             <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> data                  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-5"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> assets</span>
<span id="cb20-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   └── images            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-7"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> static</span>
<span id="cb20-8"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── img</span>
<span id="cb20-9"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   │   └── headers       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-10"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   ├── publications      <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-11"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   └── rmarkdown-libs    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span>
<span id="cb20-12"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">├──</span> layouts</span>
<span id="cb20-13"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">│</span>   └── shortcodes        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- custom partials in this folder</span></span>
<span id="cb20-14"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> themes</span>
<span id="cb20-15">    <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">└──</span> hugo-academic     <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># &lt;-- this folder</span></span></code></pre></div></div>
<!-- {{< /panel >}}
{{< /panelset >}} -->
</div>
</div>
</div>
<!-- end tabset-panel -->
</section></section><section id="customizing-your-site" class="level2"><h2 class="anchored" data-anchor-id="customizing-your-site">Customizing your site</h2>
<p>Hopefully all of that wasn’t terrible, and if it was, please know I’m rooting for you. You’re doing great! :raised_hands:</p>
<p>Now you get to enjoy the fun part which is customizing your site! The theme documentation goes through this in detail:</p>
<ul>
<li><a href="https://hugo-apero-docs.netlify.app/learn/social/">Set up your social | Hugo Apéro</a></li>
<li><a href="https://hugo-apero-docs.netlify.app/learn/fonts/">Style your site typography | Hugo Apéro</a></li>
<li><a href="https://hugo-apero-docs.netlify.app/learn/color-themes/">Style your site colors | Hugo Apéro</a></li>
</ul></section><section id="deploying-your-new-site" class="level2"><h2 class="anchored" data-anchor-id="deploying-your-new-site">Deploying your new site</h2>
<p>Once you’re happy with your new Apéro site, the last step is to merge your <code>apero</code> branch with the primary branch of your website repository. But first, a few steps:</p>
<ol type="1">
<li><p><strong>Optional:</strong> Create a branch of your primary branch and call it <code>hugo-academic</code> so that you have a snapshot of your Academic files right before the merge. Since we set up Netlify to deploy all of our branches, there will now be a live link for this new branch that you can visit whenever you feel like time traveling back to your old site. For me this link is https://hugo-academic–silvia.netlify.app/</p></li>
<li>
<p>Switch back to your <code>apero</code> branch and update the <code>baseURL</code> field in <strong>config.toml</strong> to your regular website path. In my case:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode toml code-with-copy"><code class="sourceCode toml"><span id="cb21-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">baseURL</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://silvia.rbind.io/"</span></span></code></pre></div></div>
<p>Then commit and push this change to your <code>apero</code> branch.</p>
</li>
<li><p>Merge your <code>apero</code> branch with your primary branch. I usually use git commands in a combination of the RStudio terminal and the Git pane, but for this big merge I felt more comfortable doing it on github.com! :sweat_smile: Do what feels most comfortable for you.</p></li>
<li>
<p>Resolve any merge conflicts (I had a few!) in the git tool of your choosing. These are the git commands GitHub recommended:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb22-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> fetch origin       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># makes sure local files were recent</span></span>
<span id="cb22-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> checkout apero     <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># moves you to your `apero` branch</span></span>
<span id="cb22-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> merge main         <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># attempts a merge with your `main` branch</span></span></code></pre></div></div>
<p>When you’re finished, commit your changes and push. Then follow these next steps, also recommended by GitHub:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb23-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> checkout main       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># moves you to your `main` branch</span></span>
<span id="cb23-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> merge <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--no-ff</span> apero <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># creates a new commit for the merge</span></span></code></pre></div></div>
<p>This step will sort of replace all of the files that both themes had in common with the <code>apero</code> version (e.g.&nbsp;<strong>config.toml</strong>, <strong>netlify.toml</strong>, <strong>content/publication</strong>), and leave the old Academic files alone. So you will have to delete these extra Academic files (again!). I’m not sure how to avoid this – maybe it’s not an issue when you don’t have merge conflicts? I don’t know :thinking:</p>
</li>
<li>
<p>Tidy up your directory (again?)</p>
<p>Go through the steps above to clean out any residual Academic files from your directory. Make sure to check your <code>content/</code> folders for any example files from Academic that might still be hanging around and delete them.</p>
<p>Then run <code>blogdown::serve_site()</code> to build your new Apéro site locally. Go through the site and make sure everything looks the way it should and that links are generally pointing to the right places.</p>
<p>When you’re satisfied, commit the changes to your primary branch!<br>There may be <em>a lot</em> of files that were deleted and added during the switch to Apéro and, while not generally recommended, I used the <code>git add .</code> command to stage all of the changes at once, commited the changes, and then pushed. I did this after thoroughly looking through the list of changed files so I knew what was happening.</p>
</li>
<li><p>Wait a couple of minutes for the changes to get pushed to your primary branch (e.g.&nbsp;<code>main</code>) and then wait patiently for Netlify to build your site after the merge.</p></li>
<li><p><i class="fa-solid fa-glass-cheers" aria-label="glass-cheers"></i> Celebrate and share your brand new site! 🎉 🥳 🍾<br>If you share on Twitter, use the #HugoApero hashtag so the <a href="https://twitter.com/apreshill/status/1397052533588185092">Hugo Apéro squad</a> can clap for you!</p></li>
</ol>


</section><a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2021" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2021. <span>“Hello Hugo Apéro: Converting a Blogdown
Site from Hugo Academic.”</span> June 1. <a href="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/">https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>website</category>
  <category>tutorial</category>
  <category>git</category>
  <category>blogdown</category>
  <category>Hugo</category>
  <guid>https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/</guid>
  <pubDate>Tue, 01 Jun 2021 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2021-06-01-hello-hugo-apero/featured.png" medium="image" type="image/png" height="75" width="144"/>
</item>
<item>
  <title>Deploying xaringan Slides with GitHub Pages</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2021-03-16-deploying-xaringan-slides/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<blockquote class="blockquote">
<p>This post was featured in the RStudio Blog <em>R Views</em> under a revised title: <a href="https://rviews.rstudio.com/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/">Deploying xaringan Slides with GitHub Pages</a>. The original title was “Deploying xaringan Slides: A Ten-Step GitHub Pages Workflow.” Other changes include an introductory paragraph and greater clarity in the “Choose your own adventure” section. Many thanks to Chief Editor Joe Rickert for a very encouraging and helpful editorial process! I am humbled by his note on R Views:</p>
<p><em>Silvia’s post is a mini masterpiece of clear, concise writing that elucidates complex technology within the narrow context of explaining a single well-defined task. Silvia does not attempt to say everything she knows about the subject, and she resists digressions that might obscure the path she is laying out. It is an example of achieving clarity through saying less.</em></p>
</blockquote>
<hr>
<p>This post will guide you step-by-step through the process of creating an HTML xaringan slide deck and deploying it to the web for easy sharing with others. We will be using the <code>xaringan</code> package to build the slide deck, GitHub to help us host our slides for free with GitHub Pages, and the <code>usethis</code> package to help us out along the way. You will get the most out of this workflow if you are already familiar with R Markdown and GitHub, and if you have already connected RStudio (or your preferred IDE) to Git and GitHub.<sup>1</sup> The post will not cover the nuts and bolts of xaringan or talk about slide design &amp; customization, but you can find lots of learning resources listed at the end.</p>
<section id="choose-your-own-adventure" class="level1">
<h1>Choose your own adventure</h1>
<ul>
<li><p><strong>Option 1:</strong> Start at the beginning of the workflow to make a slide deck using the R Markdown template built into the <code>xaringan</code> package. The built-in template doubles as documentation for the <code>xaringan</code> package, so it is a great way to familiarize yourself with the package features, but it also includes a lot of content that you will probably want to remove and modify when creating your presentation.</p></li>
<li><p><strong>Option 2:</strong> Start with an <a href="https://spcanelon.github.io/RLadies-xaringan-template">R-Ladies themed xaringan template</a> (embedded below). This is an example slide deck originally created as a teaching tool to highlight some of the main features of the <code>xaringan</code> package, and to demo some customization that incorporates the R-Ladies CSS theme built into xaringan. Please feel welcome to use/modify it to suit your needs! When you are ready, you can follow the steps immediately below 👇 to download the files to your machine, and then skip down to Initialize version control with git.</p></li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1">usethis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">use_course</span>(</span>
<span id="cb1-2">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">repo_spec =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"spcanelon/RLadies-xaringan-template"</span>,</span>
<span id="cb1-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">destdir =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"filepath/for/your/presentation"</span></span>
<span id="cb1-4">  )</span></code></pre></div></div>
<blockquote class="blockquote">
<p>Note: After copying the files to your machine you’ll probably want to rename the file folder to whatever makes sense for your presentation.</p>
</blockquote>
<div class="shareagain" style="min-width:300px;margin:1em auto;text-align:center;">
<iframe src="https://spcanelon.github.io/RLadies-xaringan-template" width="400" height="300" align="center" style="border:2px solid currentColor;" loading="lazy" allowfullscreen="">
</iframe>
<script>fitvids('.shareagain', {players: 'iframe'});</script>
</div>
<blockquote class="blockquote">
<p>Try navigating through the slides ☝️ with your left/right arrow keys and press the letter “P” on your keyboard to see some notes in Presenter View</p>
</blockquote>
</section>
<section id="the-ten-step-workflow" class="level1">
<h1>The Ten-Step Workflow</h1>
<section id="packages" class="level2">
<h2 class="anchored" data-anchor-id="packages">Packages</h2>
<p>This workflow was developed using:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Software / package</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>R</td>
<td>4.0.3</td>
</tr>
<tr class="even">
<td>RStudio</td>
<td>1.4.1103</td>
</tr>
<tr class="odd">
<td><code>xaringan</code></td>
<td>0.19</td>
</tr>
<tr class="even">
<td><code>usethis</code></td>
<td>2.0.0</td>
</tr>
</tbody>
</table>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install.packages</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"xaringan"</span>)</span>
<span id="cb2-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install.packages</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"usethis"</span>)</span></code></pre></div></div>
</section>
<section id="creating-your-xaringan-slide-deck" class="level2">
<h2 class="anchored" data-anchor-id="creating-your-xaringan-slide-deck">Creating your xaringan slide deck</h2>
<p><strong>1. Create a new RStudio project for your presentation:</strong></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1">usethis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">create_project</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"filepath/for/your/presentation/repo-name"</span>)</span></code></pre></div></div>
<blockquote class="blockquote">
<p>📍 If you’re not sure where you are on your computer, check your working directory with <code>getwd()</code> and use it as a filepath reference point</p>
</blockquote>
<!--Output:    
    
    ```r
    New project 'rladies-xaringan-template' is nested inside an existing project '/filepath/for/the/presentation/', which is rarely a good idea.
    If this is unexpected, the here package has a function, `here::dr_here()` that reveals why '/filepath/for/the/presentation/' is regarded as a project.
    Do you want to create anyway?
    
    1: Absolutely not
    2: Yup
    3: No
    
    Selection: 2
    ```
-->
<p><strong>2. Create a xaringan deck using a xaringan template:</strong><br> <em>File</em> &gt; <em>New File</em> &gt; <em>R Markdown</em> &gt; <em>From Template</em> &gt; <em>Ninja Presentation</em> &gt; <em>OK</em></p>
<p><strong>3. Delete what you don’t need and save your R Markdown file with whatever name you like.</strong> If you pick <code>index.Rmd</code> the live link you share at the end will be relatively short.</p>
<p><strong>4. Render HTML slides from the open Rmd file using xaringan’s infinite moon reader:</strong></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1">xaringan<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">infinite_moon_reader</span>()</span></code></pre></div></div>
</section>
<section id="initialize-version-control-with-git" class="level2">
<h2 class="anchored" data-anchor-id="initialize-version-control-with-git">Initialize version control with git</h2>
<p><strong>5. Initialize version control of your slides with git:</strong></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1">usethis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">use_git</span>()</span></code></pre></div></div>
<p>You’ll be asked if you want to commit the files in your project (with the message “Initial commit”) and then if you want to restart to activate the Git pane. Say yes to both ✅</p>
<blockquote class="blockquote">
<p>Note: At the moment <code>usethis</code> names the primary branch “master” by default. <a href="https://github.com/r-lib/usethis/issues/1341">Issue #1341</a> suggests the option to instead name it “main” is in the works.</p>
</blockquote>
<!--Output:
> usethis::use_git()
✓ Setting active project to '/filepath/for/the/presentation/rladies-xaringan-template'
✓ Initialising Git repo
✓ Adding '.Rhistory', '.Rdata', '.httr-oauth', '.DS_Store' to '.gitignore'
There are 6 uncommitted files:
* '.gitignore'
* 'index_files/'
* 'index.html'
* 'index.Rmd'
* 'libs/'
* 'rladies-xaringan-template.Rproj'
Is it ok to commit them?

1: Yup
2: Negative
3: No way

Selection: 1


✓ Adding files
✓ Making a commit with message 'Initial commit'
● A restart of RStudio is required to activate the Git pane
Restart now?

1: Yes
2: Nope
3: Not now

Selection: 

-->
<p><strong>6. Connect your local project with a GitHub repo:</strong></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1">usethis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">use_github</span>()</span></code></pre></div></div>
<blockquote class="blockquote">
<p>You could use the function argument <code>private = TRUE</code> to create a private GitHub repository. But you may have to remember to change the visibility before deploying to GitHub Pages.</p>
</blockquote>
<!--Output:
> usethis::use_github(private = TRUE)
ℹ Defaulting to https Git protocol
✓ Setting active project to '/filepath/for/the/presentation/rladies-xaringan-template'
✓ Checking that current branch is default branch ('master')
✓ Creating private GitHub repository 'spcanelon/rladies-xaringan-template'
✓ Setting remote 'origin' to 'https://github.com/spcanelon/rladies-xaringan-template.git'
✓ Pushing 'master' branch to GitHub and setting 'origin/master' as upstream branch
✓ Opening URL 'https://github.com/spcanelon/rladies-xaringan-template'
-->
<p><strong>7. Your new GitHub repo with all of your xaringan project files will automatically open up in your browser</strong></p>
<blockquote class="blockquote">
<p>Repo for the R-Ladies xaringan template:<br> https://github.com/spcanelon/RLadies-xaringan-template</p>
</blockquote>
</section>
<section id="making-and-committing-changes-to-your-slides" class="level2">
<h2 class="anchored" data-anchor-id="making-and-committing-changes-to-your-slides">Making and committing changes to your slides</h2>
<p><strong>8. Edit your slides as you wish.</strong> Commit often! And then push to GitHub. Use the tools provided by the Git pane in RStudio, or use the following commands in the Terminal:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb7-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 1: Stage all modified files</span></span>
<span id="cb7-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> add .</span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 2: Describe the changes you made to your files</span></span>
<span id="cb8-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> commit <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-m</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;A brief but descriptive commit message&gt;"</span></span></code></pre></div></div>
<blockquote class="blockquote">
<p>Consider writing a commit message that finishes the following sentence:<sup>2</sup> “If applied, this commit will…” (e.g.&nbsp;“Change the slide theme,” “Add hello slide”)</p>
</blockquote>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb9-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 3: Push the changes to your GitHub repository</span></span>
<span id="cb9-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> push</span></code></pre></div></div>
</section>
<section id="deploying-your-slides" class="level2">
<h2 class="anchored" data-anchor-id="deploying-your-slides">Deploying your slides</h2>
<p><strong>9. When you’re ready to deploy your slides, you can use the <code>usethis::use_github_pages()</code> function</strong> which makes the process of deploying via GitHub Pages super easy. I recommend pointing <code>branch</code> to the name of your primary branch.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb10-1">usethis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">use_github_pages</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">branch =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"master"</span>)</span></code></pre></div></div>
<blockquote class="blockquote">
<p>Note: Your repository must be <strong>public</strong> for your deployed slides to be available publicly, unless you have a paid GitHub account.</p>
</blockquote>
<blockquote class="blockquote">
<p>Also, you only need to follow this step <em>once</em> to deploy your slides to the web. As long as you remember to push to your repo any changes that you make to your slides (Rmd and HTML), GitHub Pages will know how to render them.</p>
</blockquote>
<!--Output:
> usethis::use_github_pages(branch = "master")
✓ Setting active project to '/Users/scanelon/Box/2-Teaching/R-Projects/R-Ladies/RLadies-xaringan-template'
✓ Activating GitHub Pages for 'spcanelon/rladies-xaringan-template'
✓ GitHub Pages is publishing from:
● URL: 'https://spcanelon.github.io/RLadies-xaringan-template/'
● Branch: 'master'
● Path: '/'
-->
<p><strong>10. Visit the link provided to see your newly deployed slides!</strong> 🚀<br>Don’t panic if you don’t see them right away, sometimes it takes a little time. This is the link you will share with the world when you present. Notice it looks <em>very</em> similar to your GitHub repo link.</p>
<blockquote class="blockquote">
<p>Link to the R-Ladies xaringan template rendered slides:<br> https://spcanelon.github.io/RLadies-xaringan-template</p>
</blockquote>
</section>
</section>
<section id="bonus-steps" class="level1">
<h1>Bonus steps</h1>
<p>11. Go to the <a href="https://github.com/spcanelon/RLadies-xaringan-template">repository home page</a> and find the About section on the right hand side. Add a description of your presentation and the link to your slides, that way your presentation is easily available to anyone visiting your repo.</p>
<p>12. Check out Garrick Aden-Buie’s blog post Sharing Your <code>xaringan</code> Slides to learn how to <a href="https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/#create-a-social-media-card">create a social media card</a> for your slides and use your new link to share your slides in more places (e.g.&nbsp;<a href="https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/#embed-your-slides">embedded on a website</a>, etc.)</p>
<p>13. This GitHub Pages workflow is not exclusive to <code>xaringan</code> slides! Try it out with any other HTML file.</p>
</section>
<section id="learn-more" class="level1">
<h1>Learn more</h1>
<section id="foundation" class="level2">
<h2 class="anchored" data-anchor-id="foundation">Foundation</h2>
<ul>
<li><a href="https://spcanelon.github.io/xaringan-basics-and-beyond/index.html">Sharing Your Work with xaringan • Silvia Canelón</a> – workshop site</li>
<li><a href="https://silvia.rbind.io/talk/2020-12-17-introduccion-xaringan/">Introducción al Paquete xaringan • Silvia Canelón</a> – R-Ladies Meetup</li>
<li><a href="https://arm.rbind.io/slides/xaringan.html">Making Slides with R Markdown • Alison Hill</a> – workshop slides</li>
<li><a href="https://slides.yihui.org/xaringan/">Presentation Ninja • xaringan Official Document</a> – package documentation</li>
<li><a href="https://bookdown.org/yihui/rmarkdown/xaringan.html">Chapter 7 xaringan Presentations • R Markdown: The Definitive Guide</a> – book chapter</li>
</ul>
</section>
<section id="sharing-your-slides" class="level2">
<h2 class="anchored" data-anchor-id="sharing-your-slides">Sharing your slides</h2>
<ul>
<li><a href="https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/">Sharing Your xaringan Slides • Garrick Aden‑Buie</a> – blog post</li>
<li><a href="https://jhelvy.github.io/xaringanBuilder/">Functions For Building Xaringan Slides To Different Outputs • xaringanBuilder</a> – package site</li>
<li><a href="https://alison.rbind.io/talk/2020-sharing-short-notice/">Sharing on Short Notice • Alison Hill &amp; Desirée De Leon</a> – video resource for deploying via Netlify</li>
</ul>
</section>
<section id="making-your-slides-extra-special" class="level2">
<h2 class="anchored" data-anchor-id="making-your-slides-extra-special">Making your slides extra special</h2>
<ul>
<li><a href="https://presentable-user2021.netlify.app/">Professional, Polished, Presentable • Garrick Aden‑Buie &amp; Silvia Canelón • useR!2021</a> – site for an intermediate xaringan workshop</li>
<li><a href="https://github.com/yihui/xaringan/wiki">Home • yihui/xaringan Wiki • GitHub</a> – wiki of customizations for xaringan</li>
<li><a href="https://www.garrickadenbuie.com/talk/extra-great-slides-nyhackr/">Making Extra Great Slides • Garrick Aden‑Buie</a> – talk &amp; slides with xaringan overview and featuring CSS styling and xaringanthemer</li>
<li><a href="https://www.katiejolly.io/blog/2021-03-16/designing-slides">Applying design guidelines to slides with {xaringanthemer} • katie jolly</a> – blog post</li>
<li><a href="https://pkg.garrickadenbuie.com/xaringanExtra/#/?id=xaringanextra">A playground of extensions for xaringan • xaringanExtra</a> – package site</li>
<li><a href="https://pkg.garrickadenbuie.com/xaringanthemer/">Custom xaringan CSS Themes • xaringanthemer</a> – package site</li>
</ul>


</section>
</section>


<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p><a href="https://happygitwithr.com/rstudio-git-github.html">Chapter 12 Connect RStudio to Git and GitHub | Happy Git and GitHub for the useR</a>↩︎</p></li>
<li id="fn2"><p><a href="https://chris.beams.io/posts/git-commit/#imperative">How to Write a Git Commit Message | Chris Beams</a>↩︎</p></li>
</ol>
</section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2021" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2021. <span>“Deploying Xaringan Slides with GitHub
Pages.”</span> March 16. <a href="https://silviacanelon.com/blog/2021-03-16-deploying-xaringan-slides/">https://silviacanelon.com/blog/2021-03-16-deploying-xaringan-slides/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>tutorial</category>
  <category>xaringan</category>
  <category>git</category>
  <guid>https://silviacanelon.com/blog/2021-03-16-deploying-xaringan-slides/</guid>
  <pubDate>Tue, 16 Mar 2021 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2021-03-16-deploying-xaringan-slides/featured.png" medium="image" type="image/png" height="75" width="144"/>
</item>
<item>
  <title>Becoming certified as an RStudio Tidyverse Instructor</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<script src="{{< blogdown/postref >}}index_files/fitvids/fitvids.min.js"></script>
<p>February 12th, 2021 was <a href="https://twitter.com/gvwilson/status/1360304482496614402?s=20">Greg Wilson’s last day at RStudio</a>. This means he is no longer running the <a href="https://education.rstudio.com/trainers/#info">instructor training program</a>, so the future of the program is unclear. You may want to contact <a href="mailto:traininginstructor@rstudio.com" class="email">traininginstructor@rstudio.com</a> with any specific questions.</p>
<p>You can also jump down in this blog post to Teaching resources to find a consolidated list of materials previously taught as part of the RStudio certification program, in addition to some related resources (thanks to Yanina for adding to this list!).</p>
<p>Lastly, you may want to consider becoming certified through <a href="https://carpentries.org/blog/2018/07/apply-to-train/">The Carpentries</a>. Yanina Bellini Saibene (<a href="https://twitter.com/yabellini"><span class="citation" data-cites="yabellini">@yabellini</span></a>) and Dorris Scott (<a href="https://twitter.com/Dorris_Scott"><span class="citation" data-cites="Dorris_Scott">@Dorris_Scott</span></a>) are a couple of RStudio instructors that have also been certified through The Carpentries.</p>
<section id="why-did-i-get-trained" class="level1">
<h1>Why did I get trained?</h1>
<p>Teaching R was not something I thought I’d ever get into but a couple of reasons were nudging me towards getting some formal training.</p>
<p>I wanted to be able to…</p>
<ol type="1">
<li>…support my coworkers in their own data analysis projects and be better prepared to introduce R to undergraduate students coming through and hoping to apply learned skills elsewhere</li>
<li>…incorporate data analysis into the research efforts of my local organizing collective, and was feeling ill-equipped to lead our group. Most collective members have very little experience with data analysis, if any, and none have programming experience</li>
</ol>
<p>After the RStudio Instructor training I can confidently say I feel prepared for both of these challenges!</p>
</section>
<section id="choose-your-own-adventure" class="level1">
<h1>Choose your own adventure</h1>
<ol type="1">
<li>Jump down to a panel on the RStudio Certification hosted by the <a href="https://twitter.com/miR_community">MiR Community</a></li>
<li>Jump down to a list of teaching exam examples and Tidyverse sample exam solutions shared openly by other instructors</li>
<li><strong>Keep reading</strong> to find out what I learned before I decided to pursue the certification and what the certification experience was like for me.</li>
</ol>
</section>
<section id="deciding-to-become-certified" class="level1">
<h1>Deciding to become certified</h1>
<section id="asking-around" class="level2">
<h2 class="anchored" data-anchor-id="asking-around">Asking around</h2>
<p>In the interest of making an informed decision, I asked a few instructors to share a bit about their experience with the certification process before I made the commitment.</p>
<ul>
<li>🇺🇸 <a href="https://education.rstudio.com/trainers/people/kadauke+stephan/">Stephan Kadauke</a> is a colleague I met through the Children’s Hospital of Philadelphia R User group. Specifically at an <a href="https://alison.rbind.io/post/2020-06-02-tidymodels-virtually/">Intro to Machine Learning with the Tidyverse</a> workshop led by Alison Hill.</li>
</ul>
<p>I met these wonderful people through the <a href="https://twitter.com/RLadiesGlobal">R-Ladies Global</a> Slack workspace:</p>
<ul>
<li>🇦🇷 <a href="https://education.rstudio.com/trainers/people/bellini_saibene+yanina/">Yanina Bellini Saibene</a> shared her experience with this process in her blog post <a href="https://yabellini.netlify.app/post/rstudiocertification/">Obtaining RStudio certification. A shared path</a>.</li>
<li>🇧🇴 🇳🇱 <a href="https://education.rstudio.com/trainers/people/rojas-saunero+paloma/">Paloma Rojas-Saunero</a> shared her view as a Ph.D.&nbsp;candidate with experience teaching R in R-Ladies workshops and as a teaching assistant in biostatistics courses.</li>
<li>🇰🇪 <a href="https://education.rstudio.com/trainers/people/kariuki+shelmith/">Shelmith Kariuki</a> speaks to her experience in her blog post <a href="https://shelkariuki.netlify.app/post/certification/">The RStudio Certification Process</a>.</li>
</ul>
<section id="heres-what-folks-had-to-say" class="level3">
<h3 class="anchored" data-anchor-id="heres-what-folks-had-to-say">Here’s what folks had to say!</h3>
<p><em>Highlights are shared with the authors’ permission and my gratitude to them.</em></p>
<section id="what-made-you-want-to-pursue-the-certification" class="level4">
<h4 class="anchored" data-anchor-id="what-made-you-want-to-pursue-the-certification">What made you want to pursue the certification?</h4>
<blockquote class="blockquote">
<p>One, it gave me incentive to read <a href="https://r4ds.had.co.nz/">R for Data Science</a> cover to cover which I had been meaning to do for a while. Two, I’m teaching R and the certification gives me some gravitas to do that. Three, it forced me to critically think about cognitive load theory, concept mapping, and lesson development, all of which are super useful when you actually have to develop lessons. <strong>–Stephan</strong></p>
</blockquote>
<blockquote class="blockquote">
<p>I pursued the certification for a few reasons. First because I am really enthusiastic about teaching and I love the tidyverse, so I wanted to find opportunities of teaching it outside my university. Second because I feel that RStudio is growing so fast on teaching materials that sharing with other instructors would be a great way to always keep updated. And last but not least, I was also encouraged by the idea of going through the process with Yanina Bellini Saibene and other amazing women as she discusses in her blog post. <strong>–Paloma</strong></p>
</blockquote>
</section>
<section id="what-did-you-think-of-the-training-itself-particularly-the-pedagogical-aspects" class="level4">
<h4 class="anchored" data-anchor-id="what-did-you-think-of-the-training-itself-particularly-the-pedagogical-aspects">What did you think of the training itself, particularly the pedagogical aspects?</h4>
<blockquote class="blockquote">
<p>The training is top notch. In my mind, Greg Wilson is the #1 authority when it comes to teaching programming and R in particular. <strong>–Stephan</strong></p>
</blockquote>
<blockquote class="blockquote">
<p>I think the best part is to take and learn the pedagogical aspect. Greg Wilson is an awesome trainer and you will love as a student all the tools and techniques that he teaches you. For learning this, the course is already worth it. All the content is more developed in the book <a href="https://teachtogether.tech/">Teaching Tech Together</a> by Greg Wilson if you want to look it over. <strong>–Yanina</strong></p>
</blockquote>
<blockquote class="blockquote">
<p>About the training, it was mind blowing, it changed my view of teaching not only programming but everything. Greg’s book is amazing and the way he teaches is outstanding. I learned so much. <strong>–Paloma</strong></p>
</blockquote>
</section>
<section id="have-you-been-able-to-implement-what-you-learned-in-some-way-either-at-work-or-elsewhere" class="level4">
<h4 class="anchored" data-anchor-id="have-you-been-able-to-implement-what-you-learned-in-some-way-either-at-work-or-elsewhere">Have you been able to implement what you learned in some way either at work or elsewhere?</h4>
<blockquote class="blockquote">
<p>Yes! As you probably saw, I’m teaching the intro to R course for <a href="https://www.youtube.com/playlist?list=PL4IzsxWztPdljYo7uE5G_R2PtYw3fUReo">R/Medicine</a>. And I’ve been teaching a similar course to doctors, in addition to some other teaching sessions that I’ve done for the CHOP R User group and/or medical resident teaching. <strong>–Stephan</strong></p>
</blockquote>
<blockquote class="blockquote">
<p>Yes! Immediately. I delivered 3 in-person courses after training and more than 15 courses on-line using all the pedagogical tools. I also co-founded <a href="https://metadocencia.netlify.app/en/">Metadocencia</a> where we share practical tools to help teachers teach online (volunteer-run and free) using these principles learned in the training. I also use some of the tools for my work as the chief of a research group for some meetings and identifying the target of some of our development (especially concept maps and learner personas). <strong>–Yanina</strong></p>
</blockquote>
<blockquote class="blockquote">
<p>I think I use what I learned so far even when I am preparing my work presentations, when developing any type of class, event, book club, etc. Overall it was an experience that made me reflect a lot on how teaching is usually done, how is my teaching so far and an inspiration about the teacher I want to be. <strong>–Paloma</strong></p>
</blockquote>
</section>
</section>
</section>
<section id="attending-the-mir-panel" class="level2">
<h2 class="anchored" data-anchor-id="attending-the-mir-panel">Attending the MiR panel</h2>
<p>If you read the questions and responses above you might have noticed one character in this story that I haven’t introduced yet. His name is <strong><a href="https://twitter.com/gvwilson">Greg Wilson</a></strong>. I tend to take such strong endorsements with a spoonful of skepticism and (spoiler alert) I’m happy to say I <strong>fully</strong> agree with everything that was said by those above. In that spirit, I’ll add my own glowing recommendation:</p>
<blockquote class="blockquote">
<p>Greg Wilson is truly a programming pedagogy expert, and an incredibly kind human being. I’m grateful to have learned from him within the context of the certification, and appreciate being able to continue learning from his example in a variety of other contexts.</p>
</blockquote>
<p>Nevertheless, I’m glad I got to do a gut-check beforehand when I attended the <a href="https://www.youtube.com/watch?v=582tMkPvloU">RStudio Instructor Certification Panel</a> hosted by the MiR Community and facilitated by <a href="https://twitter.com/Dorris_Scott">Dorris Scott</a> and <a href="https://twitter.com/smallperks">Danielle Smalls-Perkins</a>. You’ll notice Yanina and Shelmith were two of the panelists! Hearing from this panel was the last piece of the puzzle I needed to feel like pursuing the certification was an <strong>enthusiastic yes</strong>.</p>
<iframe style="display: block; margin: auto;" width="560" height="315" src="https://www.youtube.com/embed/582tMkPvloU" frameborder="0" allowfullscreen="">
</iframe>
</section>
</section>
<section id="certification-components" class="level1">
<h1>Certification components</h1>
<p>The certification itself has three components:</p>
<ol type="1">
<li><p><strong>Instructor training covering modern teaching methods</strong>. Materials for this training are <a href="https://drive.google.com/drive/folders/13ohFt3D0EJ5PDbMaWTxnHH-hwA7G0IvY">available here</a> and are based on the book <a href="https://teachtogether.tech/">Teaching Tech Together</a> written by Greg (and currently undergoing translation into Spanish by a team of volunteers!).</p></li>
<li><p>A 90-minute <strong>teaching exam</strong> based on content from the instructor training. This includes a 15-minute demonstration lesson and a written component.</p></li>
<li><p>A 90-minute <strong>Tidyverse exam</strong> to test your knowledge of the subject matter in <a href="https://r4ds.had.co.nz/">R for Data Science</a> (make sure to check the <a href="https://education.rstudio.com/trainers/#faq">program FAQs</a> for information about the Shiny exam)</p></li>
</ol>
</section>
<section id="learning-the-pedagogy" class="level1">
<h1>Learning the pedagogy</h1>
<p>When I completed the instructor training on pedagogy it took place completely online over three days. The first two days were dedicated to the materials linked in the earlier section and were taught by Greg. Despite the training starting at 7am for me, I <em>really</em> enjoyed it! There were 12 of us in the cohort and there were a handful of opportunities for us to do activities in small groups and multiple opportunities to practice the teaching tools that will help us better support R learners in our own teaching.</p>
<p>Some of my favorite topics were mental models, cognitive capacity, and formative assessments. At the heart of all three is the concept map, which serves as a guide for reverse-designing a lesson and delivering it effectively. You can find examples of concept maps <a href="https://docs.google.com/presentation/d/1ForBjP0pVhljBLuqOyYfyHw_1rrwJzpWW1ZHzCqAJpU/edit?ts=5f10c02e#slide=id.p">here as slides</a> and <a href="https://github.com/rstudio/concept-maps/">here on GitHub</a>. I’ve found concept maps to come in handy in so many other places in my life and I even made one to help me plan out this blog post. Check it out:</p>
<p><img src="https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/RIT-post-concept-map.jpg" alt="Concept map showing &quot;RStudio Instructor Certification&quot; at the center and various concepts and connections pointing to it. Including MiR webinar, teaching exam, R4DS, and others. These form the different components of the blog post and was helpful in planning out what to write about." width="75%" style="display: block; margin: auto;"></p>
<p>The third day of training, our cohort had the pleasure of learning all about using the <a href="https://rstudio.github.io/learnr/"><code>learnr</code> 📦</a> to build interactive R tutorials, from <a href="https://education.rstudio.com/trainers/people/cetinkaya-rundel+mine/">Mine Çetinkaya-Rundel</a>:</p>
<ul>
<li><i class="fas fa-link"></i> Course website: <a href="https://rstudio-education.github.io/instructor-training/">rstd.io/rit</a></li>
<li><i class="fas fa-images"></i> Slides: <a href="https://rstudio-education.github.io/instructor-training/slides/tutorial.html">building interactive tutorials in R</a></li>
<li><i class="fas fa-folder"></i> RStudio Cloud project: <a href="https://rstd.io/rit-cloud">rstd.io/rit-cloud</a></li>
<li><i class="fab fa-github"></i> Source materials: <a href="https://github.com/rstudio-education/instructor-training">rstudio-education/instructor-training</a></li>
</ul>
</section>
<section id="preparing-for-the-exams" class="level1">
<h1>Preparing for the exams</h1>
<section id="teaching-exam" class="level2">
<h2 class="anchored" data-anchor-id="teaching-exam">Teaching exam</h2>
<p>I relied on the <a href="https://drive.google.com/drive/folders/13ohFt3D0EJ5PDbMaWTxnHH-hwA7G0IvY">instructor training materials</a> and my in-class notes to prepare my demonstration lesson and study for the written component of the teaching exam. For anything that didn’t fully sink in, I consulted <a href="https://teachtogether.tech/">Teaching Tech Together</a>.</p>
<p>You can find <a href="https://github.com/spcanelon/rit-teaching-exam">all materials for my teaching demonstration</a> on GitHub. They include the slides below and <a href="https://github.com/spcanelon/rit-teaching-exam/blob/master/lubridate_livecode.Rmd">this R Markdown file</a> that I used to incorporate live coding into the lesson.</p>
<p>I found an excellent reference for a demonstration lesson in <a href="https://education.rstudio.com/trainers/people/dandrea+florencia/">Florencia D’Andrea</a>’s post <a href="https://florencia.netlify.app/blog/two-examples-of-iteration-with-purrr.en-us/">Two examples of iteration with purrr - Class for the RStudio certification</a>.</p>
<p>It comes highly recommended that someone take a look at each one of our lessons before it ships out because it seems it’s common not to realize we’ve packed too much in! Yanina was kind enough to sit through my lesson as a learner and provided fantastic feedback. Some of the things I was able to work on before my teaching exam included providing context for the lesson at the beginning (asking the learner to download the file, introducing the lesson in the context of a workshop, etc.) and talking through all my key strokes during the live coding portions. Thanks again Yani!</p>
<div class="shareagain" style="min-width:300px;margin:1em auto;text-align:center;" data-external="1">
<iframe src="https://spcanelon.github.io/rit-teaching-exam" width="600" height="337.5" style="border:2px solid currentColor;" loading="lazy" allowfullscreen="">
</iframe>
<script>fitvids('.shareagain', {players: 'iframe'});</script>
</div>
</section>
<section id="tidyverse-exam" class="level2">
<h2 class="anchored" data-anchor-id="tidyverse-exam">Tidyverse exam</h2>
<p>Lucky for me the MiR Community organized some study sessions specifically for preparing for the Tidyverse exam! Dorris and I met regularly to discuss our approach to the sample exam (v2.0) and present chapters of <em>R for Data Science</em> that we weren’t as comfortable with. Yanina joined us for some of the sessions to lend us her expertise and provide tips and tricks!</p>
<p>One of the recommendations Yanina made was to explore the <a href="https://rstudio.cloud/learn/primers">RStudio Primers</a> for any topic we wanted to practice. For me that meant <strong>iteration</strong> using <code>purrr</code>’s <code>map</code> functions. After the iteration primer and the companion <em>R for Data Science</em> chapter, I felt like I could iterate all day every day.</p>
<p>In real life, both the written portion of the teaching exam and the Tidyverse exam are very much like the sample exams provided on the RStudio Education blog. You can find those here:</p>
<ul>
<li>Sample exam v1.0 (February 2020): <a href="https://education.rstudio.com/blog/2020/02/instructor-certification-exams/">Instructor Certification Exams</a></li>
<li>Sample exam v2.0 (August 2020): <a href="https://education.rstudio.com/blog/2020/08/more-example-exams/">More sample exams</a></li>
</ul>
<p>If you’re a member of the MiR Community and like the idea of studying with some structure and friendly accountability, join us for the study group! And if you’re not, you can <a href="https://docs.google.com/forms/d/1x3eFj0syKeFkEQVg1XNSDOFlbOCkIDseKxKeC8or1-U/viewform?edit_requested=true">learn more about joining MiR as a member or ally here</a>.</p>
</section>
</section>
<section id="additional-resources" class="level1">
<h1>Additional resources</h1>
<section id="teaching-resources" class="level2">
<h2 class="anchored" data-anchor-id="teaching-resources">Teaching resources</h2>
<ul>
<li><i class="fas fa-images"></i> <a href="https://drive.google.com/drive/folders/13ohFt3D0EJ5PDbMaWTxnHH-hwA7G0IvY">Slides for the instructor training course • Greg Wilson</a></li>
<li><i class="fas fa-book"></i> <a href="https://teachtogether.tech/">Teaching Tech Together • Greg Wilson</a></li>
<li><i class="fas fa-link"></i> <a href="https://rstd.io/rit">Teaching R and Data Science with RStudio • Mine Çetinkaya-Rundel</a></li>
<li><i class="fas fa-link"></i> <a href="https://rstd.io/tip">Teaching in Production • Alison Hill</a></li>
<li><i class="fab fa-youtube"></i> <a href="https://www.youtube.com/watch?v=-2enQV3Dfng">Teaching Online at Short Notice - RStudio 2020 • Greg Wilson</a></li>
<li><i class="fab fa-youtube"></i> <a href="https://www.youtube.com/watch?v=QcE4RBH2auQ">Sharing on Short Notice - RStudio 2020 • Alison Hill &amp; Desirée De Leon</a></li>
<li><i class="fab fa-youtube"></i> <a href="https://www.youtube.com/watch?v=kmVKGxPlTvc">Evidence Based Teaching: What We Know and How to Use It - EuroSciPy 2015 • Greg Wilson</a></li>
<li><i class="fab fa-github"></i> <a href="https://github.com/rstudio-education/r4ds-instructors">rstudio-education/r4ds-instructors: Instructors’ Guide to accompany “R for Data Science” • RStudio Education</a></li>
<li><i class="fas fa-link"></i> <a href="https://www.metadocencia.org/">Cursos cortos para enseñar online • MetaDocencia</a></li>
<li><i class="fas fa-link"></i> <a href="https://bcullen.rbind.io/post/2020-10-19-teaching-an-r-bootcamp-remotely/">Flattening the leaRning curve: Teaching R online during COVID-19 • Brendan Cullen</a></li>
</ul>
</section>
<section id="experiences-with-the-certification-process" class="level2">
<h2 class="anchored" data-anchor-id="experiences-with-the-certification-process">Experiences with the certification process</h2>
<ul>
<li>Yanina Bellini Saibene – <a href="https://yabellini.netlify.app/blog/2020_rstudiocertification_en/">Obtaining RStudio certification. A shared path</a></li>
<li>Shelmith Kariuki – <a href="https://shelkariuki.netlify.app/post/certification/">The RStudio Certification Process</a></li>
<li>Ted Laderas – <a href="https://education.rstudio.com/blog/2019/11/my-experience-with-rstudio-instructor-training/#tidyverse-certification-exam">My Experience with RStudio Instructor Training</a></li>
<li>Rayna Harris – <a href="https://www.raynamharris.com/blog/rstudioTTT/">A Review: RStudio Teaching Certification Course</a></li>
<li>Brendan Cullen – <a href="https://bcullen.rbind.io/post/2020-09-03-reflections-on-rstudio-instructor-training/">Reflections on RStudio Instructor Training</a></li>
<li>Yuqi Liao – <a href="https://www.yuqiliao.com/blog/rstudiocertification/">Getting Certified as an RStudio Instructor</a></li>
<li>Beatriz Milz – <a href="https://beatrizmilz.com/posts/2021-03-02-certificacao-rstudio/">Certificação da RStudio</a></li>
<li>Rohan Alexander – <a href="https://rohanalexander.com/posts/2021-03-14-greg-wilson/">In Appreciation of Greg Wilson</a></li>
</ul>
</section>
<section id="teaching-exam-examples" class="level2">
<h2 class="anchored" data-anchor-id="teaching-exam-examples">Teaching exam examples</h2>
<ul>
<li>Silvia Canelón
<ul>
<li><a href="https://spcanelon.github.io/rit-teaching-exam">Lesson slides: Using lubridate to work with time intervals</a></li>
<li><a href="https://github.com/spcanelon/rit-teaching-exam">GitHub repo</a></li>
</ul></li>
<li>Yanina Bellini Saibene
<ul>
<li><a href="https://docs.google.com/document/d/1Z8zhRjK7tQ-VcOUMnOmxKNb2Ra_3DKsvMzo1iGeIt0I/edit">Lesson materials: Concept map and formative assessments</a></li>
<li><a href="https://docs.google.com/presentation/d/1Uzb5sHM54_t6NWLSDely6fCi8Nu4qhCT-qxMKY-vh78/edit#slide=id.p">Lesson slides: Código en R Markdown</a></li>
<li><a href="https://github.com/yabellini/RStudioCT">GitHub repo</a></li>
</ul></li>
<li>Paloma Rojas-Saunero
<ul>
<li><a href="https://palolili23.github.io/texam/teaching_exam.html">Lesson overview</a></li>
<li><a href="https://palolili23.github.io/texam/slides.html">Lesson slides: Tidy data</a></li>
<li><a href="https://palolili23.github.io/texam/tidyr.html">Lesson script: Tidyr: Reshape</a></li>
</ul></li>
<li>Florencia D’Andrea
<ul>
<li><a href="https://flor14.github.io/purrr_slides/purrr_class_15min#1">Lesson slides: Iteration with purrr package for automatized file management</a></li>
<li><a href="https://florencia.netlify.app/2020/06/two-examples-of-iteration-with-purrr.en-us/">Blog post: Two examples of iteration with purrr - Class for the RStudio certification</a></li>
<li><a href="https://github.com/flor14?tab=repositories&amp;q=purrr_&amp;type=&amp;language=">GitHub repo</a></li>
</ul></li>
<li>Beatriz Milz
<ul>
<li><a href="https://beatrizmilz.github.io/RStudio_Certification">Lesson slides: Adding figures in R Markdown</a></li>
<li><a href="https://github.com/beatrizmilz/RStudio_Certification">GitHub repo</a></li>
</ul></li>
<li>Laurie Baker
<ul>
<li><a href="https://laurielbaker.github.io/r-studio-instructor-training/slides/lubridate_slides.html#1">Lesson slides</a></li>
<li><a href="https://github.com/LaurieLBaker/r-studio-instructor-training#rstudio-instructor-certification-teaching-exam">GitHub repo</a></li>
</ul></li>
<li>Corrado Lanera
<ul>
<li><a href="https://corradolanera.github.io/rs-teaching-exam/">Lesson slides: (Meta)data texting in {ggplot2}</a></li>
<li><a href="https://github.com/CorradoLanera/rs-teaching-exam">GitHub repo</a></li>
</ul></li>
<li>Brendan Cullen
<ul>
<li><a href="https://columnwise-operations-dplyr.netlify.app/">Lesson slides: Column-wise operations with dplyr: Old and New</a></li>
<li><a href="https://github.com/brendanhcullen/rstudio-instructor-certification">GitHub repo</a></li>
</ul></li>
<li>Adi Sarid
<ul>
<li><a href="https://github.com/adisarid/rstudio_certification_exam">GitHub repo: Exercise on purrr</a></li>
</ul></li>
<li>David John Baker
<ul>
<li><a href="https://docs.google.com/presentation/d/1MFstJ3qFF1kK5dHJubn7KsPb2kcPSmuLnvHSP3QiFEA/edit?usp=sharing">Lesson slides: Learn to Pivot!</a></li>
<li><a href="https://github.com/davidjohnbaker1/rstudio_certification_training">GitHub repo</a></li>
</ul></li>
<li>Yuqi Liao
<ul>
<li><a href="https://animationr.netlify.app/#1">Lesson slides: Creating animated visualizations in R</a></li>
<li><a href="https://github.com/yuqiliao/RStudio_TeachingSample">GitHub repo</a></li>
</ul></li>
<li>Luis Verde
<ul>
<li><a href="https://github.com/luisDVA/example-lesson">GitHub repo</a></li>
</ul></li>
</ul>
</section>
<section id="tidyverse-sample-exam-solutions" class="level2">
<h2 class="anchored" data-anchor-id="tidyverse-sample-exam-solutions">Tidyverse sample exam solutions</h2>
<ul>
<li>Silvia Canelón – <a href="tidyverse-sample-exam-solutions.html">August 2020 sample exam (v2.0)</a></li>
<li>Brendan Cullen – <a href="https://tidyverse-exam-v2-solutions.netlify.app/">August 2020 sample exam (v2.0)</a></li>
<li>Marly Gotti – <a href="https://marlycormar.github.io/tidyverse_sample_exam/sample_exam_sols/sols.html">February 2020 sample exam (v1.0)</a></li>
<li>Ezekiel Adebayo Ogundepo – <a href="https://rpubs.com/gbganalyst/tidyverse-sample-exam">August 2020 sample exam (v2.0)</a></li>
</ul>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2020" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2020. <span>“Becoming Certified as an RStudio Tidyverse
Instructor.”</span> October 7. <a href="https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/">https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>RStudio</category>
  <category>education</category>
  <category>tidyverse</category>
  <guid>https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/</guid>
  <pubDate>Wed, 07 Oct 2020 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2020-10-07-rstudio-instructor-certification-tidyverse/featured.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Customizing Hugo Academic’s Dark Mode with Help from Atom</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<style>.color-preview {
  display: inline-block;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  margin: 0 0.33em;
  vertical-align: middle;
  transition: transform 100ms ease-in-out;
}
.color-preview:hover {
  cursor: pointer;
  transform: scale(2);
  transform-origin: 50% 50%;
}</style>
<!--`<span class="color-preview" style="background-color: 414073"></span><code>414073</code>`{=html}
<span class="color-preview" style="background-color: #414073"></span><code>#414073</code>-->
<section id="where-i-started" class="level1">
<h1>Where I started</h1>
<p>With Alison Hill’s <a href="https://alison.rbind.io/post/2017-06-12-up-and-running-with-blogdown/">Up and Running with Blogdown</a> post! <strong>Super helpful</strong>, though because I came to it 2.5 years late, it was more like ‘up and running with lots of water breaks’ because I had to stop and account for changes made to the Hugo Academic theme in the meantime.</p>
<ul>
<li>For example, prior to Academic version 4.6, custom CSS was added using the <code>plugins_css</code> option in <code>params.toml</code>, but <a href="https://sourcethemes.com/academic/docs/customization/#customize-style-css">in current version 4.8</a>, the theme supports SCSS (a superset of CSS) and a <strong>custom.scss</strong> file is added in the <code>assets/scss/</code> folder.</li>
</ul>
<p>The <a href="https://alison.rbind.io/post/2017-06-12-up-and-running-with-blogdown/#going-further">going futher</a> section in Alison’s post specifically talks about customizing the out-of-the-box theme and Alison directly links to her custom CSS file, which I closely referred to when changing colors in <a href="https://github.com/spcanelon/silvia/blob/master/assets/scss/custom.scss">my custom SCSS file</a>.</p>
<p>Alison’s CSS helped me customize everything from text colors and fonts to alert colors and borders for Academic’s light mode. At this point I had the light mode looking the way I wanted but the dark mode still used out-of-the-box colors for the most part and they <strong><em>just didn’t go</em></strong>.</p>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/academic-minimal-dark-theme.png" title="Out-of-the-box colors included an eggplant page background with a light purple foreground. The issue I perceived was that these colors clashed with the navy blue and gold color changes I had made and was happy with in the light mode. I particularly was bothered by a cyan color highlight for code text" alt="Out-of-the-box colors included an eggplant page background with a light purple foreground. The issue I perceived was that these colors clashed with the navy blue and gold color changes I had made and was happy with in the light mode. I particularly was bothered by a cyan color highlight for code text" width="50%" style="display: block; margin: auto;"></p>
<p>So I decided not to enable the dark-mode option in <strong>params.toml</strong> until I could figure out how to customize my stylesheet accordingly. That time has come because it turns out <a href="https://github.com/gcushen/hugo-academic/issues/988#issuecomment-475896178">it’s pretty straightforward</a>!</p>
<p>The <a href="https://bookdown.org/yihui/blogdown/css.html">Blogdown book</a> does an excellent job summarizing what you need to know about CSS. This post builds on that a little by incorporating <a href="https://sass-lang.com/guide">features made possible by SCSS</a> including <strong>variables</strong>.</p>
</section>
<section id="choose-your-own-adventure" class="level1">
<h1>Choose your own adventure</h1>
<ol type="1">
<li><strong>Check out the SCSS file</strong> linked above <i class="fas fa-hand-point-up"></i> to see how I customized my theme.</li>
<li><strong>Keep reading</strong> to follow along and learn with me <i class="fas fa-user-friends"></i>.</li>
</ol>
</section>
<section id="why-atom" class="level1">
<h1>Why Atom?</h1>
<p><a href="https://atom.io/">Atom</a> is a text editor that I like to use to <em>modify</em> any files in my website directory. I say modify because I much prefer to <em>create</em> content for posts like this one using the <a href="https://bookdown.org/yihui/blogdown/rstudio-ide.html">Blogdown addins in RStudio</a>. It’s such a breeze! But here’s why I think Atom is a fantastic companion to the RStudio IDE:</p>
<ol type="1">
<li><strong>Seeing your directory files is made friendly in Tree View</strong> when you open your website folder as a ‘project folder.’ You can just click on the file once to preview it and double-click if you want to actually open it. I find this to be really helpful when I can’t remember which file contains what I’m looking for because I don’t have to actually open each file to see what’s in it.</li>
<li><strong>Searching for something specific is easy with the built-in search tool</strong>. I’ve used this many times when I can’t remember where that specific parameter (e.g.&nbsp;fonts) or file type (e.g.&nbsp;<code>.scss</code>) is located within my directory. I also find it super handy to find specific HTML color codes or color variables. This brings me to my most favorite feature in Atom…</li>
<li><strong>The <a href="https://atom.io/packages/pigments">pigments</a> package!</strong> Like R, Atom has a universe of handy packages and <code>pigments</code> will <strong>display colors</strong> behind the code text that represents it. It’s kind of magical and has been a real game changer for me. Having this package will make customizing your scss file much easier on the eyes and brain.</li>
</ol>
<ul>
<li>You may also choose to install the <a href="https://atom.io/packages/highlight-selected">highlight-selected</a> package to make highlighted text easier to spot throughout your file and the <a href="https://atom.io/packages/file-icons">file-icons</a> package to make it easier to discern between different file types in your tree view. You can install packages in <em>Atom &gt; Preferences &gt; Install</em>.</li>
</ul>
</section>
<section id="adding-dark-mode-definitions-to-stylesheet" class="level1">
<h1>Adding dark mode definitions to stylesheet</h1>
<p>Looking through GitHub issues I found that including two sub-themes, one for light mode and one for dark mode, <a href="https://github.com/gcushen/hugo-academic/issues/995">may be considered for Academic in the future but is not a priority</a>. A related issue shared that if you use a custom CSS, you can <a href="https://github.com/gcushen/hugo-academic/issues/988">define <code>.dark .&lt;SELECTOR-NAME&gt; {...}</code> for dark mode</a>.</p>
<p>Not knowing what all of the options were for dark mode, I took a look at the <strong>dark.scss</strong> dark mode stylesheet built in to Academic in <code>themes/hugo-academic/assets/scss/academic/</code> folder. You can see the <code>pigments</code> package in action here! It makes it easier to identify elements with colors that you want to change. I’m looking at you inline code text color <code>rgb(139, 233, 253)</code><span class="color-preview" style="background-color: rgb(139, 233, 253)"></span></p>
<details>
<summary>
CSS code
</summary>
<p>Note that in SCSS syntax <code>//</code> indicates comments and <code>#</code> indicates hex codes</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode css code-with-copy"><code class="sourceCode css"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.dark</span> pre<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">.dark</span> code {</span>
<span id="cb1-3">  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">color</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rgb(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">139</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">233</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">253</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">// cyan code text color</span></span>
<span id="cb1-4">  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">background-color</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rgb(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">68</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">71</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">// light purple code background</span></span>
<span id="cb1-5">}</span></code></pre></div></div>
</details>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/atom-inline-text-color.png" title="CSS code chunk styling inline code. The Atom editor enables viewers to see the color that hex and rgb color codes correspond to, as the background of the color code text. This screenshot demonstrates that the inline code text color was cyan and the inline code background was light purple." alt="CSS code chunk styling inline code. The Atom editor enables viewers to see the color that hex and rgb color codes correspond to, as the background of the color code text. This screenshot demonstrates that the inline code text color was cyan and the inline code background was light purple." width="726" style="display: block; margin: auto;"></p>
<p>Another way to find the css for the element you want to change is to use your browser’s web inspector tool. In the screenshot below from Hugo Academic’s <a href="https://web.archive.org/web/20200512194921/https://sourcethemes.com/academic/docs/customization/">customization documentation (available in the Internet Archive)</a> I right-clicked on <strong>themes/academic/data/themes/minimal.toml</strong> and then clicked on “inspect element.” The element code was <code>.dark pre, .dark code</code> which you might recognize from the code in <strong>dark.scss</strong>.</p>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/web-element-inspector.png" title="A view of the Firefox web inspector inspecting some inline code available on the Hugo Academic documentation site which used the out-of-the-box dark mode colors. The inspector reveals that the selected text was styled by the CSS code chunk included earlier and includes color previews so you can visually identify elements by color." alt="A view of the Firefox web inspector inspecting some inline code available on the Hugo Academic documentation site which used the out-of-the-box dark mode colors. The inspector reveals that the selected text was styled by the CSS code chunk included earlier and includes color previews so you can visually identify elements by color." width="700px" style="display: block; margin: auto;"></p>
<p>You can copy and paste this new <code>.dark</code> theme code into a new (or existing) <strong>custom.scss</strong> file saved in the <code>assets/scss/</code> folder of your directory to start seeing how changes you make affect the look of your site.</p>
</section>
<section id="choosing-dark-theme-colors" class="level1">
<h1>Choosing dark theme colors</h1>
<p>Alright. Now that we have some new dark theme code in our custom file, we can move on to the exciting task of <strong>choosing colors</strong>! If you’re looking for some inspiration, <a href="https://coolors.co/palettes/trending/dark">Coolors has some dark color palettes</a>:</p>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/coolors-dark-palettes.png" title="Six different palettes available under the &quot;Dark&quot; category in the Coolors galleries, which feature deeper colors" alt="Six different palettes available under the &quot;Dark&quot; category in the Coolors galleries, which feature deeper colors" width="732" style="display: block; margin: auto;"></p>
<p>Coolors is also a great place to save colors into custom palettes. Here’s a basic example of mine:</p>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/coolors-my-basic-palette.png" title="My palette saved in Coolors, featuring a navy blue primary color with a darker and lighter variant, a gold secondary color also with variants, and a neutral off-white color between them" alt="My palette saved in Coolors, featuring a navy blue primary color with a darker and lighter variant, a gold secondary color also with variants, and a neutral off-white color between them" width="700px" style="display: block; margin: auto;"></p>
<p>If you’re like me and want to design a dark theme that uses the primary and secondary colors you picked for your light theme, keep reading! I’m gonna share highlights from what I learned about dark theme design and how to ensure your color combinations meet <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG)</a>.</p>
<p>The bulk of what I learned came from the extensive Material Design resources, including (of course) the <a href="https://www.material.io/design/color/dark-theme.html">dark theme foundational material</a>, which will look familiar if you’ve ever used an Android device.</p>
<section id="basics-of-dark-theme-design" class="level2">
<h2 class="anchored" data-anchor-id="basics-of-dark-theme-design">Basics of dark theme design</h2>
<ul>
<li><p>The primary <strong>surface color</strong> for dark themes should be dark gray, rather than black. The recommended color is <code>#121212</code><span class="color-preview" style="background-color: #121212"></span></p></li>
<li><p>As you layer components, surfaces with a higher elevation (closer to the hypothetical ‘light source’) should be lighter than those below it to create a visual hierarchy. This can be achieved by applying a semi-transparent white overlay to the primary dark gray surface.</p></li>
</ul>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/material-surface-overlays.png" title="Ten different dark mode overlay examples from Material Design. The darkest/base layer contains 0% white overlay, elevation level 01 has 5% of a white overlay, level 02 has 7%, level 04 has 8%, level 05 has 9%, level 06 has 11%, level 08 has 12%, level 12 has 14%, level 16 has 15%, and level 24 has 16%" alt="Ten different dark mode overlay examples from Material Design. The darkest/base layer contains 0% white overlay, elevation level 01 has 5% of a white overlay, level 02 has 7%, level 04 has 8%, level 05 has 9%, level 06 has 11%, level 08 has 12%, level 12 has 14%, level 16 has 15%, and level 24 has 16%" width="524" style="display: block; margin: auto;"></p>
<ul>
<li>The primary <strong>text color</strong> for dark themes should not be 100% opaque white (i.e.&nbsp;<code>#FFFFFF</code><span class="color-preview" style="background-color: #FFFFFF; border: 2px solid gray;"></span>) because it can appear to bleed or blur against dark backgrounds and be difficult to read.</li>
<li>Text hierarchy is established by controlling the opacity, for example:
<ul>
<li>High emphasis text is white with 87% opacity:<br><code>rgba(255, 255, 255, 0.87)</code><span class="color-preview" style="background-color: rgba(255, 255, 255, 0.87); border: 2px solid gray;"></span></li>
<li>Medium emphasis is white with 60% opacity:<br><code>rgba(255, 255, 255, 0.60)</code><span class="color-preview" style="background-color: rgba(255, 255, 255, 0.60); border: 2px solid gray;"></span></li>
<li>Disabled text is white with 38% opacity:<br><code>rgba(255, 255, 255, 0.38)</code><span class="color-preview" style="background-color: rgba(255, 255, 255, 0.38); border: 2px solid gray;"></span></li>
</ul></li>
<li>To meet WCAG AA standard, there must be a 4.5:1 contrast level between the body text and the dark theme surface at the highest/lightest elevation. The contrast level is 7:1 for the WCAG AAA standard.</li>
</ul>
</section>
<section id="tools-to-explore-palettes" class="level2">
<h2 class="anchored" data-anchor-id="tools-to-explore-palettes">Tools to explore palettes</h2>
<p>Material Design has a <a href="https://material.io/design/color/the-color-system.html#tools-for-picking-colors">color palette generator</a> and a <a href="https://material.io/resources/color/">color tool</a> that can be used to dark and light variants of a color. I used the color tool to find a dark and light variant of my primary and secondary colors. The accessibility feature of the color tool is helpful to determine the minimum opacity for white text to ensure enough contrast. The <a href="https://coolors.co/contrast-checker">Coolors color contrast checker</a> is another great tool.</p>
</section>
</section>
<section id="color-variables" class="level1">
<h1>Color variables</h1>
<p>One of the cool features of SCSS is the ability to use variables defined by prefix <code>$</code> (i.e.&nbsp;<code>$spc-primary: #122140;</code>. You can set your variables at the top of your SCSS file and use the variable name throughout the file. This makes it super easy to try out different dark mode colors without having to use find-and-replace. If you’re using the <code>pigments</code> package in Atom, it’ll even show you the variable colors in a dropdown!</p>
<blockquote class="blockquote">
<strong>Tip:</strong> I like using a bright color like

<span style="background-color:#FDF4F4; color:#A90533">red </span>

<p>to test color changes for different CSS elements because stands out and makes it easier to see what was modified.</p>
</blockquote>
<p>I defined my primary colors and variants, text colors, and various background colors as variables. And although dark gray (#121212) is recommended as a standard dark theme background, you can also create a custom background color by mixing it with your primary color. In my case I used <code>mix(#122140, #121212, 40)</code> to create a color that was 40% my primary color and 60% dark gray.</p>
<blockquote class="blockquote">
<p>I controlled white text opacity by using <code>rgba()</code> in CSS which accepts an alpha value between 0 and 1.</p>
</blockquote>
<p>Now, ideally I’d be able to define the result of this <code>mix()</code> as a color variable, but some CSS properties like <code>background-color</code> don’t recognize it. So I had to convert the result to a color code and define that as a variable instead. <code>pigments</code> made this conversion easy when I toggled the menu (Shift+Command+P on a Mac) and searched for the <code>pigments: convert</code> options.</p>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/atom-pigments-menu.png" title="The command palette in the Atom editor lets you search for packages and functions. When you type &quot;pigments: convert&quot; you can see the options like &quot;Pigments: Convert To Hex&quot;, &quot;Pigments: Convert to Rgba&quot;, etc." alt="The command palette in the Atom editor lets you search for packages and functions. When you type &quot;pigments: convert&quot; you can see the options like &quot;Pigments: Convert To Hex&quot;, &quot;Pigments: Convert to Rgba&quot;, etc." width="700px" style="display: block; margin: auto;"></p>
<p>This <code>mix()</code> function also came in handy when defining background surfaces with semi-transparent white overlays.</p>
<details>
<summary>
CSS code
</summary>
<p>Note that in SCSS syntax <code>//</code> indicates comments and <code>#</code> indicates hex codes</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode scss code-with-copy"><code class="sourceCode scss"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// COLOR CALCULATIONS</span></span>
<span id="cb2-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-primary, $spc-bkg-dark-std, 25)</span></span>
<span id="cb2-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// custom bkg</span></span>
<span id="cb2-4"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-bkg-dark</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#12151d</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-primary, $spc-bkg-dark-std, 40)</span></span>
<span id="cb2-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 00dp surface</span></span>
<span id="cb2-7"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-00dp</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#121824</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span>     </span>
<span id="cb2-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-00dp, white, 95)</span></span>
<span id="cb2-9"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 00dp with 5% white overlay</span></span>
<span id="cb2-10"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-01dp</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#1d232e</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-00dp, white, 93)</span></span>
<span id="cb2-12"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 00dp with 7% white overlay</span></span>
<span id="cb2-13"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-02dp</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#222833</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-14"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-00dp, white, 92)</span></span>
<span id="cb2-15"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 00dp with 8% white overlay</span></span>
<span id="cb2-16"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-03dp</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#242a35</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-17"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// below from mix($spc-00dp, white, 91)</span></span>
<span id="cb2-18"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 00dp with 9% white overlay</span></span>
<span id="cb2-19"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$spc-04dp</span>: <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">#272c37</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
</details>
<p><img src="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/img/atom-background-color-definitions.png" title="Atom editor showing the color variables I assigned to different elevation levels of my base background color. The mix() SCSS function let me mix by base dark color with white to create the effect of a white overlay as recommended by Material Design." alt="Atom editor showing the color variables I assigned to different elevation levels of my base background color. The mix() SCSS function let me mix by base dark color with white to create the effect of a white overlay as recommended by Material Design." width="700px" style="display: block; margin: auto;"></p>
<p><strong>And that’s a wrap</strong>. Have fun building your new custom dark theme!</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2020" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2020. <span>“Customizing Hugo Academic’s Dark Mode with
Help from Atom.”</span> June 16. <a href="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/">https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/</a>.
</div></div></section></div> ]]></description>
  <category>website</category>
  <category>tutorial</category>
  <category>atom</category>
  <category>blogdown</category>
  <category>hHugo</category>
  <category>css</category>
  <guid>https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/</guid>
  <pubDate>Tue, 16 Jun 2020 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2020-05-26-dark-mode-custom-with-atom/featured.png" medium="image" type="image/png" height="81" width="144"/>
</item>
<item>
  <title>Migrating from Trello to Airtable: Working with JSON Data in R</title>
  <dc:creator>Silvia Canelón</dc:creator>
  <link>https://silviacanelon.com/blog/2020-05-12-trello-to-airtable/</link>
  <description><![CDATA[ 


<!-- source: https://github.com/gadenbuie/garrickadenbuie-com/blob/main/_partials/title-block-link-buttons/title-block.html -->
<!-- 
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title"> 
-->
<!-- <header id="title-block-header" class="quarto-title-block default page-columns"> -->
<!-- <div class="quarto-title page-columns page-full featured-image p-4" style="background-image: url(featured.png), url(featured.jpg), url(../featured.jpg);"> -->



<p><strong><a href="https://airtable.com/">Airtable</a> is a user-friendly and <em>powerful</em> tool</strong> that until recently I’d been using for personal projects (i.e.&nbsp;document organizing, apartment hunting, etc.). A couple of weeks ago I leaned on Airtable to create a base designed for the <a href="https://www.womensmedicalfund.org/prfc">Philadelphia Reproductive Freedom Collective</a> to support our COVID-19 mutual aid efforts.</p>
<blockquote class="blockquote">
<p>Shout out to the <a href="https://siliconvalleydsa.org/">Silicon Valley Democratic Socialists of America</a> who provided inspiration and support! Their mutual aid network is extensive and operates at an impressive scale. Get connected with the South Bay Mutual Aid network here: https://www.aidnetwork.org/</p>
</blockquote>
<p>Having fallen in some Airtable deep-work I figured maybe it was time to <strong>retire my Trello boards</strong> in favor of some task bases. Airtable accepts CSV files from Trello but, alas, my free Trello account only gave me the option to print as a PDF or export as JSON. I decided this would be a good opportunity to learn how to parse JSON data and export it as a CSV ready for import to Airtable.</p>
<section id="what-to-expect" class="level1">
<h1>What to expect</h1>
<p>The code provided in the R Markdown file requires the <code>tidyverse</code>, <code>JSONlite</code>, and <code>lubridate</code> packages as well as a JSON file containing your Trello data. It will generate the following:</p>
<ul>
<li><code>tidy_cards.csv</code> file ready to import to Airtable</li>
<li><code>attachments</code> folder containing any content you’ve attached to your cards using a URL.</li>
<li><code>attachment_errors.csv</code> file containing the card name, or task, as well as the URL/file path of any attachments that failed to download (i.e.&nbsp;links to files stored locally), so that you exactly which links you’ll need to locate manually.</li>
</ul>
<p>By the end of the tutorial you’ll have imported a CSV file into Airtable <em><strong>and</strong></em> configured Airtable to match your Trello board. Specifically, you’ll be able to migrate <strong>labels</strong>, <strong>lists</strong>, <strong>attachments</strong>, <strong>card names</strong>, <strong>card descriptions</strong>, <strong>card due dates</strong>, <strong>date last modified</strong>, and whether the cards were marked <strong>“complete” or archived.</strong></p>
<p><strong>What <em>not</em> to expect</strong></p>
<ul>
<li>Rendered markdown from your card descriptions. Airtable <em>does</em> support markdown in its “long text” field type, but it does <em>not</em> automatically render from imported text.</li>
</ul>
</section>
<section id="choose-your-own-adventure" class="level1">
<h1>Choose your own adventure</h1>
<ol type="1">
<li><strong>Download the R Markdown file or R script</strong> linked above <i class="fas fa-hand-point-up"></i> and run with it. Jump down to section Formatting in Airtable for pointers on how to get your Airtable base configured like your Trello board.</li>
<li><strong>Keep reading</strong> for a code-through of the R Markdown file, using the example featured in the picture above, with tips and resources along the way.</li>
</ol>
</section>
<section id="follow-along-with-me" class="level1">
<h1>Follow along with me!</h1>
<p>The Trello board used for this code-through is this <a href="https://trello.com/templates/project-management/program-management-template-potjK48u">Program Management Template</a> created by Soniya Ahuja. To download the Trello board data, go to <em>Menu</em> &gt; <em>More</em> &gt; <em>Print and Export</em> and then right-click on “Export as JSON” to save the JSON file in your working directory. <strong>Or</strong> save a little time and download the <code>program-mgmt.json</code> file linked above <i class="fas fa-hand-point-up"></i>.</p>
<p>You may also choose to read through <a href="https://help.trello.com/article/924-making-sense-of-trellos-json-export">Making Sense of Trello’s JSON Export</a>.</p>
<p>Last but not least – we’ll be keeping things tidy, with the help of the <a href="https://www.tidyverse.org/"><strong>tidyverse</strong> collection of R packages</a>, to ensure each variable is in its own column, observations are in rows, and values are in cells. You can read more about tidy data in <a href="https://tidyr.tidyverse.org/articles/tidy-data.html">Chapter 12 of R for Data Science</a>.</p>
</section>
<section id="importing-json-file" class="level1">
<h1>Importing JSON file</h1>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># loading libraries</span></span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(jsonlite)</span>
<span id="cb1-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(lubridate)</span>
<span id="cb1-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(tidyverse)</span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1">trello <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stream_in</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">file</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"program-mgmt.json"</span>)) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># produces a data frame</span></span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">glimpse</span>(trello)</span></code></pre></div></div>
<p>A <em>lot</em> of information about the Trello board is contained in JSON data. We’ll be parsing information about the <code>cards</code> as well as the <code>lists</code> and then joining them together by a common identifier <code>id</code> or <code>idShort</code>.</p>
</section>
<section id="parsing-information" class="level1">
<h1>Parsing information</h1>
<p>Parsing information from JSON data was not something I was familiar with and found myself coming back to Kan Nishida’s post <a href="https://blog.exploratory.io/working-with-json-data-in-very-simple-way-ad7ebcc0bb89">Working with JSON data in a very simple way</a> time and time again throughout this process.</p>
<section id="cards" class="level2">
<h2 class="anchored" data-anchor-id="cards">Cards</h2>
<p>The first step is to extract information about the Trello <code>cards</code> themselves. This information is contained within a list of data frames and requires <strong>flattening</strong> which makes the nested hierarchical data structure into a flatter structure by assigning each of the nested variables its own column as much as possible. Then, the most important variables are selected as <code>cards_trim</code> before moving on to extracting <code>label</code> information.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># selecting cards information</span></span>
<span id="cb4-2">cards <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> trello<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>cards <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># list of 1</span></span>
<span id="cb4-3"></span>
<span id="cb4-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># flattening</span></span>
<span id="cb4-5">cards_flat <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">flatten</span>(cards) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#list of 37</span></span>
<span id="cb4-6"></span>
<span id="cb4-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># tibble time</span></span>
<span id="cb4-8">cards_flat_tbl <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_tibble</span>(cards_flat) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 32 obs of 37 variables</span></span>
<span id="cb4-9"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">glimpse</span>(cards_flat_tbl)</span>
<span id="cb4-10"></span>
<span id="cb4-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># selecting wanted variables</span></span>
<span id="cb4-12">cards_trim <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> cards_flat_tbl <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb4-13">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(id, idShort, idList, dateLastActivity, name, desc, dueComplete, due,</span>
<span id="cb4-14">         labels, attachments, shortUrl, closed) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb4-15">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">arrange</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">desc</span>(dateLastActivity))</span></code></pre></div></div>
<section id="labels" class="level3">
<h3 class="anchored" data-anchor-id="labels">Labels</h3>
<p>Relevant information about the labels is selected and the <code>unnest</code> function is used to flatten because <code>labels</code> is a list of data frames. Again, I found <a href="https://blog.exploratory.io/working-with-json-data-in-very-simple-way-ad7ebcc0bb89">Kan’s post</a> helpful here! Particularly for saving the label details as a character list, which is helpful later on. Once we get to Airtable it’ll be important that label information for each <code>card</code> be structured as a simple list of words (i.e.&nbsp;label1, label2, label3). We get close once the <code>labels</code> are contained within a character list <code>labelList</code>, but there are still “c”s and parentheses that need to be removed. String manipulation is something I’m still learning about so the code below is far from elegant!</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># extracting labels details</span></span>
<span id="cb5-2">labels_info <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> cards_trim <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(id, idShort, labels) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unnest</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># no arguments because the nested items don't have names</span></span>
<span id="cb5-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rename</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelName =</span> name) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(id, idShort, labelName) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">group_by</span>(id, idShort) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summarize</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelList =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(labelName)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-9">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelList =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as.character</span>(labelList)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-10">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelList_tidy =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_remove_all</span>(labelList, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">pattern =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelList_tidy =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_remove_all</span>(labelList_tidy, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">pattern =</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"c</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\\</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">("</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-12">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">labelList_tidy =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_remove_all</span>(labelList_tidy, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">pattern =</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\\</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">)"</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb5-13">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unique</span>()</span>
<span id="cb5-14"></span>
<span id="cb5-15">knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>(labels_info <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>L))</span>
<span id="cb5-16"></span>
<span id="cb5-17"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># joining back with main cards data frame</span></span>
<span id="cb5-18">ct_labels <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">left_join</span>(cards_trim <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>labels), labels_info <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>labelList))</span></code></pre></div></div>
</section>
<section id="attachments" class="level3">
<h3 class="anchored" data-anchor-id="attachments">Attachments</h3>
<p>The next step is to download all of the items attached to the cards onto a local folder. I found <a href="https://stackoverflow.com/questions/32174306/download-url-links-using-r">this StackOverflow post</a> really helpful. When I tried this out on my own Trello board I also found that I couldn’t download the few attachments I had made from my local drive. <a href="https://stackoverflow.com/questions/2158780/catching-an-error-and-then-branching-logic/2158803#2158803">This StackOverflow post</a> helped me figure out how to flag and catch these download errors so that I could create a list of the urls with “attachment errors” that I could follow up with manually.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># expanding the attachment lists into separate url records</span></span>
<span id="cb6-2">att_urls <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> ct_labels <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb6-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(idShort, attachments) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb6-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unnest</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb6-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(idShort, url) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb6-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">url =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as.character</span>(url),</span>
<span id="cb6-7">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">attachmentError =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'FALSE'</span>)</span>
<span id="cb6-8">knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>(att_urls <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>L))</span>
<span id="cb6-9"></span>
<span id="cb6-10"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># creating directory for attachments</span></span>
<span id="cb6-11">dirAttachments <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"attachments/"</span></span>
<span id="cb6-12"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dir.create</span>(dirAttachments)</span>
<span id="cb6-13"></span>
<span id="cb6-14"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># downloading urls and checking for errors using try()</span></span>
<span id="cb6-15"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> (i <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span>(att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>url)){</span>
<span id="cb6-16">  locAttachments <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span></span>
<span id="cb6-17">        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(dirAttachments, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>, att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>idShort[i], <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"_"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">basename</span>(att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>url[i]), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>)</span>
<span id="cb6-18">  step_to_try <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">try</span>(attachment_check <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">download.file</span>(att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>url[i], <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">destfile =</span> locAttachments))</span>
<span id="cb6-19">  <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"try-error"</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%in%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class</span>(step_to_try)) {</span>
<span id="cb6-20">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Error row: "</span>, i, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Error message: "</span>, step_to_try[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>], <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>)</span>
<span id="cb6-21">    att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>attachmentError[i] <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'TRUE'</span></span>
<span id="cb6-22">  }</span>
<span id="cb6-23">}</span></code></pre></div></div>
<p>The following selects the attachment records with errors, renames somes variables, and exports the data frame as a CSV.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># preparing data frame for export to CSV</span></span>
<span id="cb7-2">attachment_errors <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> att_urls <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb7-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">filter</span>(attachmentError <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb7-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rename</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Task_Id =</span> idShort, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Attachment_URL =</span> url, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Attachment_Error =</span> attachmentError)</span>
<span id="cb7-5"></span>
<span id="cb7-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># exporting to CSV</span></span>
<span id="cb7-7"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write.csv</span>(attachment_errors, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">file =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"attachment_errors.csv"</span>)</span></code></pre></div></div>
<blockquote class="blockquote">
<p><strong><em>Aside:</em></strong> <em>If you have a lot of attachments <em>per card</em>, you may want to create a directory folder for each card. This for loop will get you there – use it instead of the one above:</em></p>
</blockquote>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb8-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># creates individual directory folders for each card id</span></span>
<span id="cb8-2"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> (i <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span>(att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>url)){</span>
<span id="cb8-3">  dirAttachments <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(dirFiles, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"attachments"</span>, att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>idShort[i], <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>)</span>
<span id="cb8-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dir.create</span>(dirAttachments) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># creates directory for each unique card id</span></span>
<span id="cb8-5">  locAttachments <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(dirAttachments, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">basename</span>(url[i]), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/"</span>)</span>
<span id="cb8-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">download.file</span>(url[i], <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">destfile =</span> locAttachments)</span>
<span id="cb8-7">}</span></code></pre></div></div>
<p>Records in the main <code>cards</code> data frame are labeled “TRUE” within the <code>attachments</code> column if they have attachments and “FALSE” if they don’t.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb9-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># converts the attachment column to a categorical variable in the main cards+labels data frame</span></span>
<span id="cb9-2">ct_labels <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> ct_labels <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb9-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">attachments =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ifelse</span>(idShort <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%in%</span> att_urls<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>idShort, <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>))</span></code></pre></div></div>
</section>
</section>
<section id="lists" class="level2">
<h2 class="anchored" data-anchor-id="lists">Lists</h2>
<p>The <code>lists</code> information is extracted similarly to the <code>cards</code> information, but flattening is a little more straightforward because it involves only one data frame. With more data frames, the <code>unnest</code> function is a better choice.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb10-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># selecting lists information</span></span>
<span id="cb10-2">lists <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> trello<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>lists <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># list of 1 data frame</span></span>
<span id="cb10-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">glimpse</span>(lists)</span>
<span id="cb10-4"></span>
<span id="cb10-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># flattening</span></span>
<span id="cb10-6">lists_flat <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> lists[[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>]] <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 17 obs of 9 variables</span></span>
<span id="cb10-7"></span>
<span id="cb10-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># selecting wanted variables</span></span>
<span id="cb10-9">lists_trim <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> lists_flat <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb10-10">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(id, name, closed) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb10-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rename</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">idList =</span> id, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">nameList =</span> name, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">closedList =</span> closed)</span>
<span id="cb10-12">knitr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">kable</span>(lists_trim <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">head</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>L))</span>
<span id="cb10-13"></span>
<span id="cb10-14"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># joining back with main cards+labels data frame</span></span>
<span id="cb10-15">ct_labels_list <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">left_join</span>(ct_labels, lists_trim) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb10-16">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(id<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span>shortUrl, labelList_tidy<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span>nameList, closed, closedList)</span></code></pre></div></div>
</section>
</section>
<section id="exporting-to-csv" class="level1">
<h1>Exporting to CSV</h1>
<section id="data-prepping" class="level2">
<h2 class="anchored" data-anchor-id="data-prepping">Data prepping</h2>
<p>Columns in the new <code>ct_labels_list</code> data frame are given new names, and the <code>lubridate</code> package is used next to convert the date fields. <a href="http://biostat.mc.vanderbilt.edu/wiki/pub/Main/ColeBeck/datestimes.pdf">This resource</a> was helpful in understanding date conversions and formatting.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb11-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># changing variable names</span></span>
<span id="cb11-2">tidy_cards <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> ct_labels_list <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb11-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>id, <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>idList, <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>closedList) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb11-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rename</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Task =</span> name, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Task_ID =</span> idShort, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Notes =</span> desc, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Done =</span> dueComplete, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Date_Due =</span> due,</span>
<span id="cb11-5">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Labels =</span> labelList_tidy, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Trello_List =</span> nameList, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Trello_Last_Modified =</span> dateLastActivity,</span>
<span id="cb11-6">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Trello_Url =</span> shortUrl, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Trello_Attachments =</span> attachments, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Archived =</span> closed) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb11-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(Task, Task_ID, Notes, Done, Date_Due, Labels, Trello_List, Trello_Last_Modified,</span>
<span id="cb11-8">         Trello_Url, Trello_Attachments, Archived) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb11-9">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Trello_Last_Modified =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_datetime</span>(Trello_Last_Modified, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">tz =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>),</span>
<span id="cb11-10">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Date_Due =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_datetime</span>(Date_Due, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">tz =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>),</span>
<span id="cb11-11">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Done =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ifelse</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">is.na</span>(Date_Due) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'NA'</span>, Done)) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># ensures only undone tasks assigned a due date get marked as "FALSE"</span></span></code></pre></div></div>
<p>The last step before exporting the final data frame <code>tidy_cards</code> is to check the unique number of tasks to make sure it matches the number of records in the data frame (i.e.&nbsp;one task per observation).</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb12-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># determining the number of unique tasks</span></span>
<span id="cb12-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unique</span>(tidy_cards<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Task_ID))</span>
<span id="cb12-3"></span>
<span id="cb12-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># final look at tidy_cards</span></span>
<span id="cb12-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">glimpse</span>(tidy_cards)</span></code></pre></div></div>
</section>
<section id="data-exporting" class="level2">
<h2 class="anchored" data-anchor-id="data-exporting">Data exporting</h2>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb13-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write.csv</span>(tidy_cards, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">file =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"tidy_cards.csv"</span>)</span></code></pre></div></div>
</section>
</section>
<section id="formatting-in-airtable" class="level1">
<h1>Formatting in Airtable</h1>
<p><strong>Import CSV into Airtable as a new base.</strong> <em>Add a base</em> &gt; <em>Import a spreadsheet</em> &gt; <em>CSV file</em>. Upload the <code>cards_tidy.csv</code> file. Pick a name, icon, and color for your brand new base! More detailed instructions can be found in <a href="https://support.airtable.com/hc/en-us/articles/202579399-Import-an-Existing-Spreadsheet-or-CSV-Into-a-New-App#cleanup">this Airtable article</a>.</p>
<section id="task" class="level2">
<h2 class="anchored" data-anchor-id="task">Task</h2>
<ol type="1">
<li>Because we know each observation in our table is unique, we can copy and paste <code>Task</code> into the first column and hide/delete the original column. <code>Task</code> is now the primary field.</li>
</ol>
</section>
<section id="task_id" class="level2">
<h2 class="anchored" data-anchor-id="task_id">Task_ID</h2>
<ol type="1">
<li>Convert <code>Task_ID</code> field type to “number”.</li>
</ol>
</section>
<section id="notes" class="level2">
<h2 class="anchored" data-anchor-id="notes">Notes</h2>
<ol type="1">
<li>Convert <code>Notes</code> field type to “long text” and enable <em>rich text formatting</em>. This gives us the option of using Markdown in the future, but sadly doesn’t automatically recognize fully formatted Markdown in the imported text.</li>
</ol>
</section>
<section id="labels-1" class="level2">
<h2 class="anchored" data-anchor-id="labels-1">Labels</h2>
<ol type="1">
<li><p>Change <code>Labels</code> field type to “multiple select” so that it turns each item in each list into a label.</p></li>
<li><p><em><strong>Optional</strong></em>: Create a new <code>Projects</code> column next to <code>Labels</code> and use the labels to guide you in creating <code>Project</code> labels/categories: Group the records by <code>Labels</code> field and add to <code>Projects</code> field as appropriate.</p>
<blockquote class="blockquote">
<p>I recommend creating an <code>NA</code> project from the <code>NA</code> labels so that these tasks aren’t marked as “uncategorized” in the <code>Projects</code> column. Having records with an “empty” assignment gets in the way whenever you want to group by that category. To that end, it’s helpful to group by <code>Project</code> and make sure any “empty” records get assigned to the “NA” <code>Project</code>.</p>
</blockquote></li>
<li><p>Delete from <code>Labels</code> any labels that were converted to <code>Projects</code> and ungroup the records.</p></li>
</ol>
</section>
<section id="trello_lists" class="level2">
<h2 class="anchored" data-anchor-id="trello_lists">Trello_Lists</h2>
<ol type="1">
<li><p>Convert <code>Trello_Lists</code> column field type into “single select”. This gives us the option of using the Kanban style we were used to in Trello.</p>
<blockquote class="blockquote">
<p>Every record should already be associated with a Trello_List.</p>
</blockquote></li>
<li><p>If you want to replicate the Trello kanban layout, change the order of the single select options in <code>Trello_Lists</code> to match the order from left-to-right of your Trello board</p></li>
</ol>
</section>
<section id="trello_url" class="level2">
<h2 class="anchored" data-anchor-id="trello_url">Trello_URL</h2>
<ol type="1">
<li>Convert the <code>Trello_URL</code> field type to “URL” and then hide it if you don’t think you’ll reference it often.</li>
</ol>
</section>
<section id="trello_attachments" class="level2">
<h2 class="anchored" data-anchor-id="trello_attachments">Trello_Attachments</h2>
<ol type="1">
<li><p>Convert <code>Trello_Attachments</code> field type to “single select”</p></li>
<li><p>Create a new <code>Attachments</code> column with field type “attachment”. This is where you’ll upload your downloaded attachments.</p></li>
<li><p>Filter your records by <code>Trello_Attachments</code> so only show “TRUE” results</p></li>
<li><p>Sort records by <code>Task_ID</code> and simplify your view by temporarily hiding all columns except for <code>Task_Name</code> (primary field), <code>Task_ID</code>, <code>Trello_Attachments</code>, and the new <code>Attachments</code> column.</p></li>
<li><p>Open your local <code>attachments</code> folder and drag and drop the files to their corresponding <code>Attachments</code> field according to their <code>Task_ID</code> in the filename.</p>
<blockquote class="blockquote">
<p>Increase the height of the records for this step. It’ll make it easier to make sure you’re dragging and dropping to the correct record</p>
</blockquote></li>
<li><p>If you encountered errors downloading some of your attachment URLs, now is the time to check your local <code>attachment_errors.csv</code> file for the URLs with errors during the download process. These are attachments you’ll have to find elsewhere and upload to the <code>Attachments</code> field as needed.</p></li>
<li><p>Remove the filter to your view and unhide any columns you wish to remain visible.</p></li>
</ol>
</section>
<section id="done-archived" class="level2">
<h2 class="anchored" data-anchor-id="done-archived">Done &amp; Archived</h2>
<ol type="1">
<li><p>Convert the <code>Done</code> and <code>Archived</code> field types to “Checkbox” and it will automatically assign a “check” to all records marked “TRUE” and leave the ones marked “FALSE” or “NA” unchecked. So easy!</p></li>
<li><p>There is no direct option to “archive” tasks that have been completed like you can do in Trello, <em>but</em> you can apply a filter to your table view to hide the tasks that are complete. To do this, set the filter so that the <code>Done</code> and <code>Archived</code> fields are unchecked.</p>
<blockquote class="blockquote">
<p>This must be repeated for each saved View of your records.</p>
</blockquote></li>
</ol>
</section>
</section>
<section id="moving-forward" class="level1">
<h1>Moving forward</h1>
<section id="dates" class="level2">
<h2 class="anchored" data-anchor-id="dates">Dates</h2>
<ol type="1">
<li>Modify <code>Date_Due</code> and <code>Trello_Last_Modified</code> field types to “Date” with time.</li>
<li>You can sort the records by <code>Trello_Last_Modified</code> if that’s helpful, but otherwise you can hide the column and keep it for historical reference.</li>
<li>Create a new column <code>Last_Modified</code> with field type “Last modified time” and select all columns you want to track changes to on a date/time basis moving forward.</li>
</ol>
</section>
<section id="record-views" class="level2">
<h2 class="anchored" data-anchor-id="record-views">Record Views</h2>
<ol type="1">
<li>Select <strong>Kanban</strong> from the Views options and group by <code>Trello_List</code> to see your tasks similar to how you saw them in Trello, complete with attachment covers! A <em>bonus</em> is that if you have multiple images attached to a card, you can view them without expanding the card by just hovering over the attachment cover!</li>
<li>Move, collapse, and delete stacks as you see fit. Customize cards with as little or as much information as you want.</li>
</ol>
</section>
<section id="tasks-vs-subtasks" class="level2">
<h2 class="anchored" data-anchor-id="tasks-vs-subtasks">Tasks vs Subtasks</h2>
<p>There are probably many ways to parallel the checklist option Trello gives you within a card.</p>
<ul>
<li>The most straightforward is to use the basic checklist formatting within the <code>Description</code> field to create lists</li>
<li>Another is to think of your primary field <code>Tasks</code> instead as <strong>‘subtasks’</strong> and create a new column to serve as the umbrella <strong>‘task’</strong>. This new <strong>‘task’</strong> column would be field type “single selection”, then you could group your records by <strong>‘task’</strong>.</li>
</ul>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-canelón2020" class="csl-entry quarto-appendix-citeas">
Canelón, Silvia. 2020. <span>“Migrating from Trello to Airtable: Working
with JSON Data in R.”</span> May 12. <a href="https://silviacanelon.com/blog/2020-05-12-trello-to-airtable/">https://silviacanelon.com/blog/2020-05-12-trello-to-airtable/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>tutorial</category>
  <category>json</category>
  <category>jsonlite</category>
  <category>tidyverse</category>
  <guid>https://silviacanelon.com/blog/2020-05-12-trello-to-airtable/</guid>
  <pubDate>Tue, 12 May 2020 04:00:00 GMT</pubDate>
  <media:content url="https://silviacanelon.com/blog/2020-05-12-trello-to-airtable/featured.png" medium="image" type="image/png" height="85" width="144"/>
</item>
</channel>
</rss>
