

{"id":6115,"date":"2017-07-25T11:15:01","date_gmt":"2017-07-25T16:15:01","guid":{"rendered":"https:\/\/rud.is\/b\/?p=6115"},"modified":"2018-03-10T07:53:51","modified_gmt":"2018-03-10T12:53:51","slug":"r%e2%81%b6-general-attys-distributions","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/","title":{"rendered":"R\u2076 \u2014 General (Attys) Distributions"},"content":{"rendered":"<p>Matt @stiles is a spiffy data journalist at the @latimes and he posted an interesting chart on U.S. Attorneys General longevity (given that the current US AG is on thin ice):<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Only Watergate and the Civil War have prompted shorter tenures as AG (if Sessions were to leave now). A daily viz: <a href=\"https:\/\/t.co\/aJ4KDsC5kC\">https:\/\/t.co\/aJ4KDsC5kC<\/a> <a href=\"https:\/\/t.co\/ZoiEV3MhGp\">pic.twitter.com\/ZoiEV3MhGp<\/a><\/p>\n<p>&mdash; Matt Stiles (@stiles) <a href=\"https:\/\/mobile.twitter.com\/stiles\/status\/889867141104754688\">July 25, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>I thought it would be neat (since Matt did the data scraping part already) to look at AG tenure distribution by party, while also pointing out where Sessions falls.<\/p>\n<p>Now, while Matt did scrape the data, it&#8217;s tucked away into a javascript variable in an <code>iframe<\/code> on the page that contains his vis.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"6116\" data-permalink=\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/developer_tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_.png?fit=1406%2C1278&amp;ssl=1\" data-orig-size=\"1406,1278\" 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=\"Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_.png?fit=300%2C273&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_.png?fit=510%2C464&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/Developer_Tools_-_http___thedailyviz_com_2017_07_25_chart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure_.png?resize=510%2C464&#038;ssl=1\" alt=\"\" width=\"510\" height=\"464\" class=\"aligncenter size-full wp-image-6116\" \/><\/a><\/p>\n<p>It&#8217;s still easier to get it from there vs re-scrape Wikipedia (like Matt did) thanks to the <code>V8<\/code> package by @opencpu.<\/p>\n<p>The following code:<\/p>\n<ul>\n<li>grabs the vis iframe<\/li>\n<li>extracts and evaluates the target javascript to get a nice data frame<\/li>\n<li>performs some factor re-coding (for better grouping and to make it easier to identify Sessions)<\/li>\n<li>plots the distributions using the beeswarm quasirandom alogrithm<\/li>\n<\/ul>\n<pre id=\"usag01\"><code class=\"language-r\">library(V8)\r\nlibrary(rvest)\r\nlibrary(ggbeeswarm)\r\nlibrary(hrbrthemes)\r\nlibrary(tidyverse)\r\n\r\npg &lt;- read_html(&quot;http:\/\/mattstiles.org\/dailygraphics\/graphics\/attorney-general-tenure-20172517\/child.html?initialWidth=840&amp;childId=pym_0&amp;parentTitle=Chart%3A%20If%20Ousted%2C%20Jeff%20Sessions%20Would%20Have%20a%20Historically%20Short%20Tenure%20%7C%20The%20Daily%20Viz&amp;parentUrl=http%3A%2F%2Fthedailyviz.com%2F2017%2F07%2F25%2Fchart-if-ousted-jeff-sessions-would-have-a-historically-short-tenure%2F&quot;)\r\n\r\nctx &lt;- v8()\r\nctx$eval(html_nodes(pg, xpath=&quot;.\/\/script[contains(., &#039;DATA&#039;)]&quot;) %&gt;% html_text())\r\n\r\nctx$get(&quot;DATA&quot;) %&gt;% \r\n  as_tibble() %&gt;% \r\n  readr::type_convert() %&gt;% \r\n  mutate(party = ifelse(is.na(party), &quot;Other&quot;, party)) %&gt;% \r\n  mutate(party = fct_lump(party)) %&gt;% \r\n  mutate(color1 = case_when(\r\n    party == &quot;Democratic&quot; ~ &quot;#313695&quot;,\r\n    party == &quot;Republican&quot; ~ &quot;#a50026&quot;,\r\n    party == &quot;Other&quot; ~ &quot;#4d4d4d&quot;)\r\n  ) %&gt;% \r\n  mutate(color2 = ifelse(grepl(&quot;Sessions&quot;, label), &quot;#2b2b2b&quot;, &quot;#00000000&quot;)) -&gt; ags\r\n\r\nggplot() + \r\n  geom_quasirandom(data = ags, aes(party, amt, color = color1)) +\r\n  geom_quasirandom(data = ags, aes(party, amt, color = color2), \r\n                   fill = &quot;#ffffff00&quot;, size = 4, stroke = 0.25, shape = 21) +\r\n  geom_text(data = data_frame(), aes(x = &quot;Republican&quot;, y = 100, label = &quot;Jeff Sessions&quot;), \r\n            nudge_x = -0.15, family = font_rc, size = 3, hjust = 1) +\r\n  scale_color_identity() +\r\n  scale_y_comma(limits = c(0, 4200)) +\r\n  labs(x = &quot;Party&quot;, y = &quot;Tenure (days)&quot;, \r\n       title = &quot;U.S. Attorneys General&quot;,\r\n       subtitle = &quot;Distribution of tenure in office, by days &amp; party: 1789-2017&quot;,\r\n       caption = &quot;Source data\/idea: Matt Stiles &lt;bit.ly\/2vXAHTM&gt;&quot;) +\r\n  theme_ipsum_rc(grid = &quot;XY&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"6117\" data-permalink=\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/plot_zoom_png-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&amp;ssl=1\" data-orig-size=\"1432,1284\" 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=\"plot_zoom_png-2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=300%2C269&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=510%2C457&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?resize=510%2C457&#038;ssl=1\" alt=\"\" width=\"510\" height=\"457\" class=\"aligncenter size-full wp-image-6117\" \/><\/a><\/p>\n<p>I turned the data into a CSV and stuck it in <a href=\"https:\/\/gist.github.com\/hrbrmstr\/c9eddb30e6fb5038085eb30b7d94f556\">this gist<\/a> if folks want to play w\/o doing the js scraping.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Matt @stiles is a spiffy data journalist at the @latimes and he posted an interesting chart on U.S. Attorneys General longevity (given that the current US AG is on thin ice): Only Watergate and the Civil War have prompted shorter tenures as AG (if Sessions were to leave now). A daily viz: https:\/\/t.co\/aJ4KDsC5kC pic.twitter.com\/ZoiEV3MhGp &mdash; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6117,"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":[678,764,673,674,15,91],"tags":[810,787],"class_list":["post-6115","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-visualization","category-data-wrangling","category-datavis-2","category-dataviz","category-javascript","category-r","tag-post","tag-r6"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>R\u2076 \u2014 General (Attys) Distributions - 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\/07\/25\/r\u2076-general-attys-distributions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R\u2076 \u2014 General (Attys) Distributions - rud.is\" \/>\n<meta property=\"og:description\" content=\"Matt @stiles is a spiffy data journalist at the @latimes and he posted an interesting chart on U.S. Attorneys General longevity (given that the current US AG is on thin ice): Only Watergate and the Civil War have prompted shorter tenures as AG (if Sessions were to leave now). A daily viz: https:\/\/t.co\/aJ4KDsC5kC pic.twitter.com\/ZoiEV3MhGp &mdash; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2017\/07\/25\/r\u2076-general-attys-distributions\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-25T16:15:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-10T12:53:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1432\" \/>\n\t<meta property=\"og:image:height\" content=\"1284\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"R\u2076 \u2014 General (Attys) Distributions\",\"datePublished\":\"2017-07-25T16:15:01+00:00\",\"dateModified\":\"2018-03-10T12:53:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/\"},\"wordCount\":218,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1\",\"keywords\":[\"post\",\"r6\"],\"articleSection\":[\"Data Visualization\",\"data wrangling\",\"DataVis\",\"DataViz\",\"Javascript\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/\",\"url\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/\",\"name\":\"R\u2076 \u2014 General (Attys) Distributions - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1\",\"datePublished\":\"2017-07-25T16:15:01+00:00\",\"dateModified\":\"2018-03-10T12:53:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1\",\"width\":1432,\"height\":1284},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R\u2076 \u2014 General (Attys) Distributions\"}]},{\"@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":"R\u2076 \u2014 General (Attys) Distributions - 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\/07\/25\/r\u2076-general-attys-distributions\/","og_locale":"en_US","og_type":"article","og_title":"R\u2076 \u2014 General (Attys) Distributions - rud.is","og_description":"Matt @stiles is a spiffy data journalist at the @latimes and he posted an interesting chart on U.S. Attorneys General longevity (given that the current US AG is on thin ice): Only Watergate and the Civil War have prompted shorter tenures as AG (if Sessions were to leave now). A daily viz: https:\/\/t.co\/aJ4KDsC5kC pic.twitter.com\/ZoiEV3MhGp &mdash; [&hellip;]","og_url":"https:\/\/rud.is\/b\/2017\/07\/25\/r\u2076-general-attys-distributions\/","og_site_name":"rud.is","article_published_time":"2017-07-25T16:15:01+00:00","article_modified_time":"2018-03-10T12:53:51+00:00","og_image":[{"width":1432,"height":1284,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","type":"image\/png"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"R\u2076 \u2014 General (Attys) Distributions","datePublished":"2017-07-25T16:15:01+00:00","dateModified":"2018-03-10T12:53:51+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/"},"wordCount":218,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","keywords":["post","r6"],"articleSection":["Data Visualization","data wrangling","DataVis","DataViz","Javascript","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/","url":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/","name":"R\u2076 \u2014 General (Attys) Distributions - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","datePublished":"2017-07-25T16:15:01+00:00","dateModified":"2018-03-10T12:53:51+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","width":1432,"height":1284},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2017\/07\/25\/r%e2%81%b6-general-attys-distributions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"R\u2076 \u2014 General (Attys) Distributions"}]},{"@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\/07\/plot_zoom_png-2.png?fit=1432%2C1284&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-1AD","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":10966,"url":"https:\/\/rud.is\/b\/2018\/07\/02\/freeing-pdf-data-to-account-for-the-unaccounted\/","url_meta":{"origin":6115,"position":0},"title":"Freeing PDF Data to Account for the Unaccounted","author":"hrbrmstr","date":"2018-07-02","format":false,"excerpt":"I've mentioned @stiles before on the blog but for those new to my blatherings, Matt is a top-notch data journalist with the @latimes and currently stationed in South Korea. I can only imagine how much busier his life has gotten since that fateful, awful November 2016 Tuesday, but I'm truly\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\/2018\/07\/plot_zoom_png.png?fit=1200%2C681&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/plot_zoom_png.png?fit=1200%2C681&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/plot_zoom_png.png?fit=1200%2C681&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/plot_zoom_png.png?fit=1200%2C681&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/07\/plot_zoom_png.png?fit=1200%2C681&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4916,"url":"https:\/\/rud.is\/b\/2017\/01\/18\/workout-wednesday-redux-2017-week-3\/","url_meta":{"origin":6115,"position":1},"title":"Workout Wednesday Redux (2017 Week 3)","author":"hrbrmstr","date":"2017-01-18","format":false,"excerpt":"I had started a \"52 Vis\" initiative back in 2016 to encourage folks to get practice making visualizations since that's the only way to get better at virtually anything. Life got crazy, 52 Vis fell to the wayside and now there are more visible alternatives such as Makeover Monday and\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\/01\/state_of_us_2.png?fit=1200%2C548&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/state_of_us_2.png?fit=1200%2C548&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/state_of_us_2.png?fit=1200%2C548&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/state_of_us_2.png?fit=1200%2C548&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/state_of_us_2.png?fit=1200%2C548&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3841,"url":"https:\/\/rud.is\/b\/2016\/01\/03\/zellingenach-a-visual-exploration-of-the-spatial-patterns-in-the-endings-of-german-town-and-village-names-in-r\/","url_meta":{"origin":6115,"position":2},"title":"Zellingenach: A visual exploration of the spatial patterns in the endings of German town and village names in R","author":"hrbrmstr","date":"2016-01-03","format":false,"excerpt":"Moritz Stefaner started off 2016 with a [very spiffy post](http:\/\/truth-and-beauty.net\/experiments\/ach-ingen-zell\/) on _\"a visual exploration of the spatial patterns in the endings of German town and village names\"_. Moritz was [exploring some new data processing & visualization tools](https:\/\/github.com\/moritzstefaner\/ach-ingen-zell) for the post, but when I saw what he was doing I wondered\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\/2016\/01\/rud_is_zellingenach_html.png?fit=597%2C798&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/01\/rud_is_zellingenach_html.png?fit=597%2C798&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/01\/rud_is_zellingenach_html.png?fit=597%2C798&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3622,"url":"https:\/\/rud.is\/b\/2015\/08\/21\/doh-i-could-have-had-just-used-v8\/","url_meta":{"origin":6115,"position":3},"title":"Doh! I Could Have Had Just Used V8!","author":"hrbrmstr","date":"2015-08-21","format":false,"excerpt":"An R user recently had the need to split a \"full, human name\" into component parts to retrieve first & last names. The full names could be anything from something simple like _\"David Regan\"_ to more complex & diverse such as _\"John Smith Jr.\"_, _\"Izaque Iuzuru Nagata\"_ or _\"Christian Schmit\u2026","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/rud.is\/b\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7466,"url":"https:\/\/rud.is\/b\/2017\/12\/10\/a-workaround-for-when-anti-ddos-also-means-anti-data\/","url_meta":{"origin":6115,"position":4},"title":"A Workaround For When Anti-DDoS Also Means Anti-Data","author":"hrbrmstr","date":"2017-12-10","format":false,"excerpt":"More sites are turning to services like Cloudflare due to just how stupid-easy it is to DDoS --- perform a (possibly Distributed) Denial of Service attack on -- a site. Sometimes the DDoS is intentional (malicious). Sometimes it's because your bot didn't play nice (stop that, btw). Sadly, at some\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":4154,"url":"https:\/\/rud.is\/b\/2016\/03\/18\/stacking-the-deck-against-treemaps\/","url_meta":{"origin":6115,"position":5},"title":"Stacking the deck against treemaps","author":"hrbrmstr","date":"2016-03-18","format":false,"excerpt":"So, I (unapologetically) did this to @Highcharts last week: @hrbrmstr Your loss of words inspired this post!! https:\/\/t.co\/3KO0BP0k0u @hadleywickham @ma_salmon @tdmv @bearloga @rushworth_a @awhstin\u2014 Highcharts (@Highcharts) March 18, 2016 They did an awesome makeover (it's interactive if you follow the link): And, I'm not kidding, it's actually a really good\u2026","rel":"","context":"In &quot;Data Visualization&quot;","block_context":{"text":"Data Visualization","link":"https:\/\/rud.is\/b\/category\/data-visualization\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/6115","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=6115"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/6115\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/6117"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=6115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=6115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=6115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}