

{"id":11102,"date":"2018-07-29T09:08:34","date_gmt":"2018-07-29T14:08:34","guid":{"rendered":"https:\/\/rud.is\/b\/?p=11102"},"modified":"2018-07-29T09:08:34","modified_gmt":"2018-07-29T14:08:34","slug":"ggplot-doodling-with-hibp-breaches","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/","title":{"rendered":"ggplot &#8220;Doodling&#8221; with HIBP Breaches"},"content":{"rendered":"<p>After reading <a href=\"https:\/\/github.com\/themains\/pwned\">this interesting analysis<\/a> of <em>&#8220;How Often Are Americans&#8217; Accounts Breached?&#8221;<\/em> by <a href=\"http:\/\/www.gsood.com\/\">Gaurav Sood<\/a> (which we need more of in cyber-land) I gave in to the impulse to do some gg-doodling with the &#8220;Have I Been Pwnd&#8221; JSON data he used.<\/p>\n<p>It&#8217;s just some basic data manipulation with some heavy ggplot2 styling customization, so no real need for exposition beyond noting that there are many other ways to view the data. I just settled on centered segments early on and went from there. If you do a bit of gg-doodling yourself, drop a note in the comments with a link.<\/p>\n<p>You can see a full-size version of the image via <a href=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png\">this link<\/a>.<\/p>\n<pre><code class=\"language-r\">library(hrbrthemes) # use github or gitlab version\nlibrary(tidyverse)\n\n# get the data\n\ndat_url <- \"https:\/\/raw.githubusercontent.com\/themains\/pwned\/master\/data\/breaches.json\"\n\njsonlite::fromJSON(dat_url) %>% \n  mutate(BreachDate = as.Date(BreachDate)) %>% \n  tbl_df() -> breaches\n\n# selected breach labels df\ngroup_by(breaches, year = lubridate::year(BreachDate)) %>% \n  top_n(1, wt=PwnCount) %>% \n  ungroup() %>% \n  filter(year %in% c(2008, 2015, 2016, 2017)) %>% # pick years where labels will fit nicely\n  mutate(\n    lab = sprintf(\"%s\\n%sM accounts\", Name, as.integer(PwnCount\/1000000))\n  ) %>% \n  arrange(year) -> labs\n\n# num of known breaches in that year for labels\ncount(breaches, year = lubridate::year(BreachDate)) %>% \n  mutate(nlab = sprintf(\"n=%s\", n)) %>% \n  mutate(lab_x = as.Date(sprintf(\"%s-07-02\", year))) -> year_cts\n\nmutate(breaches, p_half = PwnCount\/2) %>% # for centered segments\n  ggplot() +\n  geom_segment( # centered segments\n    aes(BreachDate, p_half, xend=BreachDate, yend=-p_half), \n    color = ft_cols$yellow, size = 0.3\n  ) +\n  geom_text( # selected breach labels\n    data = labs, aes(BreachDate, PwnCount\/2, label = lab),\n    lineheight = 0.875, size = 3.25, family = font_rc,\n    hjust = c(0, 1, 1, 0), vjust = 1, nudge_x = c(25, -25, -25, 25),\n    nudge_y = 0,  color = ft_cols$slate\n  ) +\n  geom_text( # top year labels\n    data = year_cts, aes(lab_x, Inf, label = year), family = font_rc, \n    size = 4, vjust = 1, lineheight = 0.875, color = ft_cols$gray\n  ) +\n  geom_text( # bottom known breach count totals\n    data = year_cts, aes(lab_x, -Inf, label = nlab, size = n), \n    vjust = 0, lineheight = 0.875, color = ft_cols$peach,\n    family = font_rc, show.legend = FALSE\n  ) +\n  scale_x_date( # break on year\n    name = NULL, date_breaks = \"1 year\", date_labels = \"%Y\"\n  ) +\n  scale_y_comma(name = NULL, limits = c(-450000000, 450000000)) + # make room for labels\n  scale_size_continuous(range = c(3, 4.5)) + # tolerable font sizes \n  labs(\n    title = \"HIBP (Known) Breach Frequency & Size\",\n    subtitle = \"Segment length is number of accounts; n=# known account breaches that year\",\n    caption = \"Source: HIBP via <https:\/\/github.com\/themains\/pwned>\"\n  ) +\n  theme_ft_rc(grid=\"X\") +\n  theme(axis.text.y = element_blank()) +\n  theme(axis.text.x = element_blank())<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After reading this interesting analysis of &#8220;How Often Are Americans&#8217; Accounts Breached?&#8221; by Gaurav Sood (which we need more of in cyber-land) I gave in to the impulse to do some gg-doodling with the &#8220;Have I Been Pwnd&#8221; JSON data he used. It&#8217;s just some basic data manipulation with some heavy ggplot2 styling customization, so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11103,"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":[],"class_list":["post-11102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ggplot","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ggplot &quot;Doodling&quot; with HIBP Breaches - 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\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ggplot &quot;Doodling&quot; with HIBP Breaches - rud.is\" \/>\n<meta property=\"og:description\" content=\"After reading this interesting analysis of &#8220;How Often Are Americans&#8217; Accounts Breached?&#8221; by Gaurav Sood (which we need more of in cyber-land) I gave in to the impulse to do some gg-doodling with the &#8220;Have I Been Pwnd&#8221; JSON data he used. It&#8217;s just some basic data manipulation with some heavy ggplot2 styling customization, so [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-29T14:08:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"2384\" \/>\n\t<meta property=\"og:image:height\" content=\"1168\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"ggplot &#8220;Doodling&#8221; with HIBP Breaches\",\"datePublished\":\"2018-07-29T14:08:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/\"},\"wordCount\":119,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/hibp-lines.png?fit=2384%2C1168&ssl=1\",\"articleSection\":[\"ggplot\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/\",\"name\":\"ggplot \\\"Doodling\\\" with HIBP Breaches - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/hibp-lines.png?fit=2384%2C1168&ssl=1\",\"datePublished\":\"2018-07-29T14:08:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/hibp-lines.png?fit=2384%2C1168&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/hibp-lines.png?fit=2384%2C1168&ssl=1\",\"width\":\"2384\",\"height\":\"1168\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2018\\\/07\\\/29\\\/ggplot-doodling-with-hibp-breaches\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ggplot &#8220;Doodling&#8221; with HIBP Breaches\"}]},{\"@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":"ggplot \"Doodling\" with HIBP Breaches - 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\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/","og_locale":"en_US","og_type":"article","og_title":"ggplot \"Doodling\" with HIBP Breaches - rud.is","og_description":"After reading this interesting analysis of &#8220;How Often Are Americans&#8217; Accounts Breached?&#8221; by Gaurav Sood (which we need more of in cyber-land) I gave in to the impulse to do some gg-doodling with the &#8220;Have I Been Pwnd&#8221; JSON data he used. It&#8217;s just some basic data manipulation with some heavy ggplot2 styling customization, so [&hellip;]","og_url":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/","og_site_name":"rud.is","article_published_time":"2018-07-29T14:08:34+00:00","og_image":[{"width":2384,"height":1168,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","type":"image\/png"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"ggplot &#8220;Doodling&#8221; with HIBP Breaches","datePublished":"2018-07-29T14:08:34+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/"},"wordCount":119,"commentCount":3,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","articleSection":["ggplot","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/","url":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/","name":"ggplot \"Doodling\" with HIBP Breaches - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","datePublished":"2018-07-29T14:08:34+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","width":"2384","height":"1168"},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2018\/07\/29\/ggplot-doodling-with-hibp-breaches\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"ggplot &#8220;Doodling&#8221; with HIBP Breaches"}]},{"@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\/2018\/07\/hibp-lines.png?fit=2384%2C1168&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-2T4","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3700,"url":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","url_meta":{"origin":11102,"position":0},"title":"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R","author":"hrbrmstr","date":"2015-10-04","format":false,"excerpt":"I saw this post over at NatGeo over the weekend and felt compelled to replicate this: with ggplot2. Three shapefiles later and we have it close enough to toss into a post (and I really don't believe the continent names are necessary). library(rgdal) library(ggplot2) library(ggthemes) library(ggalt) # devtools::install_github(\"hrbrmstr\/ggalt\") # grab\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\/2015\/10\/unnamed-chunk-1-1.png?fit=1200%2C685&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1200%2C685&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1200%2C685&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1200%2C685&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1200%2C685&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3538,"url":"https:\/\/rud.is\/b\/2015\/07\/24\/a-path-towards-easier-map-projection-machinations-with-ggplot2\/","url_meta":{"origin":11102,"position":1},"title":"A Path Towards Easier Map Projection Machinations with ggplot2","author":"hrbrmstr","date":"2015-07-24","format":false,"excerpt":"The $DAYJOB doesn't afford much opportunity to work with cartographic datasets, but I really like maps and tinker with shapefiles and geo-data when I can, plus answer a ton of geo-questions on StackOverflow. R makes it easy\u2014one might even say too easy\u2014to work with maps. All it takes to make\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3043,"url":"https:\/\/rud.is\/b\/2014\/09\/23\/seeing-the-daylight-with-r\/","url_meta":{"origin":11102,"position":2},"title":"Seeing the (day)light with R","author":"hrbrmstr","date":"2014-09-23","format":false,"excerpt":"The arrival of the autumnal equinox foreshadows the reality of longer nights and shorter days here in the northeast US. We can both see that reality and distract ourselves from it at the same time by firing up RStudio (or your favorite editor) and taking a look at the sunrise\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6380,"url":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","url_meta":{"origin":11102,"position":3},"title":"Mapping Fall Foliage with sf","author":"hrbrmstr","date":"2017-09-18","format":false,"excerpt":"I was socially engineered by @yoniceedee into creating today'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\u2014 Vox (@voxdotcom) September 18, 2017 Since there aren't nearly enough sf and geom_sf examples out on the wild, wild #rstats\u2026","rel":"","context":"In &quot;ggplot&quot;","block_context":{"text":"ggplot","link":"https:\/\/rud.is\/b\/category\/ggplot\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3117,"url":"https:\/\/rud.is\/b\/2014\/11\/16\/moving-the-earth-well-alaska-hawaii-with-r\/","url_meta":{"origin":11102,"position":4},"title":"Moving The Earth (well, Alaska &#038; Hawaii) With R","author":"hrbrmstr","date":"2014-11-16","format":false,"excerpt":"In a previous post we looked at how to use D3 TopoJSON files with R and make some very D3-esque maps. I mentioned that one thing missing was moving Alaska & Hawaii a bit closer to the continental United States and this post shows you how to do that. The\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3442,"url":"https:\/\/rud.is\/b\/2015\/05\/26\/a-quick-incomplete-comparison-of-ggplot2-rbokeh-plotting-idioms\/","url_meta":{"origin":11102,"position":5},"title":"A quick, incomplete comparison of ggplot2 &#038; rbokeh plotting idioms","author":"hrbrmstr","date":"2015-05-26","format":false,"excerpt":"I set aside a small bit of time to give [rbokeh](https:\/\/github.com\/bokeh\/rbokeh) a try and figured I'd share a small bit of code that shows how to make the \"same\" chart in both ggplot2 and rbokeh. #### What is Bokeh\/rbokeh? rbokeh is an [htmlwidget](http:\/\/htmlwidgets.org) wrapper for the [Bokeh](http:\/\/bokeh.pydata.org\/en\/latest\/) visualization library that\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"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\/11102","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=11102"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/11102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/11103"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=11102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=11102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=11102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}