

{"id":12794,"date":"2020-07-24T16:25:15","date_gmt":"2020-07-24T21:25:15","guid":{"rendered":"https:\/\/rud.is\/b\/?p=12794"},"modified":"2020-07-24T16:25:15","modified_gmt":"2020-07-24T21:25:15","slug":"aligning-the-dots-on-covid-prison-waffles","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/","title":{"rendered":"Aligning the Dots On COVID Prison Waffles"},"content":{"rendered":"<p>The Marshall Project <a href=\"https:\/\/www.themarshallproject.org\/2020\/05\/01\/a-state-by-state-look-at-coronavirus-in-prisons\">has a solid story and set of visualizations<\/a> on the impact of COVID-19 in U.S. prisons. They keep the data (and vis) regularly updated. They do great work and this is an important topic, but this visualization breaks my &#8220;ordered grid&#8221; OCD:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"12795\" data-permalink=\"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/2020-07-24-mp-dots\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?fit=1038%2C774&amp;ssl=1\" data-orig-size=\"1038,774\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2020-07-24-mp-dots\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?fit=510%2C380&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=510%2C380&#038;ssl=1\" alt=\"\" width=\"510\" height=\"380\" class=\"aligncenter size-full wp-image-12795\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?w=1038&amp;ssl=1 1038w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=530%2C395&amp;ssl=1 530w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=150%2C112&amp;ssl=1 150w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=768%2C573&amp;ssl=1 768w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=500%2C373&amp;ssl=1 500w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=400%2C298&amp;ssl=1 400w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=800%2C597&amp;ssl=1 800w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?resize=200%2C149&amp;ssl=1 200w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>To be fair, it&#8217;s not supposed to line up as the dots are part of an animation process that has them drop from top to bottom and appears to be designed to have an &#8220;organic&#8221; feel.<\/p>\n<p>We can use the {waffle} package to iron out these wrinkled non-grids into some semblance of order, and try to replicate the chart as much as possible along the way.<\/p>\n<h3>Getting the Data<\/h3>\n<p>We first need the data and, thankfully, the MP folks provided it&hellip;just not in a way you&#8217;d expect (or that&#8217;s straightforward to use).<\/p>\n<p>Do a &#8220;view source&#8221; on that URL in your browser and scroll down to line ~1,455 and you should see this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"12797\" data-permalink=\"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/2020-07-24-mp-view-source\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?fit=1134%2C395&amp;ssl=1\" data-orig-size=\"1134,395\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2020-07-24-mp-view-source\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?fit=510%2C178&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=510%2C178&#038;ssl=1\" alt=\"\" width=\"510\" height=\"178\" class=\"aligncenter size-full wp-image-12797\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?w=1134&amp;ssl=1 1134w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=300%2C104&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=530%2C185&amp;ssl=1 530w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=150%2C52&amp;ssl=1 150w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=768%2C268&amp;ssl=1 768w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=500%2C174&amp;ssl=1 500w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=400%2C139&amp;ssl=1 400w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=800%2C279&amp;ssl=1 800w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?resize=200%2C70&amp;ssl=1 200w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-view-source.png?w=1020&amp;ssl=1 1020w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>That&#8217;s the data, right on the page, encoded in javascript?. This makes sense as it is fueling a javascript visualization and many sites are embedding data right on the page vs fetch via an XHR request to make it easier for web archives to store and retrieve working visualizations. We can totally work with this data, and we&#8217;ll do that now, along with getting some boilerplate out of the way:<\/p>\n<pre><code class=\"language-r\">library(V8)         # work with javascript data\nlibrary(stringi)    # string ops\nlibrary(rvest)      # web scrape\nlibrary(ggtext)     # pretty ggplot text with markdown\nlibrary(waffle)     # waffle charts \/\/ install_github(\"hrbrmstr\/waffle\")\nlibrary(hrbrthemes) # install_github(\"hrbrmstr\/hrbrthemes\") or don't use the font theme and pick another one\nlibrary(tidyerse)   # duh\n\ngg &lt;- glue::glue # for plot labels (later)\n\n# get the page source\npg &lt;- read_html(\"https:\/\/www.themarshallproject.org\/2020\/05\/01\/a-state-by-state-look-at-coronavirus-in-prisons\")\n\n# setup a V8 VM context\nctx &lt;- v8()\n\n# grab the \"data\" and make it a V8 VM object\nhtml_nodes(pg, xpath=\".\/\/script[contains(., 'var STATES_DATA')]\") %&gt;%\n  html_text() %&gt;%\n  ctx$eval()\n\n# get the data into R\nstates_data &lt;- ctx$get(\"STATES_DATA\")\n\nglimpse(states_data)\n## Rows: 918\n## Columns: 20\n## $ ``                 &lt;chr&gt; \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\",\u2026\n## $ name               &lt;chr&gt; \"Alabama\", \"Alaska\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Delaware\", \"Florida\", \"G\u2026\n## $ abbreviation       &lt;chr&gt; \"AL\", \"AK\", \"AZ\", \"AR\", \"CA\", \"CO\", \"CT\", \"DE\", \"FL\", \"GA\", \"HI\", \"ID\", \"IL\", \"IN\", \"IA\", \"KS\", \"KY\", \"LA\", \"M\u2026\n## $ week_of            &lt;chr&gt; \"2020-03-26\", \"2020-03-26\", \"2020-03-26\", \"2020-03-26\", \"2020-03-26\", \"2020-03-26\", \"2020-03-26\", \"2020-03-26\"\u2026\n## $ unrevised_cases    &lt;chr&gt; \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"N\u2026\n## $ cases              &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"NA\", \"0\", \"0\", \"4\", \"0\", \"0\", \"3\", \"0\", \"0\", \"0\", \"NA\", \"0\", \"0\", \"0\", \"9\", \"23\u2026\n## $ new_cases          &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"NA\", \"0\", \"0\", \"4\", \"0\", \"0\", \"3\", \"0\", \"0\", \"0\", \"NA\", \"0\", \"0\", \"0\", \"9\", \"23\u2026\n## $ filled_cases       &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"0\", \"0\", \"0\", \"4\", \"0\", \"0\", \"3\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"9\", \"23\",\u2026\n## $ case_rate          &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"0.0812809883768187\", \"0\", \"NA\", \"0\", \"0\", \"0.728318857996031\", \"0\", \"0\", \"0.7865757734661\u2026\n## $ deaths             &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"NA\", \"0\", \"0\", \"0\", \"0\", \"0\",\u2026\n## $ new_deaths         &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"NA\", \"0\", \"0\", \"0\", \"0\", \"0\",\u2026\n## $ filled_deaths      &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"1\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \u2026\n## $ death_rate         &lt;chr&gt; \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0.182079714499008\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"NA\", \"0\", \"0\"\u2026\n## $ staff_multiples    &lt;chr&gt; \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"N\u2026\n## $ prisoner_multiples &lt;chr&gt; \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"N\u2026\n## $ tested             &lt;chr&gt; \"NA\", \"4\", \"15\", \"0\", \"166\", \"NA\", \"NA\", \"4\", \"NA\", \"NA\", \"NA\", \"10\", \"13\", \"NA\", \"NA\", \"0\", \"NA\", \"32\", \"NA\",\u2026\n## $ as_of_date         &lt;chr&gt; \"NA\", \"2019-12-31\", \"2020-04-15\", \"2020-02-29\", \"2020-04-15\", \"NA\", \"NA\", \"2020-04-15\", \"NA\", \"NA\", \"NA\", \"202\u2026\n## $ march_pop          &lt;chr&gt; \"NA\", \"4997\", \"42282\", \"18181\", \"123030\", \"NA\", \"NA\", \"5042\", \"NA\", \"NA\", \"NA\", \"7816\", \"38140\", \"NA\", \"NA\", \"\u2026\n## $ april_pop          &lt;chr&gt; \"NA\", \"4997\", \"41674\", \"18181\", \"118466\", \"NA\", \"NA\", \"4624\", \"NA\", \"NA\", \"NA\", \"7641\", \"36904\", \"NA\", \"NA\", \"\u2026\n## $ test_rate          &lt;chr&gt; \"NA\", \"8.00480288172904\", \"3.54760891159359\", \"0\", \"13.4926440705519\", \"NA\", \"NA\", \"7.93335977786593\", \"NA\", \"\u2026\n<\/code><\/pre>\n<p>The comments in the code go a long way, but jist is that we extract out the javascript block containing that <code>var STATES_DATA\u2026<\/code> data, have {V8} wrangle it in javascript for us, then get the result and take a look at it. Now for the real work.<\/p>\n<h3>Making the Data Useful<\/h3>\n<p>We need \u2014 at a minimum \u2014 dates and numbers. We&#8217;re also going to mimic the visualization, so we&#8217;ll be dividing new case counts by 10 for the &#8220;1 dot == 10 cases&#8221; waffle chart and creating useful axis labels. This is pretty basic wrangling:<\/p>\n<pre><code class=\"language-r\">states_data %&gt;% \n  select(week_of, new_cases) %&gt;% \n  mutate(\n    week_of = as.Date(week_of),\n    new_cases = suppressWarnings(as.numeric(new_cases))\n  ) %&gt;%\n  count(week_of, wt = new_cases) %&gt;%\n  arrange(week_of) %&gt;%\n  mutate(\n    wk = format(week_of, \"Week of\\n%b %d\"),\n    div10 = as.integer(round(n\/10)),\n  ) %&gt;%\n  as_tibble() -&gt; cases\n\nglimpse(cases)\n## Rows: 18\n## Columns: 4\n## $ week_of &lt;date&gt; 2020-03-26, 2020-04-01, 2020-04-08, 2020-04-15, 2020-04-22, 2020-04-29, 2020-05-06, 2020-05-13, 2020-05-20, 2020-05-27, \u2026\n## $ n       &lt;dbl&gt; 56, 268, 810, 1672, 6872, 4788, 5538, 5115, 3940, 5323, 6027, 3335, 2258, 2452, 3856, 4488, 7324, 6595\n## $ wk      &lt;chr&gt; \"Week of\\nMar 26\", \"Week of\\nApr 01\", \"Week of\\nApr 08\", \"Week of\\nApr 15\", \"Week of\\nApr 22\", \"Week of\\nApr 29\", \"Week o\u2026\n## $ div10   &lt;int&gt; 6, 27, 81, 167, 687, 479, 554, 512, 394, 532, 603, 334, 226, 245, 386, 449, 732, 660\n<\/code><\/pre>\n<p>Using the {waffle} package to make &#8220;waffle bar charts&#8221; means we&#8217;ll end up with panels\/strips which will become &#8220;axis labels&#8221;. I like the fact that the MP folks did not label each week, so we&#8217;ll have to account for that as well. One of the simplest ways to do that is to make those labels spaces, but a unique number of them since we&#8217;re going to make an ordered factor to ensure the strips are in the right order. This is also pretty straightforward:<\/p>\n<pre><code class=\"language-r\">cases$wk[c(1, 3:5, 7:9, 11:13, 15:17)] &lt;- stri_pad(\"\", 1:13)\ncases$wk &lt;- fct_inorder(cases$wk)\n<\/code><\/pre>\n<p>The vector of numbers in the first line are the weeks we want to be blank and we&#8217;ll turn them into space-padded strings, each with an increasing number of spaces, then we&#8217;ll turn the entire vector of weeks into a factor in the right order.<\/p>\n<h3>Making the Chart<\/h3>\n<p>The rest is all {ggplot2} magic, so let&#8217;s get the whole plot code out of the way before talking about it:<\/p>\n<pre><code class=\"language-r\">ggplot() +\n  geom_waffle(\n    data = cases,\n    aes(fill = \"new cases\", values = div10),\n    flip = TRUE, n_cols = 10, radius = unit(3, \"pt\"),           \n    color = \"white\"\n  ) +\n  geom_text(\n    data = tibble(\n      idx = c(1, 17, 18),\n      wk = cases$wk[idx],\n      y = (cases$div10[idx] %\/% 10),\n      actual_cases = cases$n[idx],\n      lab = gg(\"{scales::comma(actual_cases, 1)} new\\ncases\")\n    ),\n    aes(1, y, label = lab),\n    vjust = 0, hjust = 0, nudge_y = 2,\n    size = 3.5, family = font_gs, lineheight = 0.875\n  ) +\n  scale_y_continuous(\n    expand = c(0, 0.125),\n    breaks = seq(0, 70, 10),\n    labels = scales::comma(seq(0, 7000, 1000)),\n    limits = c(0, 80)\n  ) +\n  scale_fill_manual(\n    values = c(\"#366b7b\")\n  ) +\n  facet_wrap(~wk, nrow=1, strip.position = \"bottom\") +\n  coord_fixed() +\n  labs(\n    x = NULL, y = NULL,\n    title = \"There have been at least&lt;br\/&gt;&lt;span style='color:#366b7b;font-size:32pt;'&gt;**70,717**&lt;\/span&gt; &lt;span style='font-size:24pt'&gt;cases&lt;\/span&gt;&lt;br\/&gt;of coronavirus reported among prisoners.&lt;br\/&gt;&lt;span style='font-size:18pt;'&gt;**46,846** prisoners have recovered.&lt;\/span&gt;\",\n    subtitle = \"Each &lt;span style='color:#366b7b;font-size:16pt;'&gt;&amp;bull;&lt;\/span&gt; represents 10 new cases.\",\n    caption = \"Source: (data) &lt;www.themarshallproject.org\/2020\/05\/01\/a-state-by-state-look-at-coronavirus-in-prisons&gt;\"\n  ) +\n  theme_ipsum_gs(\n    grid=\"Y\",\n    strip_text_family = font_gs, strip_text_face = \"plain\",\n    plot_title_family = font_gs, plot_title_face = \"plain\",\n    subtitle_family = font_an, subtitle_face = \"plain\", subtitle_size = 10\n  ) +\n  theme(\n    legend.position = \"none\",\n    strip.text = element_text(hjust = 0.5),\n    axis.text.x = element_blank(),\n    panel.spacing.x = unit(20, \"pt\"),\n    plot.title = element_markdown(),\n    plot.subtitle = element_markdown(),\n  )\n<\/code><\/pre>\n<p>There&#8217;s quite a bit going on there, so let&#8217;s break it down:<\/p>\n<ul>\n<li>We&#8217;re telling <code>geom_waffle()<\/code> to use our data, and giving it a single category to fill (as there is only one) along with the number of elements in the category. The <code>radius<\/code> parameter lets us have non-square &#8220;dots&#8221;, and <code>n_cols<\/code> + <code>flip<\/code> sets up the grid to match the one from MP. <\/li>\n<li>We need labels on top, too (just three of them) so we&#8217;ll pick the vector indices of the ones with labels and get the week strip labels, y positions, new case counts for that day, and an appropriately formatted label and plot them. We&#8217;re starting the label at the first X position in each strip and plotting the labels at the height of the &#8220;bar&#8221;.<\/li>\n<li>We&#8217;re customizing the Y scale to reflect the 1 == 10 representation of the data and using the same blue as MP did for the fill scale.<\/li>\n<li>To get them all to mimic a real X axis, we&#8217;re ensuring there&#8217;s only one row of facets and putting the facet labels at the bottom.<\/li>\n<li>By using <code>coord_fixed<\/code> we can get circles (or as close to them as you like)<\/li>\n<li>We&#8217;re using some markdown in the <code>labs()<\/code>, courtesy of {ggtext}&#8217;s <code>element_markdown()<\/code> and setting some font stylings in the base theme (use a different one if you get font errors or read the docs). We rely on this to &#8220;fake&#8221; a legend.<\/li>\n<li>Finally, we tweak strip positions and some formatting to produce:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"12796\" data-permalink=\"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/2020-07-24-mp-r-dots\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?fit=2529%2C1063&amp;ssl=1\" data-orig-size=\"2529,1063\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2020-07-24-mp-r-dots\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?fit=510%2C215&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=510%2C214&#038;ssl=1\" alt=\"\" width=\"510\" height=\"214\" class=\"aligncenter size-full wp-image-12796\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?w=2529&amp;ssl=1 2529w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=530%2C223&amp;ssl=1 530w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=150%2C63&amp;ssl=1 150w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=768%2C323&amp;ssl=1 768w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=1536%2C646&amp;ssl=1 1536w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=2048%2C861&amp;ssl=1 2048w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=500%2C210&amp;ssl=1 500w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=1200%2C504&amp;ssl=1 1200w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=400%2C168&amp;ssl=1 400w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=800%2C336&amp;ssl=1 800w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?resize=200%2C84&amp;ssl=1 200w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-r-dots.png?w=1020&amp;ssl=1 1020w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>(You likely need to view that in your own plot window in R\/RStudio or zoom in a bit)<\/p>\n<h3>FIN<\/h3>\n<p>If you spend some more time on it you can get <em>super-close<\/em> to the Marshall Project&#8217;s finished product.<\/p>\n<p>A bonus from scraping is that you also get two more datasets from the page: <code>STATES_DATA<\/code> and <code>STATE_NOTES<\/code>:<\/p>\n<pre><code class=\"language-r\">glimpse(ctx$get(\"STATES_RATES\"))\n## Rows: 51\n## Columns: 23\n## $ ``                 &lt;chr&gt; \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\",\u2026\n## $ name               &lt;chr&gt; \"Alabama\", \"Alaska\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Delaware\", \"Florida\", \"G\u2026\n## $ abbreviation       &lt;chr&gt; \"AL\", \"AK\", \"AZ\", \"AR\", \"CA\", \"CO\", \"CT\", \"DE\", \"FL\", \"GA\", \"HI\", \"ID\", \"IL\", \"IN\", \"IA\", \"KS\", \"KY\", \"LA\", \"M\u2026\n## $ unrevised_cases    &lt;lgl&gt; NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA\u2026\n## $ cases              &lt;chr&gt; \"165\", \"16\", \"684\", \"3789\", \"7066\", \"783\", \"1344\", \"508\", \"3898\", \"1113\", \"0\", \"763\", \"343\", \"729\", \"333\", \"91\u2026\n## $ new_cases          &lt;chr&gt; \"27\", \"14\", \"115\", \"307\", \"608\", \"115\", \"1\", \"213\", \"1266\", \"49\", \"0\", \"69\", \"6\", \"1\", \"109\", \"1\", \"146\", \"50\"\u2026\n## $ filled_cases       &lt;chr&gt; \"165\", \"16\", \"684\", \"3789\", \"7066\", \"783\", \"1344\", \"508\", \"3898\", \"1113\", \"0\", \"763\", \"343\", \"729\", \"333\", \"91\u2026\n## $ case_rate          &lt;chr&gt; \"77.9994327313983\", \"32.0192115269162\", \"164.131112924125\", \"2084.04378197019\", \"596.458055475833\", \"449.68986\u2026\n## $ deaths             &lt;chr&gt; \"14\", \"0\", \"13\", \"25\", \"40\", \"3\", \"7\", \"7\", \"34\", \"26\", \"0\", \"0\", \"13\", \"20\", \"1\", \"4\", \"6\", \"16\", \"0\", \"8\", \"\u2026\n## $ new_deaths         &lt;chr&gt; \"2\", \"0\", \"0\", \"9\", \"5\", \"0\", \"0\", \"0\", \"5\", \"1\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"2\", \"0\", \"0\", \"0\", \"0\", \"0\", \u2026\n## $ filled_deaths      &lt;chr&gt; \"14\", \"0\", \"13\", \"25\", \"40\", \"3\", \"7\", \"7\", \"34\", \"26\", \"0\", \"0\", \"13\", \"20\", \"1\", \"4\", \"6\", \"16\", \"0\", \"8\", \"\u2026\n## $ death_rate         &lt;chr&gt; \"6.61813368630046\", \"0\", \"3.11945097662811\", \"13.750618777845\", \"3.376496209883\", \"1.72294968986906\", \"5.72925\u2026\n## $ staff_multiples    &lt;chr&gt; \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"N\u2026\n## $ prisoner_multiples &lt;chr&gt; \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"13723\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"1884\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\", \"NA\u2026\n## $ as_of_date         &lt;chr&gt; \"2020-01-31\", \"NA\", \"2020-04-15\", \"2020-02-29\", \"2020-04-15\", \"2020-03-31\", \"2020-04-01\", \"NA\", \"NA\", \"NA\", \"2\u2026\n## $ march_pop          &lt;chr&gt; \"21154\", \"NA\", \"42282\", \"18181\", \"123030\", \"17600\", \"12422\", \"NA\", \"NA\", \"NA\", \"4631\", \"7816\", \"38140\", \"26891\u2026\n## $ april_pop          &lt;chr&gt; \"21154\", \"NA\", \"41674\", \"18181\", \"118466\", \"17412\", \"12218\", \"NA\", \"NA\", \"NA\", \"4631\", \"7641\", \"36904\", \"26891\u2026\n## $ test_rate          &lt;chr&gt; \"313.888626264536\", \"NA\", \"1176.99284925853\", \"4720.86243880975\", \"5048.53713301707\", \"4241.90213645762\", \"819\u2026\n## $ recovered          &lt;chr&gt; \"41\", \"2\", \"376\", \"2970\", \"4940\", \"628\", \"1324\", \"391\", \"NA\", \"881\", \"0\", \"100\", \"307\", \"716\", \"208\", \"906\", \"\u2026\n## $ date               &lt;chr&gt; \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"20200721\", \"2\u2026\n## $ case_ratio         &lt;chr&gt; \"-45.6429050602488\", \"-7.23368674670148\", \"-19.650267894127\", \"1714.81334912848\", \"488.054058525172\", \"538.378\u2026\n## $ death_ratio        &lt;chr&gt; \"149.040167449448\", \"-100\", \"-22.1877969354022\", \"1009.53669385711\", \"72.0346501657667\", \"-38.5633906796423\", \u2026\n## $ test_ratio         &lt;chr&gt; \"-74.3653779188402\", \"NA\", \"6.07104744754024\", \"224.056036286688\", \"205.156799892597\", \"441.281822953195\", \"34\u2026\n\nglimpse(ctx$get(\"STATE_NOTES\"))\n## Rows: 18\n## Columns: 3\n## $ state &lt;chr&gt; \"TN\", \"TN\", \"VA\", \"NM\", \"NM\", \"MN\", \"MN\", \"VT\", \"RI\", \"RI\", \"MI\", \"MD\", \"CT\", \"AK\", \"DE\", \"HI\", \"LA\", \"MA\"\n## $ type  &lt;chr&gt; \"prisoners\", \"staff\", \"staff\", \"prisoners\", \"staff\", \"prisoners\", \"staff\", \"prisoners\", \"prisoners\", \"staff\", \"prisoners\", \u2026\n## $ text  &lt;chr&gt; \"After testing everyone in all of their prisons, Tennessee has said it is releasing the total number of tests conducted and\u2026\n<\/code><\/pre>\n<p>which means you can recreate all the visualizations on the page for practice (or to explore them more). You can check out {<code>devoutsvg<\/code>}(https:\/\/github.com\/coolbutuseless\/devoutsvg) if you want to try to mimic the gradient fills as well, though they will be supported directly in R in the next major version (and are now in R-devel).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Marshall Project has a solid story and set of visualizations on the impact of COVID-19 in U.S. prisons. They keep the data (and vis) regularly updated. They do great work and this is an important topic, but this visualization breaks my &#8220;ordered grid&#8221; OCD: To be fair, it&#8217;s not supposed to line up as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[91],"tags":[],"class_list":["post-12794","post","type-post","status-publish","format-standard","hentry","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Aligning the Dots On COVID Prison Waffles - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Aligning the Dots On COVID Prison Waffles - rud.is\" \/>\n<meta property=\"og:description\" content=\"The Marshall Project has a solid story and set of visualizations on the impact of COVID-19 in U.S. prisons. They keep the data (and vis) regularly updated. They do great work and this is an important topic, but this visualization breaks my &#8220;ordered grid&#8221; OCD: To be fair, it&#8217;s not supposed to line up as [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-24T21:25:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Aligning the Dots On COVID Prison Waffles\",\"datePublished\":\"2020-07-24T21:25:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/\"},\"wordCount\":850,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/2020-07-24-mp-dots.png\",\"articleSection\":[\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/\",\"name\":\"Aligning the Dots On COVID Prison Waffles - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/2020-07-24-mp-dots.png\",\"datePublished\":\"2020-07-24T21:25:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/2020-07-24-mp-dots.png?fit=1038%2C774&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/2020-07-24-mp-dots.png?fit=1038%2C774&ssl=1\",\"width\":1038,\"height\":774},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/07\\\/24\\\/aligning-the-dots-on-covid-prison-waffles\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Aligning the Dots On COVID Prison Waffles\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Aligning the Dots On COVID Prison Waffles - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/","og_locale":"en_US","og_type":"article","og_title":"Aligning the Dots On COVID Prison Waffles - rud.is","og_description":"The Marshall Project has a solid story and set of visualizations on the impact of COVID-19 in U.S. prisons. They keep the data (and vis) regularly updated. They do great work and this is an important topic, but this visualization breaks my &#8220;ordered grid&#8221; OCD: To be fair, it&#8217;s not supposed to line up as [&hellip;]","og_url":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/","og_site_name":"rud.is","article_published_time":"2020-07-24T21:25:15+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png","type":"","width":"","height":""}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Aligning the Dots On COVID Prison Waffles","datePublished":"2020-07-24T21:25:15+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/"},"wordCount":850,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png","articleSection":["R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/","url":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/","name":"Aligning the Dots On COVID Prison Waffles - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png","datePublished":"2020-07-24T21:25:15+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?fit=1038%2C774&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/07\/2020-07-24-mp-dots.png?fit=1038%2C774&ssl=1","width":1038,"height":774},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2020\/07\/24\/aligning-the-dots-on-covid-prison-waffles\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Aligning the Dots On COVID Prison Waffles"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-3km","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":12735,"url":"https:\/\/rud.is\/b\/2020\/04\/11\/new-package-cdccovidview-to-work-with-the-u-s-cdcs-new-covid-19-trackers-covidview-and-covid-net\/","url_meta":{"origin":12794,"position":0},"title":"New Package \u2014\u00a0{cdccovidview} \u2014 To Work with the U.S. CDC&#8217;s New COVID-19 Trackers: COVIDView and COVID-NET","author":"hrbrmstr","date":"2020-04-11","format":false,"excerpt":"The United States Centers for Disease Control (CDC from now on) has setup two new public surveillance resources for COVID-19. Together, COVIDView and COVID-NET provide similar weekly surveillance data as FluView does for influenza-like illnesses (ILI). The COVIDView resources are HTML tables (O_O) and, while the COVID-NET interface provides a\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13262,"url":"https:\/\/rud.is\/b\/2022\/01\/04\/starting-2022-off-with-a-fairly-complex-ggplot2-recreation-plot\/","url_meta":{"origin":12794,"position":1},"title":"Starting 2022 Off With A Fairly Complex {ggplot2} Recreation Plot","author":"hrbrmstr","date":"2022-01-04","format":false,"excerpt":"The New York Times had a [tragic] story on Covid deaths today and one of their plots really stuck with me for how well it told that part of the story. NOTE: The red panel highlights are off a bit as I manually typed the data in (I only did\u2026","rel":"","context":"In &quot;ggplot&quot;","block_context":{"text":"ggplot","link":"https:\/\/rud.is\/b\/category\/ggplot\/"},"img":{"alt_text":"{ggplot2} recreation of NYT plot","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/01\/2022-01-04-ggplot2.jpg?fit=929%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/01\/2022-01-04-ggplot2.jpg?fit=929%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/01\/2022-01-04-ggplot2.jpg?fit=929%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/01\/2022-01-04-ggplot2.jpg?fit=929%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":13175,"url":"https:\/\/rud.is\/b\/2021\/08\/13\/some-covid-donuts-to-end-the-week\/","url_meta":{"origin":12794,"position":2},"title":"Some Covid Donuts To End The Week","author":"hrbrmstr","date":"2021-08-13","format":false,"excerpt":"Vox grabbed some data from the Kaiser Family Foundation and did a story a few days ago on it, then posted a different visualization of it that attracted some attention: I'm a pretty ardent donut detractor, but I have to also admit that they work pretty well for this use\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2021\/08\/covid-donuts-01.png?fit=1200%2C921&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2021\/08\/covid-donuts-01.png?fit=1200%2C921&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2021\/08\/covid-donuts-01.png?fit=1200%2C921&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2021\/08\/covid-donuts-01.png?fit=1200%2C921&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2021\/08\/covid-donuts-01.png?fit=1200%2C921&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":13060,"url":"https:\/\/rud.is\/b\/2021\/05\/06\/covid-19-u-s-county-vaccination-tracker-with-an-observable-notebook-using-datasettes-and-plot\/","url_meta":{"origin":12794,"position":3},"title":"COVID-19 U.S. County Vaccination Tracker With An Observable Notebook Using Datasettes and {Plot}","author":"hrbrmstr","date":"2021-05-06","format":false,"excerpt":"Rather than continue to generate daily images with R, I threw together an Observable notebook that takes advantage of the CDC COVID-19 county data datasette (provided by Simon Willison) and the new {Plot} library (by the @ObservableHQ team) that enables users to interactively see the daily county resident vaccination \"series\u2026","rel":"","context":"In &quot;DataVis&quot;","block_context":{"text":"DataVis","link":"https:\/\/rud.is\/b\/category\/datavis-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4417,"url":"https:\/\/rud.is\/b\/2016\/06\/07\/new-viridis-colorbrewer-palettes-for-ipv4-heatmap\/","url_meta":{"origin":12794,"position":4},"title":"New viridis &#038; colorbrewer palettes for ipv4-heatmap","author":"hrbrmstr","date":"2016-06-07","format":false,"excerpt":"It's no seekrit that I :heart: Hilbert curve heatmaps of IPv4 space. Real-world IPv4 maps (i.e. the ones that drop dots on the Earth) have little utility, but with Hilbert curves maps of IPv4 space many different topologies can be superimposed (from ASNs to\u2014if need be\u2014geographic locations). Plus, there's more\u2026","rel":"","context":"In &quot;data driven security&quot;","block_context":{"text":"data driven security","link":"https:\/\/rud.is\/b\/category\/data-driven-security\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/rdbu-inverted.png?fit=512%2C512&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":12866,"url":"https:\/\/rud.is\/b\/2021\/01\/04\/bringing-r-to-swift-on-macos\/","url_meta":{"origin":12794,"position":5},"title":"Bringing R to Swift on macOS","author":"hrbrmstr","date":"2021-01-04","format":false,"excerpt":"Over Christmas break I teased some screencaps: A more refined #rstats #swift \"SwiftR\" example. Simple Image view + some text views, a color picker and a button that runs R-in-Swift code (like {reticulate} does for Python in R)Note no ssd\/hd storage round-trip for the plot.Code snippet: https:\/\/t.co\/fWaHnztUgd pic.twitter.com\/y5m1I16tCB\u2014 Caliban's War\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/rud.is\/b\/category\/apple\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/12794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=12794"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/12794\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=12794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=12794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=12794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}