

{"id":2728,"date":"2013-09-28T20:44:50","date_gmt":"2013-09-29T01:44:50","guid":{"rendered":"http:\/\/rud.is\/b\/?p=2728"},"modified":"2018-03-10T07:53:38","modified_gmt":"2018-03-10T12:53:38","slug":"obamacare-jobs-r-d3","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/","title":{"rendered":"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts"},"content":{"rendered":"<div style=\"background-color:#F0F0F0; padding:6px;\"><b>UPDATE:<\/b> 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.<\/div>\n<p>\nI was reviewing RSS feeds when I came across <a target=\"_blank\" href=\"https:\/\/www.investors.com\/obamacare-employer-mandate-a-list-of-cuts-to-work-hours-jobs\/\">this story<\/a> about &#8220;<b>ObamaCare Employer Mandate: A List Of Cuts To Work Hours, Jobs<\/b>&#8221; over on Investors.com. Efficacy of the law notwithstanding, I thought it might be interesting to visualize the data since the folks over at Investors.com provided a handy spreadsheet that they seem to maintain pretty well (link is in the article).<\/p>\n<p>The spreadsheet is organized by date and lists each state where the jobs were impacted along with the <em>employer<\/em>, <em>employer type <\/em>(public\/private), <em>reason<\/em> and <em>number of jobs impacted<\/em> (if available). They also have links to news stories related to each entry.<\/p>\n<p>My first thought was to compare impact across states by date, so I threw together a quick R script to build a faceted bar chart:<\/p>\n<pre lang=\"rsplus\">library(ggplot2)\nlibrary(plyr)\n\n# Source for job impact data:\n# http:\/\/news.investors.com\/politics-obamacare\/092513-669013-obamacare-employer-mandate-a-list-of-cuts-to-work-hours-jobs.htm\n\nemp.f <- read.csv(\"~\/employers.csv\", stringsAsFactors=FALSE)\ncolnames(emp.f) <- c(\"State\",\"Employer\",\"Type\",\"Action\",\"Jobs.Cut\",\"Action.Date\")\nemp.f[is.na(emp.f$Jobs.Cut),]$Jobs.Cut = median(emp.f$Jobs.Cut, na.rm=TRUE)\nemp.f[emp.f$State==\"Virgina\", ]$State = \"Virginia\"\nemp.f[emp.f$State==\"Washington DC\", ]$State = \"District of Columbia\"<\/pre>\n<p><em>Yes, they really spelled \"Virginia\" wrong<\/em>, at least in the article text where I initially scraped the data from before I saw there was a spreadsheet available. Along with fixing \"Virginia\", I also changed the name of \"Washington DC\" to \"District of Columbia\" for reasons you'll see later on in this post. I'm finding it very helpful to do as much of the data cleanup in-code (R or Python) whenever possible since it makes the process far more repeatable than performing the same tasks by hand in a text editor and is essential if you know the data is going to change\/expand.<\/p>\n<p>After reading in the data, it was trivial to get a <code>ggplot<\/code> of the job impacts by state (click image for larger version):<\/p>\n<pre lang=\"rsplus\">p <- ggplot(emp.f, aes(x=Action.Date, y=Jobs.Cut))\np <- p + geom_bar(aes(fill=State), stat=\"identity\")\np <- p + facet_wrap(~State)\np <- p + theme_bw()\np <- p + theme(legend.position=0, axis.text.x = element_text(angle = 90))\np <- p + labs(x=\"Action Date\", y=\"# Jobs Cut\")\np<\/pre>\n<p><center><a target=\"_blank\" href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2729\" data-permalink=\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/oc-facet\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?fit=900%2C730&amp;ssl=1\" data-orig-size=\"900,730\" 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=\"oc-facet\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?fit=300%2C243&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?fit=510%2C413&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?resize=510%2C413&#038;ssl=1\" alt=\"oc-facet\" width=\"510\" height=\"413\" class=\"aligncenter size-large wp-image-2729\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?resize=530%2C429&amp;ssl=1 530w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?resize=150%2C121&amp;ssl=1 150w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?resize=300%2C243&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?resize=535%2C433&amp;ssl=1 535w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-facet.png?w=900&amp;ssl=1 900w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/center><\/p>\n<p>That visualization provided <em>some<\/em> details, but I decided to expand the scope a bit and wanted to make an interactive \"bubble chart\" (since folks seem to love bubbles) with circle size relative to the total job cuts per state and circle color reflecting the conservative\/liberal leaning of each state (i.e. 'red' vs 'blue') to see if there was any visual correlation by that attribute. I found the political data over at <a target=\"_blank\" href=\"http:\/\/news.gallup.com\/poll\/125066\/State-States.aspx\">Gallup<\/a> and went to work prepping the data with some additional R code. (NOTE: The Gallup data was the reason for the \"DC\" name change since Gallup uses \"District of Columbia\" in their data set.)<\/p>\n<pre lang=\"rsplus\">\n# aggregate state data\nemp.state.sum.df <- count(emp.f,c(\"State\"),c(\"Jobs.Cut\"))\ncolnames(emp.state.sum.df) <- c(\"State\",\"Total.Jobs.Cut\")\n\n# get total (estimated) jobs impacted\ntotal.jobs <- sum(emp.state.sum.df$Total.Jobs.Cut)\n\n# Source for the red v blue state data:\n# http:\/\/www.gallup.com\/poll\/125066\/State-States.aspx\n# read political leanings\nred.blue.df <- read.csv(\"~\/red-blue.csv\", stringsAsFactors=FALSE)\n\n# join the jobs and leaning data together\ns <- join(emp.state.sum.df, red.blue.df, by=\"State\")\n\n# cheat and get leaning range for manual input into the datavis\nleaning.range <- range(s$Conservative.Advantage)\n\n# build the JSON data file. store state summary data for the bubbles, but also include\n# the detail level for extra data for the viz\n# need to clean up this file post-write and definitely run it through http:\/\/jsonlint.com\/\njsfile = file(\"states.tmp\",\"w\")\nby(s, 1:nrow(s), function(row) {\n  writeLines(sprintf('      {\"name\": \"%s\", \"size\":%d, \"leaning\":%2.1f, \"detail\":[',row$State,row$Total.Jobs.Cut,row$Conservative.Advantage),jsfile)\n  employers = emp.f[emp.f$State == row$State,]\n  by(employers, 1:nrow(employers), function(emp.row) {\n    writeLines(sprintf('          { \"employer\":\"%s\", \"emptype\":\"%s\", \"actiondetail\":\"%s\", \"jobsimpacted\":%d, \"when\":\"%s\"},',\n                       emp.row$Employer, emp.row$Type, gsub('\"',\"'\",emp.row$Action), emp.row$Jobs.Cut, emp.row$Action.Date),jsfile)\n    \n  })\n  writeLines(\"]},\\n\",jsfile)   \n})\nclose(jsfile)<\/pre>\n<p>I know the comments point out the need to tweak the resulting JSON a bit (mostly to remove \"errant\" commas, which is one of the annoying bits about JSON), but I wanted to re-emphasize the huge utility of <a href=\"https:\/\/jsonlint.com\/\" target=\"_blank\">JSONlint<\/a> as it can save you a great deal of time debugging large amounts of gnarly JSON data.<\/p>\n<p>With the data prepped, I threw together a <a target=\"_blank\" href=\"https:\/\/rud.is\/ocd3\/\">D3 visualization<\/a> that shows the bubbles on the left and details by date and employer on the right.<\/p>\n<p><center><a target=\"_blank\" href=\"https:\/\/rud.is\/ocd3\/\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2749\" data-permalink=\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/oc-snap-png\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&amp;ssl=1\" data-orig-size=\"945,660\" 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=\"oc-snap.png\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=300%2C209&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=510%2C356&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?resize=510%2C356&#038;ssl=1\" alt=\"oc-snap.png\" width=\"510\" height=\"356\" class=\"aligncenter size-large wp-image-2749\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?resize=530%2C370&amp;ssl=1 530w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?resize=150%2C104&amp;ssl=1 150w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?resize=300%2C209&amp;ssl=1 300w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?resize=535%2C373&amp;ssl=1 535w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?w=945&amp;ssl=1 945w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/center><\/p>\n<p>Since it's D3, there's no need to put the source code in the blog post. Just do a \"<code>view-source<\/code>\" on the resulting visualization or poke around the <a href=\"https:\/\/github.com\/hrbrmstr\/ocd3\/\">github repository<\/a>. I will, however, point out a couple useful\/interesting bits from the code.<\/p>\n<p>First, coloring circles by political leaning took exactly <strong>one line<\/strong> of code since D3 provides a means to map a range of values to colors:<\/p>\n<pre lang=\"javascript\">var ramp = d3.scale.linear().domain([-21,36]).range([\"#253494\",\"#B30000\"]);<\/pre>\n<p>I chose the colors with <a href=\"http:\/\/colorbrewer2.org\/\">Color Brewer<\/a> but cheated (as I indicated in the R code) by pre-computing the range of the values for the palette. You can see the tiny District of Columbia's very blue circle in the lower-left of the field of circles. Hopefully Investors.com will maintain the data set and we can look at changes over a larger period of time.<\/p>\n<p>Second, you get rudimentary \"popups\" for free via element \"<code>title<\/code>\" tags on the SVG circles, so no need for custom tooltip code:<\/p>\n<pre lang=\"javascript\">node.append(\"title\")\n   .text(function(d) { return d.stateName + \": \" + format(d.value) + \" jobs impacted\"; });<\/pre>\n<p>I could have tweaked the display a bit more, added links to the stories and provided a means to sort the \"# Jobs\" column by count or date, but I took enough time away from the <a href=\"https:\/\/www.amazon.com\/Security-Using-Analysis-Visualization-Dashboards\/dp\/1118793722\/ref=sr_1_1?ie=UTF8&amp;qid=1374598875&amp;sr=8-1&amp;keywords=best+security+book+evar\">book<\/a> to scratch this visualization itch and it came out pretty much the way I wanted it to.<\/p>\n<p>If you do hack at it and build something better (which should not be terribly difficult), drop a note in the comments or over at github.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;ObamaCare Employer Mandate: A List Of Cuts To Work Hours, Jobs&#8221; over on Investors.com. Efficacy of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2749,"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,666,677,678,673,674,36,91],"tags":[],"class_list":["post-2728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-charts-graphs","category-d3","category-data-analysis-2","category-data-visualization","category-datavis-2","category-dataviz","category-html5","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Visualizing &quot;ObamaCare-related&quot; Job Cuts - 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\/09\/28\/obamacare-jobs-r-d3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visualizing &quot;ObamaCare-related&quot; Job Cuts - rud.is\" \/>\n<meta property=\"og:description\" content=\"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 &#8220;ObamaCare Employer Mandate: A List Of Cuts To Work Hours, Jobs&#8221; over on Investors.com. Efficacy of the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2013-09-29T01:44:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-10T12:53:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"945\" \/>\n\t<meta property=\"og:image:height\" content=\"660\" \/>\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\/2013\/09\/28\/obamacare-jobs-r-d3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts\",\"datePublished\":\"2013-09-29T01:44:50+00:00\",\"dateModified\":\"2018-03-10T12:53:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\"},\"wordCount\":713,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1\",\"articleSection\":[\"Charts &amp; Graphs\",\"d3\",\"Data Analysis\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"HTML5\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\",\"url\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\",\"name\":\"Visualizing \\\"ObamaCare-related\\\" Job Cuts - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1\",\"datePublished\":\"2013-09-29T01:44:50+00:00\",\"dateModified\":\"2018-03-10T12:53:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1\",\"width\":945,\"height\":660},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts\"}]},{\"@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":"Visualizing \"ObamaCare-related\" Job Cuts - 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\/09\/28\/obamacare-jobs-r-d3\/","og_locale":"en_US","og_type":"article","og_title":"Visualizing \"ObamaCare-related\" Job Cuts - rud.is","og_description":"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 &#8220;ObamaCare Employer Mandate: A List Of Cuts To Work Hours, Jobs&#8221; over on Investors.com. Efficacy of the [&hellip;]","og_url":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/","og_site_name":"rud.is","article_published_time":"2013-09-29T01:44:50+00:00","article_modified_time":"2018-03-10T12:53:38+00:00","og_image":[{"width":945,"height":660,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&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\/2013\/09\/28\/obamacare-jobs-r-d3\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts","datePublished":"2013-09-29T01:44:50+00:00","dateModified":"2018-03-10T12:53:38+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/"},"wordCount":713,"commentCount":1,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1","articleSection":["Charts &amp; Graphs","d3","Data Analysis","Data Visualization","DataVis","DataViz","HTML5","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/","url":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/","name":"Visualizing \"ObamaCare-related\" Job Cuts - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1","datePublished":"2013-09-29T01:44:50+00:00","dateModified":"2018-03-10T12:53:38+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1","width":945,"height":660},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2013\/09\/28\/obamacare-jobs-r-d3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Visualizing &#8220;ObamaCare-related&#8221; Job Cuts"}]},{"@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\/2013\/09\/oc-snap.png.png?fit=945%2C660&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-I0","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3364,"url":"https:\/\/rud.is\/b\/2015\/03\/30\/3364\/","url_meta":{"origin":2728,"position":0},"title":"A look at airline crashes in R with googlesheets, dplyr &#038; ggplot2","author":"hrbrmstr","date":"2015-03-30","format":false,"excerpt":"Over on The DO Loop, @RickWicklin does a nice job [visualizing the causes of airline crashes](http:\/\/blogs.sas.com\/content\/iml\/2015\/03\/30\/visualizing-airline-crashes\/) in SAS using a mosaic plot. More often than not, I find mosaic plots can be a bit difficult to grok, but Rick's use was spot on and I believe it shows the data\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":1033,"url":"https:\/\/rud.is\/b\/2012\/05\/10\/off-by-one-the-importance-of-fact-checking-breach-reports\/","url_meta":{"origin":2728,"position":1},"title":"Off By One : The Importance Of Fact Checking Breach Reports","author":"hrbrmstr","date":"2012-05-10","format":false,"excerpt":"I didn't read through the Massachusetts 2011 Report on Data Breach Notifications\u00a0[PDF] until recently, but once I went through the report my brain kept telling me \"something is wrong\". Not something earth shattering, but more of a \"something is off\" signal. This happens more than I'd like as I tend\u2026","rel":"","context":"In &quot;Breach&quot;","block_context":{"text":"Breach","link":"https:\/\/rud.is\/b\/category\/breach\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2912,"url":"https:\/\/rud.is\/b\/2014\/02\/12\/one-more-yet-another-olympic-medal-live-tracking-shiny-app\/","url_meta":{"origin":2728,"position":2},"title":"One More (Yet-another?) Olympic Medal Live-tracking Shiny App","author":"hrbrmstr","date":"2014-02-12","format":false,"excerpt":"I'm posting this mostly to show how to: - use the Google spreadsheet data-munging \"hack\" from the [previous post](http:\/\/rud.is\/b\/2014\/02\/11\/live-google-spreadsheet-for-keeping-track-of-sochi-medals\/) in a Shiny context - include it seamlessly into a web page, and - run it locally without a great deal of wrangling The code for the app is [in this\u2026","rel":"","context":"In &quot;data driven security&quot;","block_context":{"text":"data driven security","link":"https:\/\/rud.is\/b\/category\/data-driven-security\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2938,"url":"https:\/\/rud.is\/b\/2014\/03\/15\/guardian-words-visualized\/","url_meta":{"origin":2728,"position":3},"title":"Guardian Words: Visualized","author":"hrbrmstr","date":"2014-03-15","format":false,"excerpt":"Andy Kirk (@visualisingdata) & Lynn Cherny (@arnicas) tweeted about the Guardian Word Count service\/archive site, lamenting the lack of visualizations: Want to know num of words written in each day's Guardian paper by section + approx reading time? http:\/\/t.co\/wP4W1EzUsx via @bengoldacre\u2014 Andy Kirk (@visualisingdata) March 15, 2014 This gave me\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":"","width":0,"height":0},"classes":[]},{"id":3756,"url":"https:\/\/rud.is\/b\/2015\/10\/24\/less-drama-more-encoding\/","url_meta":{"origin":2728,"position":4},"title":"Less Drama, More Encoding","author":"hrbrmstr","date":"2015-10-24","format":false,"excerpt":"Junk Charts [adeptly noted and fixed](http:\/\/junkcharts.typepad.com\/junk_charts\/2015\/10\/is-it-worth-the-drama.html) this excessively stylized chart from the WSJ this week: Their take on it does reduce the ZOMGOSH WE ARE DOOMED! look and feel of the WSJ chart: But, we can further reduce the drama by using a more neutral color encoding _and_ encode both\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\/2015\/10\/RStudio.png?fit=1200%2C724&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/RStudio.png?fit=1200%2C724&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/RStudio.png?fit=1200%2C724&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/RStudio.png?fit=1200%2C724&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/RStudio.png?fit=1200%2C724&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2793,"url":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","url_meta":{"origin":2728,"position":5},"title":"Mapping Power Outages In Maine With R","author":"hrbrmstr","date":"2013-11-27","format":false,"excerpt":"UPDATE: A Shiny (dynamic) version of this is now available. We had yet-another power outage this morning due to the weird weather patterns of the week and it was the final catalyst I needed to crank out some R code to map the affected counties. Central Maine Power provides an\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\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/2728","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=2728"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/2728\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/2749"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=2728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=2728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=2728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}