

{"id":4474,"date":"2016-06-28T17:18:08","date_gmt":"2016-06-28T22:18:08","guid":{"rendered":"http:\/\/rud.is\/b\/?p=4474"},"modified":"2018-03-07T16:42:22","modified_gmt":"2018-03-07T21:42:22","slug":"making-time-rivers-in-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/","title":{"rendered":"Making &#8220;Time Rivers&#8221; in R"},"content":{"rendered":"<p>Once again, @albertocairo notices an interesting chart and spurs pondering in the visualization community with [his post](http:\/\/www.thefunctionalart.com\/2016\/06\/defying-conventions-in-visualization.html) covering an unusual &#8220;vertical time series&#8221; chart produced for the print version of the NYTimes:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/IMG_0509-1.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4475\" data-permalink=\"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/img_0509-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/IMG_0509-1.jpg?fit=1600%2C1200&amp;ssl=1\" data-orig-size=\"1600,1200\" 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=\"IMG_0509-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/IMG_0509-1.jpg?fit=510%2C383&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/IMG_0509-1.jpg?w=510&#038;ssl=1\" alt=\"IMG_0509-1\"  class=\"aligncenter size-full wp-image-4475\" \/><\/a><\/p>\n<p>I&#8217;m actually less concerned about the vertical time series chart component here since I agree with TAVE<sup>*<\/sup> Cairo that folks are smart enough to grok it and that it will be a standard convention soon enough given the prevalence of our collective tiny, glowing rectangles. The Times folks plotted Martin-Quinn (M-Q) scores for the U.S. Supreme Court justices which are <i>estimates<\/i> of how liberal or conservative a justice was in a particular term. Since they are <i>estimates<\/i> they aren&#8217;t exact and while it&#8217;s fine to plot the mean value (as suggested by the M-Q folks), if we&#8217;re going to accept the intelligence of the reader to figure out the nouveau time series layout, perhaps we can also show them some of the <i>uncertainty<\/i> behind these estimates.<\/p>\n<p>What I&#8217;ve done below is take the data provided by the M-Q folks and make what I&#8217;ll call a vertical time series river plot using the mean, median and one standard deviation. This shows the possible range of real values the estimates can take and provides a less-precise but more forthright view of the values (in my opinion). You can see right away that they estimates are not so precise, but there is still an overall trend for the justices to become more liberal in modern times.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4476\" data-permalink=\"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/cursor_and_rstudio\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio.png?fit=1548%2C1524&amp;ssl=1\" data-orig-size=\"1548,1524\" 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=\"Cursor_and_RStudio\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio.png?fit=510%2C502&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?w=510&#038;ssl=1\" alt=\"Cursor_and_RStudio\"  class=\"aligncenter size-full wp-image-4476\" \/><\/a><\/p>\n<p>The ggplot2 code is a bit intricate, which is one reason I&#8217;m posting it. You need to reorient your labeling mind due to the need to use `coord_flip()`. I also added an arrow on the Y-axis to show how time flows. I think the vis community will need to help standardize on some good practices for how to deal with these vertical time series charts to help orient readers more quickly. In a more dynamic visualization, either using something like D3 or even just stop-motion animation, the flow could actually draw in the direction time flows, which would definitely make it easier immediately orient the reader.<\/p>\n<p>However, the main point here is to not be afraid to show uncertainty. In fact, the more we all work at it, the better we&#8217;ll all be able to come up with effective ways to show it.<\/p>\n<p><sup>*<\/sup> == &#8220;The Awesome Visualization Expert&#8221; since he winced at my use of &#8220;Dr. Cairo&#8221; :-)<\/p>\n<pre id=\"prism-r-code\"><code class=\"language-r\">library(dplyr)\r\nlibrary(readr)\r\nlibrary(ggplot2)  # devtools::install_github(&quot;hadley\/ggplot2&quot;)\r\nlibrary(hrbrmisc) # devtools::install_github(&quot;hrbrmstr\/hrbrmisc&quot;)\r\nlibrary(grid)\r\nlibrary(scales)\r\n\r\nURL &lt;- &quot;http:\/\/mqscores.berkeley.edu\/media\/2014\/justices.csv&quot;\r\nfil &lt;- basename(URL)\r\nif (!file.exists(fil)) download.file(URL, fil)\r\n\r\njustices &lt;- read_csv(fil)\r\n\r\njustices %&gt;%\r\n  filter(term&gt;=1980,\r\n         justiceName %in% c(&quot;Thomas&quot;, &quot;Scalia&quot;, &quot;Alito&quot;, &quot;Roberts&quot;, &quot;Kennedy&quot;,\r\n                            &quot;Breyer&quot;, &quot;Kagan&quot;, &quot;Ginsburg&quot;, &quot;Sotomayor&quot;)) %&gt;%\r\n  mutate(col=ifelse(justiceName %in% c(&quot;Breyer&quot;, &quot;Kagan&quot;, &quot;Ginsburg&quot;, &quot;Sotomayor&quot;),\r\n                    &quot;Democrat&quot;, &quot;Republican&quot;)) -&gt; recent\r\n\r\njust_labs &lt;- data_frame(\r\n  label=c(&quot;Thomas&quot;, &quot;Scalia&quot;, &quot;Alito&quot;, &quot;Roberts&quot;, &quot;Kennedy&quot;, &quot;Breyer&quot;, &quot;Kagan&quot;, &quot;Ginsburg&quot;, &quot;Sotomayor&quot;),\r\n      x=c(  1990.5,   1985.5,  2004.5,    2004.5,    1986.5,      1994,   2010,     1992.5,      2008.5),\r\n      y=c(     2.9,      1.4,    1.35,       1.7,       1.0,      -0.1,   -0.9,       -0.1,          -2)\r\n)\r\n\r\ngg &lt;- ggplot(recent)\r\ngg &lt;- gg + geom_hline(yintercept=0, alpha=0.5)\r\ngg &lt;- gg + geom_label(data=data.frame(x=c(0.1, -0.1),\r\n                                      label=c(&quot;More \u2192\\nconservative&quot;, &quot;\u2190 More\\nliberal&quot;),\r\n                                      hjust=c(0, 1)), aes(y=x, x=1982, hjust=hjust, label=label),\r\n                      family=&quot;Arial Narrow&quot;, fontface=&quot;bold&quot;, size=4, label.size=0, vjust=1)\r\ngg &lt;- gg + geom_ribbon(aes(ymin=post_mn-post_sd, ymax=post_mn+post_sd, x=term,\r\n                             group=justice, fill=col, color=col), size=0.1, alpha=0.3)\r\ngg &lt;- gg + geom_line(aes(x=term, y=post_med, color=col, group=justice), size=0.1)\r\ngg &lt;- gg + geom_text(data=just_labs, aes(x=x, y=y, label=label),\r\n                     family=&quot;Arial Narrow&quot;, size=2.5)\r\ngg &lt;- gg + scale_x_reverse(expand=c(0,0), limits=c(2014, 1982),\r\n                           breaks=c(2014, seq(2010, 1990, -10), 1985, 1982),\r\n                           labels=c(2014, seq(2010, 1990, -10), &quot;1985\\nTERM\\n\u2193&quot;, &quot;&quot;))\r\ngg &lt;- gg + scale_y_continuous(expand=c(0,0), labels=c(-2, &quot;0\\nM-Q Score&quot;, 2, 4))\r\ngg &lt;- gg + scale_color_manual(name=NULL, values=c(Democrat=&quot;#2166ac&quot;, Republican=&quot;#b2182b&quot;), guide=FALSE)\r\ngg &lt;- gg + scale_fill_manual(name=&quot;Nominated by a&quot;, values=c(Democrat=&quot;#2166ac&quot;, Republican=&quot;#b2182b&quot;))\r\ngg &lt;- gg + coord_flip()\r\ngg &lt;- gg + labs(x=NULL, y=NULL,\r\n                title=&quot;Martin-Quinn scores for selected justices, 1985-2014&quot;,\r\n                subtitle=&quot;Ribbon band derived from mean plus one standard deviation. Inner line is the M-Q median.&quot;,\r\n                caption=&quot;Data source: http:\/\/mqscores.berkeley.edu\/measures.php&quot;)\r\ngg &lt;- gg + theme_hrbrmstr_an(grid=&quot;XY&quot;)\r\ngg &lt;- gg + theme(plot.subtitle=element_text(margin=margin(b=15)))\r\ngg &lt;- gg + theme(legend.title=element_text(face=&quot;bold&quot;))\r\ngg &lt;- gg + theme(legend.position=c(0.05, 0.6))\r\ngg &lt;- gg + theme(plot.margin=margin(20,20,20,20))\r\ngg<\/code><\/pre>\n<p>Yes, I manually positioned the names of the justices, hence the weird spacing for those lines. Also, after publishing this post, I tweaked the line-height of the &#8220;More Liberal&#8221;\/&#8221;More Conservative&#8221; top labels a bit and would definitely suggest doing that to anyone attempting to reproduce this code (the setting I used was `0.9`).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once again, @albertocairo notices an interesting chart and spurs pondering in the visualization community with [his post](http:\/\/www.thefunctionalart.com\/2016\/06\/defying-conventions-in-visualization.html) covering an unusual &#8220;vertical time series&#8221; chart produced for the print version of the NYTimes: I&#8217;m actually less concerned about the vertical time series chart component here since I agree with TAVE* Cairo that folks are smart enough [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4486,"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":[24,678,673,674,753,91],"tags":[810],"class_list":["post-4474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-charts-graphs","category-data-visualization","category-datavis-2","category-dataviz","category-ggplot","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making &quot;Time Rivers&quot; 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\/2016\/06\/28\/making-time-rivers-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making &quot;Time Rivers&quot; in R - rud.is\" \/>\n<meta property=\"og:description\" content=\"Once again, @albertocairo notices an interesting chart and spurs pondering in the visualization community with [his post](http:\/\/www.thefunctionalart.com\/2016\/06\/defying-conventions-in-visualization.html) covering an unusual &#8220;vertical time series&#8221; chart produced for the print version of the NYTimes: I&#8217;m actually less concerned about the vertical time series chart component here since I agree with TAVE* Cairo that folks are smart enough [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-28T22:18:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:42:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1554\" \/>\n\t<meta property=\"og:image:height\" content=\"1530\" \/>\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\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Making &#8220;Time Rivers&#8221; in R\",\"datePublished\":\"2016-06-28T22:18:08+00:00\",\"dateModified\":\"2018-03-07T21:42:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/\"},\"wordCount\":481,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1\",\"keywords\":[\"post\"],\"articleSection\":[\"Charts &amp; Graphs\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"ggplot\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/\",\"name\":\"Making \\\"Time Rivers\\\" in R - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1\",\"datePublished\":\"2016-06-28T22:18:08+00:00\",\"dateModified\":\"2018-03-07T21:42:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1\",\"width\":1554,\"height\":1530},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/28\\\/making-time-rivers-in-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making &#8220;Time Rivers&#8221; 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":"Making \"Time Rivers\" 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\/2016\/06\/28\/making-time-rivers-in-r\/","og_locale":"en_US","og_type":"article","og_title":"Making \"Time Rivers\" in R - rud.is","og_description":"Once again, @albertocairo notices an interesting chart and spurs pondering in the visualization community with [his post](http:\/\/www.thefunctionalart.com\/2016\/06\/defying-conventions-in-visualization.html) covering an unusual &#8220;vertical time series&#8221; chart produced for the print version of the NYTimes: I&#8217;m actually less concerned about the vertical time series chart component here since I agree with TAVE* Cairo that folks are smart enough [&hellip;]","og_url":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/","og_site_name":"rud.is","article_published_time":"2016-06-28T22:18:08+00:00","article_modified_time":"2018-03-07T21:42:22+00:00","og_image":[{"width":1554,"height":1530,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&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\/2016\/06\/28\/making-time-rivers-in-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Making &#8220;Time Rivers&#8221; in R","datePublished":"2016-06-28T22:18:08+00:00","dateModified":"2018-03-07T21:42:22+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/"},"wordCount":481,"commentCount":5,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1","keywords":["post"],"articleSection":["Charts &amp; Graphs","Data Visualization","DataVis","DataViz","ggplot","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/","url":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/","name":"Making \"Time Rivers\" in R - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1","datePublished":"2016-06-28T22:18:08+00:00","dateModified":"2018-03-07T21:42:22+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1","width":1554,"height":1530},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2016\/06\/28\/making-time-rivers-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Making &#8220;Time Rivers&#8221; 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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/Cursor_and_RStudio-1.png?fit=1554%2C1530&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-1aa","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4154,"url":"https:\/\/rud.is\/b\/2016\/03\/18\/stacking-the-deck-against-treemaps\/","url_meta":{"origin":4474,"position":0},"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":[]},{"id":3236,"url":"https:\/\/rud.is\/b\/2015\/01\/18\/nasa-gisss-annual-global-temperature-anomaly-trends-dplyrggplot-version\/","url_meta":{"origin":4474,"position":1},"title":"NASA GISS\u2019s Annual Global Temperature Anomaly Trends (dplyr\/ggplot version)","author":"hrbrmstr","date":"2015-01-18","format":false,"excerpt":"D Kelly O\u2019Day did a [great post](https:\/\/chartsgraphs.wordpress.com\/2015\/01\/16\/nasa-gisss-annual-global-temperature-anomaly-trends\/) on charting NASA\u2019s Goddard Institute for Space Studies (GISS) temperature anomaly data, but it sticks with base R for data munging & plotting. While there's absolutely nothing wrong with base R operations, I thought a modern take on the chart using `dplyr`, `magrittr`\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":2770,"url":"https:\/\/rud.is\/b\/2013\/10\/27\/alternative-to-grouped-bar-charts-in-r\/","url_meta":{"origin":4474,"position":2},"title":"Alternative to Grouped Bar Charts in R","author":"hrbrmstr","date":"2013-10-27","format":false,"excerpt":"The #spiffy @dseverski gave me this posit the other day: Hey, @hrbrmstr, doughnut chart aside, how would you approach the first graph at http:\/\/t.co\/zjHoHRVOeo? Bump chart? Trend line? Leave as is?\u2014 David F. Severski (@dseverski) October 25, 2013 and, I obliged shortly thereafter, but figured I'd toss a post up\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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/10\/remake.png?fit=656%2C320&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/10\/remake.png?fit=656%2C320&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/10\/remake.png?fit=656%2C320&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":4345,"url":"https:\/\/rud.is\/b\/2016\/04\/17\/ggplot2-exercising-with-ggalt-dumbbells\/","url_meta":{"origin":4474,"position":3},"title":"(ggplot2) Exercising with (ggalt) dumbbells","author":"hrbrmstr","date":"2016-04-17","format":false,"excerpt":"I follow the most excellent Pew Research folks on Twitter to stay in tune with what's happening (statistically speaking) with the world. Today, they tweeted this excerpt from their 2015 Global Attitudes survey: The age gap in social media use around the world https:\/\/t.co\/0Dq1PcbExG pic.twitter.com\/9HBM7gLxwR\u2014 PewResearch Internet (@pewinternet) April 17,\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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/04\/RStudio.png?fit=811%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/04\/RStudio.png?fit=811%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/04\/RStudio.png?fit=811%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/04\/RStudio.png?fit=811%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4886,"url":"https:\/\/rud.is\/b\/2017\/01\/16\/the-devils-in-the-davos-details-a-quick-look-at-this-years-wef-global-risks-report\/","url_meta":{"origin":4474,"position":4},"title":"The Devil&#8217;s in the [Davos] Details \u2014 A quick look at this year&#8217;s WEF Global Risks Report","author":"hrbrmstr","date":"2017-01-16","format":false,"excerpt":"It's Davos time again. Each year the World Economic Forum (WEF) gathers the global elite together to discuss how they're going to shape our collective future. WEF also releases their annual Global Risks Report at the same time. I read it every year and have, in the past, borrowed some\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\/2017\/01\/Cursor_and___Development_devils_in_the_davos_-_RStudio-4.png?fit=1200%2C536&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_devils_in_the_davos_-_RStudio-4.png?fit=1200%2C536&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_devils_in_the_davos_-_RStudio-4.png?fit=1200%2C536&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_devils_in_the_davos_-_RStudio-4.png?fit=1200%2C536&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_devils_in_the_davos_-_RStudio-4.png?fit=1200%2C536&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2728,"url":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/","url_meta":{"origin":4474,"position":5},"title":"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts","author":"hrbrmstr","date":"2013-09-28","format":false,"excerpt":"UPDATE: Added some extra visualization elements since this post went live. New select menu and hover text for individual job impact detail lines in the table. I was reviewing RSS feeds when I came across this story about \"ObamaCare Employer Mandate: A List Of Cuts To Work Hours, Jobs\" over\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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4474","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=4474"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4474\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/4486"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=4474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=4474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=4474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}