

{"id":6380,"date":"2017-09-18T07:53:14","date_gmt":"2017-09-18T12:53:14","guid":{"rendered":"https:\/\/rud.is\/b\/?p=6380"},"modified":"2022-08-05T19:40:52","modified_gmt":"2022-08-06T00:40:52","slug":"mapping-fall-foliage-with-sf","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","title":{"rendered":"Mapping Fall Foliage with sf"},"content":{"rendered":"<p>I was socially engineered by @yoniceedee into creating today&#8217;s post due to being prodded with this tweet:<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Where to see the best fall foliage, based on your location: <a href=\"https:\/\/t.co\/12pQU29ksB\">https:\/\/t.co\/12pQU29ksB<\/a> <a href=\"https:\/\/t.co\/JiywYVpmno\">pic.twitter.com\/JiywYVpmno<\/a><\/p>\n<p>&mdash; Vox (@voxdotcom) <a href=\"https:\/\/mobile.twitter.com\/voxdotcom\/status\/909729977633050624\">September 18, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Since there aren&#8217;t nearly enough <code>sf<\/code> and <code>geom_sf<\/code> examples out on the wild, wild <a rel=\"tag\" class=\"hashtag u-tag u-category\" href=\"https:\/\/rud.is\/b\/tag\/rstats\/\">#rstats<\/a> web, here&#8217;s a short one that shows how to do basic <code>sf<\/code> operations, including how to plot <code>sf<\/code> objects in ggplot2 and animate a series of them with <code>magick<\/code>.<\/p>\n<p>I&#8217;m hoping someone riffs off of this to make an interactive version with Shiny. If you do, definitely drop a link+note in the comments!<\/p>\n<p>(If folks want some exposition here, let me know in the comments and I&#8217;ll rig up an R Markdown document with more step-by-step details.)<\/p>\n<p>Full RStudio project file (with pre-cached data) is <a href=\"https:\/\/github.com\/hrbrmstr\/foliage\">on GitHub<\/a>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/dl\/foliage.gif?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rud.is\/dl\/foliage.gif?resize=510%2C306&#038;ssl=1\" width=\"510\" height=\"306\" class=\"size-full\" \/><\/a><\/p>\n<pre><code class=\"language-r\">library(rprojroot)\nlibrary(sf)\nlibrary(magick)\nlibrary(tidyverse) # NOTE: Needs github version of ggplot2\n\nroot &lt;- find_rstudio_root_file()\n\n# \"borrow\" the files from SmokyMountains.com, but be nice and cache them to\n# avoid hitting their web server for every iteration\n\nc(\"https:\/\/smokymountains.com\/wp-content\/themes\/smcom-2015\/to-delete\/js\/us.json\",\n  \"https:\/\/smokymountains.com\/wp-content\/themes\/smcom-2015\/js\/foliage2.tsv\",\n  \"https:\/\/smokymountains.com\/wp-content\/themes\/smcom-2015\/js\/foliage-2017.csv\") %&gt;%\n  walk(~{\n    sav_tmp &lt;- file.path(root, \"data\", basename(.x))\n    if (!file.exists(sav_tmp)) download.file(.x, sav_tmp)\n  })\n\n# next, we read in the GeoJSON file twice. first, to get the counties\nstates_sf &lt;- read_sf(file.path(root, \"data\", \"us.json\"), \"states\", stringsAsFactors = FALSE)\n\n# we only want the continental US\nstates_sf &lt;- filter(states_sf, !(id %in% c(\"2\", \"15\", \"72\", \"78\")))\n\n# it doesn't have a CRS so we give it one\nst_crs(states_sf) &lt;- 4326\n\n# I ran into hiccups using coord_sf() to do this, so we convert it to Albers here\nstates_sf &lt;- st_transform(states_sf, 5070)\n\n\n# next we read in the states\ncounties_sf &lt;- read_sf(file.path(root, \"data\", \"us.json\"), \"counties\", stringsAsFactors = FALSE)\nst_crs(counties_sf) &lt;- 4326\ncounties_sf &lt;- st_transform(counties_sf, 5070)\n\n# now, we read in the foliage data\nfoliage &lt;- read_tsv(file.path(root, \"data\", \"foliage-2017.csv\"),\n                    col_types = cols(.default=col_double(), id=col_character()))\n\n# and, since we have a lovely sf tidy data frame, bind it together\nleft_join(counties_sf, foliage, \"id\") %&gt;%\n  filter(!is.na(rate1)) -&gt; foliage_sf\n\n# now, we do some munging so we have better labels and so we can\n# iterate over the weeks\ngather(foliage_sf, week, value, -id, -geometry) %&gt;%\n  mutate(value = factor(value)) %&gt;%\n  filter(week != \"rate1\") %&gt;%\n  mutate(week = factor(week,\n                       levels=unique(week),\n                       labels=format(seq(as.Date(\"2017-08-26\"),\n                                         as.Date(\"2017-11-11\"), \"1 week\"),\n                                     \"%b %d\"))) -&gt; foliage_sf\n\n# now we make a ggplot object for each week and save it out to a png\npb &lt;- progress_estimated(nlevels(foliage_sf$week))\nwalk(1:nlevels(foliage_sf$week), ~{\n\n  pb$tick()$print()\n\n  xdf &lt;- filter(foliage_sf, week == levels(week)[.x])\n\n  ggplot() +\n    geom_sf(data=xdf, aes(fill=value), size=0.05, color=\"#2b2b2b\") +\n    geom_sf(data=states_sf, color=\"white\", size=0.125, fill=NA) +\n    viridis::scale_fill_viridis(\n      name=NULL,\n      discrete = TRUE,\n      labels=c(\"No Change\", \"Minimal\", \"Patchy\", \"Partial\", \"Near Peak\", \"Peak\", \"Past Peak\"),\n      drop=FALSE\n    ) +\n    labs(title=sprintf(\"Foliage: %s \", unique(xdf$week))) +\n    ggthemes::theme_map() +\n    theme(panel.grid=element_line(color=\"#00000000\")) +\n    theme(panel.grid.major=element_line(color=\"#00000000\")) +\n    theme(legend.position=\"right\") -&gt; gg\n\n  ggsave(sprintf(\"%02d.png\", .x), gg, width=5, height=3)\n\n})\n\n# we read them all back in and animate the foliage\nsprintf(\"%02d.png\", 1:nlevels(foliage_sf$week)) %&gt;%\n  map(image_read) %&gt;%\n  image_join() %&gt;%\n  image_animate(1)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I was socially engineered by @yoniceedee into creating today&#8217;s post due to being prodded with this tweet: Where to see the best fall foliage, based on your location: https:\/\/t.co\/12pQU29ksB pic.twitter.com\/JiywYVpmno &mdash; Vox (@voxdotcom) September 18, 2017 Since there aren&#8217;t nearly enough sf and geom_sf examples out on the wild, wild #rstats web, here&#8217;s a short [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6382,"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":[753,91],"tags":[810],"class_list":["post-6380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ggplot","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mapping Fall Foliage with sf - 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\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mapping Fall Foliage with sf - rud.is\" \/>\n<meta property=\"og:description\" content=\"I was socially engineered by @yoniceedee into creating today&#8217;s post due to being prodded with this tweet: Where to see the best fall foliage, based on your location: https:\/\/t.co\/12pQU29ksB pic.twitter.com\/JiywYVpmno &mdash; Vox (@voxdotcom) September 18, 2017 Since there aren&#8217;t nearly enough sf and geom_sf examples out on the wild, wild #rstats web, here&#8217;s a short [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-18T12:53:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-06T00:40:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Mapping Fall Foliage with sf\",\"datePublished\":\"2017-09-18T12:53:14+00:00\",\"dateModified\":\"2022-08-06T00:40:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\"},\"wordCount\":149,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1\",\"keywords\":[\"post\"],\"articleSection\":[\"ggplot\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\",\"url\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\",\"name\":\"Mapping Fall Foliage with sf - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1\",\"datePublished\":\"2017-09-18T12:53:14+00:00\",\"dateModified\":\"2022-08-06T00:40:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1\",\"width\":800,\"height\":480},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mapping Fall Foliage with sf\"}]},{\"@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":"Mapping Fall Foliage with sf - 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\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","og_locale":"en_US","og_type":"article","og_title":"Mapping Fall Foliage with sf - rud.is","og_description":"I was socially engineered by @yoniceedee into creating today&#8217;s post due to being prodded with this tweet: Where to see the best fall foliage, based on your location: https:\/\/t.co\/12pQU29ksB pic.twitter.com\/JiywYVpmno &mdash; Vox (@voxdotcom) September 18, 2017 Since there aren&#8217;t nearly enough sf and geom_sf examples out on the wild, wild #rstats web, here&#8217;s a short [&hellip;]","og_url":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","og_site_name":"rud.is","article_published_time":"2017-09-18T12:53:14+00:00","article_modified_time":"2022-08-06T00:40:52+00:00","og_image":[{"width":800,"height":480,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","type":"image\/gif"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Mapping Fall Foliage with sf","datePublished":"2017-09-18T12:53:14+00:00","dateModified":"2022-08-06T00:40:52+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/"},"wordCount":149,"commentCount":6,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","keywords":["post"],"articleSection":["ggplot","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","url":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","name":"Mapping Fall Foliage with sf - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","datePublished":"2017-09-18T12:53:14+00:00","dateModified":"2022-08-06T00:40:52+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","width":800,"height":480},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Mapping Fall Foliage with sf"}]},{"@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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-1EU","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":13569,"url":"https:\/\/rud.is\/b\/2022\/09\/09\/fall-foliage-javascript-ojs-edition\/","url_meta":{"origin":6380,"position":0},"title":"Fall Foliage: JavaScript\/OJS Edition","author":"hrbrmstr","date":"2022-09-09","format":false,"excerpt":"I've been (mostly) keeping up with annual updates for my R\/{sf} U.S. foliage post which you can find on GH. This year, we have Quarto, and it comes with so many batteries included that you'd think it was Christmas. One of those batteries is full support for the Observable runtime.\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"foliage map","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/09\/foliage.png?fit=1200%2C1040&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/09\/foliage.png?fit=1200%2C1040&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/09\/foliage.png?fit=1200%2C1040&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/09\/foliage.png?fit=1200%2C1040&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2022\/09\/foliage.png?fit=1200%2C1040&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11612,"url":"https:\/\/rud.is\/b\/2018\/10\/10\/geojson-version-of-cbc-quebec-ridings-hex-cartograms-with-example-usage-in-r\/","url_meta":{"origin":6380,"position":1},"title":"GeoJSON  Version of CBC Quebec Ridings Hex Cartograms with  Example Usage in R","author":"hrbrmstr","date":"2018-10-10","format":false,"excerpt":"The CBC covered the recent (as of the original post-time on this blog entry) Quebec elections and used a well-crafted hex grid map to display results: They have a great 'splainer on why they use this type of map. Thinking that it may be useful for others, I used a\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":12667,"url":"https:\/\/rud.is\/b\/2020\/03\/02\/make-wsj-esque-uber-tuesday-democrat-delegate-cartograms-in-r-with-catchpole\/","url_meta":{"origin":6380,"position":2},"title":"Make WSJ-esque \u00dcber Tuesday Democrat Delegate Cartograms in R with {catchpole}","author":"hrbrmstr","date":"2020-03-02","format":false,"excerpt":"For folks who are smart enough not to go near Twitter, I've been on a hiatus from the platform insofar as reading the Twitter feed goes. \"Why\" isn't the subject of this post so I won't go into it, but I've broken this half-NYE resolution on more than one occasion\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\/2020\/03\/my-map-2.png?fit=1200%2C784&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/my-map-2.png?fit=1200%2C784&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/my-map-2.png?fit=1200%2C784&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/my-map-2.png?fit=1200%2C784&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/my-map-2.png?fit=1200%2C784&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":14337,"url":"https:\/\/rud.is\/b\/2023\/09\/09\/foliage-2023\/","url_meta":{"origin":6380,"position":3},"title":"Foliage 2023","author":"hrbrmstr","date":"2023-09-09","format":false,"excerpt":"2023-09-10 UPDATE: Art Steinmetz took me up on the Shiny challenge (at the end of the post) and did a fantastic job! The days are getting shorter and when we were visiting Down East Maine the other week, there was just a hint of some trees starting to change up\u2026","rel":"","context":"In &quot;data wrangling&quot;","block_context":{"text":"data wrangling","link":"https:\/\/rud.is\/b\/category\/data-wrangling\/"},"img":{"alt_text":"conus foliage map 2023","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/lit-plot.png?fit=1200%2C1137&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/lit-plot.png?fit=1200%2C1137&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/lit-plot.png?fit=1200%2C1137&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/lit-plot.png?fit=1200%2C1137&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/lit-plot.png?fit=1200%2C1137&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":13232,"url":"https:\/\/rud.is\/b\/2021\/11\/02\/30daymapchallenge-2021-day-2-lines\/","url_meta":{"origin":6380,"position":4},"title":"#30DayMapChallenge 2021 Day 2: Lines","author":"hrbrmstr","date":"2021-11-02","format":false,"excerpt":"The 30-Day Map Challenge is on again, and I'm hoping to be able to scrounge some time to get an entry for each day. Day 2 is lines (Day 1 was posted on Twitter only) and \u2014 while I'm hoping to focus on saving U.S. democracy for the majority of\u2026","rel":"","context":"In &quot;gis&quot;","block_context":{"text":"gis","link":"https:\/\/rud.is\/b\/category\/gis\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12195,"url":"https:\/\/rud.is\/b\/2019\/05\/18\/mapping-tornado-alley-with-r\/","url_meta":{"origin":6380,"position":5},"title":"Mapping Tornado Alley with R","author":"hrbrmstr","date":"2019-05-18","format":false,"excerpt":"I caught a re-tweet of this tweet by @harry_stevens: THREAD: I wrote a post on @observablehq about a map I made today. It shows a typical day in the life of a graphics journalist: You never know what problems you'll have to solve on deadline! https:\/\/t.co\/yRhW1wbLxN #d3js #dataviz 1\/7 pic.twitter.com\/7N6mmK0nz3\u2014\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/05\/map-final-header.png?fit=1001%2C970&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/05\/map-final-header.png?fit=1001%2C970&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/05\/map-final-header.png?fit=1001%2C970&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/05\/map-final-header.png?fit=1001%2C970&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/6380","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=6380"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/6380\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/6382"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=6380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=6380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=6380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}