

{"id":1880,"date":"2013-01-11T20:59:09","date_gmt":"2013-01-12T01:59:09","guid":{"rendered":"http:\/\/rud.is\/b\/?p=1880"},"modified":"2018-03-10T07:53:38","modified_gmt":"2018-03-10T12:53:38","slug":"slopegraphs-in-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/","title":{"rendered":"Slopegraphs in R"},"content":{"rendered":"<blockquote><p>I updated the code to use <code>ggsave<\/code> and tweaked some of the font &#038; line size values for more consistent (and pretty) output. This also means that I really need to get this up on github.<\/p><\/blockquote>\n<p>If you even remotely follow this blog, you&#8217;ll see that I&#8217;m kinda <a href=\"https:\/\/rud.is\/b\/tag\/slopegraph\/\">obsessed with slopegraphs<\/a>. While I&#8217;m pretty happy with my <a href=\"https:\/\/github.com\/hrbrmstr\/slopegraph\">Python implementation<\/a>, I do quite a bit of data processing &amp; data visualization in R these days and had a few free hours on a recent trip to Seattle, so I whipped up some R code to do traditional and multi-column rank-order slopegraphs in R, mostly due to a post over at <a href=\"https:\/\/cloudblogs.microsoft.com\/microsoftsecure\/2013\/01\/07\/operating-system-infection-rates-the-most-common-malware-families-on-each-platform\/\">Microsoft&#8217;s security blog<\/a>.<\/p>\n<pre lang=\"rsplus\">#\n# multicolumn-rankorder-slopegraph.R\n#\n# 2013-01-12 - formatting tweaks\n# 2013-01-10 - Initial version - boB Rudis - @hrbrmstr\n#\n# Pretty much explained by the script title. This is an R script which is designed to produce\n# 2+ column rank-order slopegraphs with the ability to highlight meaningful patterns\n#\n\nlibrary(ggplot2)\nlibrary(reshape2)\n\n# transcription of table from:\n# http:\/\/blogs.technet.com\/b\/security\/archive\/2013\/01\/07\/operating-system-infection-rates-the-most-common-malware-families-on-each-platform.aspx\n#\n# You can download it from: \n# https:\/\/docs.google.com\/spreadsheet\/ccc?key=0AlCY1qfmPPZVdHpwYk0xYkh3d2xLN0lwTFJrWXppZ2c\n\ndf = read.csv(\"~\/Desktop\/malware.csv\")\n\n# For this slopegraph, we care that #1 is at the top and that higher value #'s are at the bottom, so we \n# negate the rank values in the table we just read in\n\ndf$Rank.Win7.SP1 = -df$Rank.Win7.SP1\ndf$Rank.Win7.RTM = -df$Rank.Win7.RTM\ndf$Rank.Vista = -df$Rank.Vista\ndf$Rank.XP = -df$Rank.XP\n\n# Also, we are really comparing the end state (ultimately) so sort the list by the end state.\n# In this case, it's the Windows 7 malware data.\n\ndf$Family = with(df, reorder(Family, Rank.Win7.SP1))\n\n# We need to take the multi-columns and make it into 3 for line-graph processing \n\ndfm = melt(df)\n\n# We need to take the multi-columns and make it into 3 for line-graph processing \n\ndfm = melt(df)\n\n# We define our color palette manually so we can highlight the lines that \"matter\".\n# This means you'll need to generate the slopegraph at least one time prior to determine\n# which lines need coloring. This should be something we pick up algorithmically, eventually\n\nsgPalette = c(\"#990000\", \"#990000\",  \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\",\"#CCCCCC\", \"#990000\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\")\n#sgPalette = c(\"#CCCCCC\", \"#CCCCCC\",  \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\",\"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\", \"#CCCCCC\")\n#sgPalette = c(\"#000000\", \"#000000\",  \"#000000\", \"#000000\", \"#000000\",\"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\", \"#000000\")\n\n\n# start the plot\n#\n# we do a ton of customisations to the plain ggplot canvas, but it's not rocket science\n\nsg = ggplot(dfm, aes(factor(variable), value, \n                     group = Family, \n                     colour = Family, \n                     label = Family)) +\n  scale_colour_manual(values=sgPalette) +\n  theme(legend.position = \"none\", \n        axis.text.x = element_text(size=5),\n        axis.text.y=element_blank(), \n        axis.title.x=element_blank(),\n        axis.title.y=element_blank(),\n        axis.ticks=element_blank(),\n        axis.line=element_blank(),\n        panel.grid.major = element_line(\"black\", size = 0.1),\n        panel.grid.major = element_blank(),\n        panel.grid.major.y = element_blank(),\n        panel.grid.minor.y = element_blank(),\n        panel.background = element_blank())\n\n# plot the right-most labels\n\nsg1 = sg + geom_line(size=0.15) + \n  geom_text(data = subset(dfm, variable == \"Rank.Win7.SP1\"), \n            aes(x = factor(variable), label=sprintf(\" %-2d %s\",-(value),Family)), size = 1.75, hjust = 0) \n   \n# plot the left-most labels\n\nsg1 = sg1 + geom_text(data = subset(dfm, variable == \"Rank.XP\"), \n                     aes(x = factor(variable), label=sprintf(\"%s %2d \",Family,-(value))), size = 1.75, hjust = 1)\n\n# this ratio seems to work well for png output\n# you'll need to tweak font size for PDF output, but PDF will make post-processing in \n# Illustrator or Inkscape much easier.\n\nggsave(\"~\/Desktop\/malware.pdf\",sg1,w=8,h=5,dpi=150)<\/pre>\n<p><center><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1881\" data-permalink=\"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/malware\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?fit=1024%2C768&amp;ssl=1\" data-orig-size=\"1024,768\" 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;}\" data-image-title=\"malware\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?fit=510%2C383&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?resize=300%2C225&#038;ssl=1\" alt=\"malware\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-1881\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?w=1024&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>Click for larger version<\/center><\/p>\n<p>I really didn&#8217;t think the table told a story well and I truly believe slopegraphs are pretty good at telling stories.<\/p>\n<p>This bit of R code is far from generic and requires the data investigator to do some work to make it an effective visualization, but (I think) it&#8217;s one of the better starts at a slopegraph library in R. It suffers from the <a href=\"https:\/\/rud.is\/b\/2012\/06\/05\/slopegraphs-the-quintessential-gdp-example-revisited\/\">same issues<\/a> I&#8217;ve pointed out before, but it&#8217;s far fewer lines of code than my Python version and it handles multi-column slopegraphs quite nicely.<\/p>\n<p>To be truly effective, you&#8217;ll need to plot the slopegraph first and then figure out which nodes to highlight and change the <code>sgPalette<\/code> accordingly to help the reader\/viewer focus on what&#8217;s important.<\/p>\n<p>I&#8217;ll post everything on github once I recover from cross-country travel and\u2014as always\u2013welcome feedback and fixes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I updated the code to use ggsave and tweaked some of the font &#038; line size values for more consistent (and pretty) output. This also means that I really need to get this up on github. If you even remotely follow this blog, you&#8217;ll see that I&#8217;m kinda obsessed with slopegraphs. While I&#8217;m pretty happy [&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":true,"_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":[24,673,674,640,91],"tags":[],"class_list":["post-1880","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-datavis-2","category-dataviz","category-python-2","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Slopegraphs in R - 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\/2013\/01\/11\/slopegraphs-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Slopegraphs in R - rud.is\" \/>\n<meta property=\"og:description\" content=\"I updated the code to use ggsave and tweaked some of the font &#038; line size values for more consistent (and pretty) output. This also means that I really need to get this up on github. If you even remotely follow this blog, you&#8217;ll see that I&#8217;m kinda obsessed with slopegraphs. While I&#8217;m pretty happy [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-12T01:59:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-10T12:53:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware-300x225.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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Slopegraphs in R\",\"datePublished\":\"2013-01-12T01:59:09+00:00\",\"dateModified\":\"2018-03-10T12:53:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/\"},\"wordCount\":266,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/malware-300x225.png\",\"articleSection\":[\"Charts &amp; Graphs\",\"DataVis\",\"DataViz\",\"Python\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/\",\"name\":\"Slopegraphs in R - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/malware-300x225.png\",\"datePublished\":\"2013-01-12T01:59:09+00:00\",\"dateModified\":\"2018-03-10T12:53:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/malware.png?fit=1024%2C768&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/malware.png?fit=1024%2C768&ssl=1\",\"width\":1024,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/11\\\/slopegraphs-in-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Slopegraphs in R\"}]},{\"@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":"Slopegraphs in R - 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\/2013\/01\/11\/slopegraphs-in-r\/","og_locale":"en_US","og_type":"article","og_title":"Slopegraphs in R - rud.is","og_description":"I updated the code to use ggsave and tweaked some of the font &#038; line size values for more consistent (and pretty) output. This also means that I really need to get this up on github. If you even remotely follow this blog, you&#8217;ll see that I&#8217;m kinda obsessed with slopegraphs. While I&#8217;m pretty happy [&hellip;]","og_url":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/","og_site_name":"rud.is","article_published_time":"2013-01-12T01:59:09+00:00","article_modified_time":"2018-03-10T12:53:38+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware-300x225.png","type":"","width":"","height":""}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Slopegraphs in R","datePublished":"2013-01-12T01:59:09+00:00","dateModified":"2018-03-10T12:53:38+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/"},"wordCount":266,"commentCount":0,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware-300x225.png","articleSection":["Charts &amp; Graphs","DataVis","DataViz","Python","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/","url":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/","name":"Slopegraphs in R - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware-300x225.png","datePublished":"2013-01-12T01:59:09+00:00","dateModified":"2018-03-10T12:53:38+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?fit=1024%2C768&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/malware.png?fit=1024%2C768&ssl=1","width":1024,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Slopegraphs in R"}]},{"@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-uk","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2443,"url":"https:\/\/rud.is\/b\/2013\/04\/12\/use-datawrapper-for-slopegraphs\/","url_meta":{"origin":1880,"position":0},"title":"Use @datawrapper For Slopegraphs","author":"hrbrmstr","date":"2013-04-12","format":false,"excerpt":"While not perfect, I noticed that it was possible to make a pretty decent slopegraph over at [Datawrapper](http:\/\/datawrapper.de\/) as I was poking at some new features they announced recently. As an example, I ran one of the charts from my [most recent](http:\/\/rud.is\/b\/2013\/04\/11\/ugly-tables-vs-slopegraphs-pc-maker-shipments-marketshare\/) blog post as an example. If they had\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":1181,"url":"https:\/\/rud.is\/b\/2012\/06\/05\/slopegraphs-in-python-slope-colors\/","url_meta":{"origin":1880,"position":1},"title":"Slopegraphs in Python \u2013 Slope Colors","author":"hrbrmstr","date":"2012-06-05","format":false,"excerpt":"As the codebase gets closer to the 1.0 stretch we now have the addition of slope colors for when values go up\/down or remain constant between points. The code still only handles two columns of data, but the intent is for each segment to also be colored appropriately (up\/down\/same) in\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":1334,"url":"https:\/\/rud.is\/b\/2012\/06\/20\/slopegraphs-in-python-failed-states-index-part-1\/","url_meta":{"origin":1880,"position":2},"title":"Slopegraphs in Python \u2013\u00a0Failed States Index (Part 1)","author":"hrbrmstr","date":"2012-06-20","format":false,"excerpt":"The Fund For Peace (FFP) and Foreign Policy jointly released the 2012 version of the \"failed states index\" (FSI). From the FFP site, the FSI: \u2026focuses on the indicators of risk and is based on thousands of articles and reports that are processed by our CAST Software from electronically available\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":1191,"url":"https:\/\/rud.is\/b\/2012\/06\/07\/slopegraphs-in-python-exploring-binningrounding\/","url_meta":{"origin":1880,"position":3},"title":"Slopegraphs in Python \u2013 Exploring Binning\/Rounding","author":"hrbrmstr","date":"2012-06-07","format":false,"excerpt":"One of the last items for the 1.0 release is support for multiple columns of data. That will require some additional refactoring, so I've been procrastinating by exploring the recent \"fudging\" discovery. Despite claims to the contrary on other sites, there are more folks playing with slopegraphs than you might\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":1213,"url":"https:\/\/rud.is\/b\/2012\/06\/07\/slopegraphs-in-python-log-scales-spam-data-analysis\/","url_meta":{"origin":1880,"position":4},"title":"Slopegraphs in Python \u2013 Log Scales &#038; Spam Data Analysis","author":"hrbrmstr","date":"2012-06-07","format":false,"excerpt":"Given the focus on actual development of the PySlopegraph tool in most of the blog posts of late, folks may be wondering why an infosec\/inforisk guy is obsessing so much on a tool and not talking security. Besides the fixation on filling a void and promoting an underused visualization tool,\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":1089,"url":"https:\/\/rud.is\/b\/2012\/05\/28\/slopegraphs-in-python\/","url_meta":{"origin":1880,"position":5},"title":"Slopegraphs in Python","author":"hrbrmstr","date":"2012-05-28","format":false,"excerpt":"(NOTE: You can keep up with progress best at github, but can always search on \"slopegraph\" here or just hit the tag page: \"slopegraph\" regularly) I've been a bit obsessed with slopegraphs (a.k.a \"Tufte table-chart\") of late and very dissatisfied with the lack of tools to make this particular visualization\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\/1880","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=1880"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/1880\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=1880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=1880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=1880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}