

{"id":4805,"date":"2017-01-02T16:25:54","date_gmt":"2017-01-02T21:25:54","guid":{"rendered":"https:\/\/rud.is\/b\/?p=4805"},"modified":"2018-03-07T17:29:32","modified_gmt":"2018-03-07T22:29:32","slug":"removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/","title":{"rendered":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data)"},"content":{"rendered":"<p>The family got hit pretty hard with the flu right as the Christmas festivities started and we were all pretty much bed-ridden zombies up until today (2017-01-02). When in the throes of a very bad ILI it&#8217;s easy to imagine that you&#8217;re a victim of a severe outbreak, especially with ancillary data from others that they, too, either just had\/have the flu or know others who do. Thankfully, I didn&#8217;t have to accept this emotional opine and could turn to the <code>cdcfluview<\/code> package to see just how this year is measuring up.<\/p>\n<p>Influenza cases are cyclical, and that&#8217;s super-easy to see with a longer-view of the CDC national data:<\/p>\n<pre id=\"flu-17-01\"><code class=\"language-r\">library(cdcfluview)\r\nlibrary(tidyverse)\r\nlibrary(stringi)\r\n\r\nflu &lt;- get_flu_data(&quot;national&quot;, years=2010:2016)\r\n\r\nmutate(flu, week=as.Date(sprintf(&quot;%s %s 1&quot;, YEAR, WEEK), format=&quot;%Y %U %u&quot;)) %&gt;% \r\n  select(-`AGE 25-64`) %&gt;% \r\n  gather(age_group, count, starts_with(&quot;AGE&quot;)) %&gt;% \r\n  mutate(age_group=stri_replace_all_fixed(age_group, &quot;AGE&quot;, &quot;Ages&quot;)) %&gt;% \r\n  mutate(age_group=factor(age_group, levels=c(&quot;Ages 0-4&quot;, &quot;Ages 5-24&quot;, &quot;Ages 25-49&quot;, &quot;Ages 50-64&quot;, &quot;Ages 65&quot;))) %&gt;%\r\n  ggplot(aes(week, count, group=age_group)) +\r\n  geom_line(aes(color=age_group)) +\r\n  scale_y_continuous(label=scales::comma, limits=c(0,20000)) +\r\n  facet_wrap(~age_group, scales=&quot;free&quot;) +\r\n  labs(x=NULL, y=&quot;Count of reported ILI cases&quot;, \r\n       title=&quot;U.S. National ILI Case Counts by Age Group (2010:2011 flu season through 2016:2017)&quot;,\r\n       caption=&quot;Source: CDC ILInet via CRAN cdcfluview pacakge&quot;) +\r\n  ggthemes::scale_color_tableau(name=NULL) +\r\n  hrbrmisc::theme_hrbrmstr(grid=&quot;XY&quot;) +\r\n  theme(legend.position=&quot;none&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4807\" data-permalink=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/cursor_and___development_cdcfluview_-_master_-_rstudio\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio.png?fit=2538%2C1292&amp;ssl=1\" data-orig-size=\"2538,1292\" 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___Development_cdcfluview_-_master_-_RStudio\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio.png?fit=300%2C153&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio.png?fit=510%2C260&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio.png?resize=510%2C260&#038;ssl=1\" alt=\"\" width=\"510\" height=\"260\" class=\"aligncenter size-full wp-image-4807\" \/><\/a><\/p>\n<p>We can use the same data to zoom in on this season:<\/p>\n<pre id=\"flu-17-02\"><code class=\"language-r\">mutate(flu, week=as.Date(sprintf(&quot;%s %s 1&quot;, YEAR, WEEK), format=&quot;%Y %U %u&quot;)) %&gt;% \r\n  select(-`AGE 25-64`) %&gt;% \r\n  gather(age_group, count, starts_with(&quot;AGE&quot;)) %&gt;% \r\n  mutate(age_group=stri_replace_all_fixed(age_group, &quot;AGE&quot;, &quot;Ages&quot;)) %&gt;% \r\n  mutate(age_group=factor(age_group, levels=c(&quot;Ages 0-4&quot;, &quot;Ages 5-24&quot;, &quot;Ages 25-49&quot;, &quot;Ages 50-64&quot;, &quot;Ages 65&quot;))) %&gt;%\r\n  filter(week &gt;= as.Date(&quot;2016-07-01&quot;)) %&gt;% \r\n  ggplot(aes(week, count, group=age_group)) +\r\n  geom_line(aes(color=age_group)) +\r\n  scale_y_continuous(label=scales::comma, limits=c(0,20000)) +\r\n  facet_wrap(~age_group, scales=&quot;free&quot;) +\r\n  labs(x=NULL, y=&quot;Count of reported ILI cases&quot;, \r\n       title=&quot;U.S. National ILI Case Counts by Age Group (2016:2017 flu season)&quot;,\r\n       caption=&quot;Source: CDC ILInet via CRAN cdcfluview pacakge&quot;) +\r\n  ggthemes::scale_color_tableau(name=NULL) +\r\n  hrbrmisc::theme_hrbrmstr(grid=&quot;XY&quot;) +\r\n  theme(legend.position=&quot;none&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4806\" data-permalink=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/cursor_and___development_cdcfluview_-_master_-_rstudio-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-2.png?fit=2506%2C1280&amp;ssl=1\" data-orig-size=\"2506,1280\" 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___Development_cdcfluview_-_master_-_RStudio 2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-2.png?fit=300%2C153&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-2.png?fit=510%2C260&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-2.png?resize=510%2C260&#038;ssl=1\" alt=\"\" width=\"510\" height=\"260\" class=\"aligncenter size-full wp-image-4806\" \/><\/a><\/p>\n<p>So, things are trending up, but how severe is this year compared to others? While looking at the number\/percentage of ILI cases is one way to understand severity, another is to look at the mortality rate. The <code>cdcfluview<\/code> package has a <code>get_mortality_surveillance_data()<\/code> function, but it&#8217;s region-based and I&#8217;m really only looking at national data in this post. A helpful individual pointed out a new CSV file at <a href=\"https:\/\/www.cdc.gov\/flu\/weekly\/index.htm#MS\">https:\/\/www.cdc.gov\/flu\/weekly\/index.htm#MS<\/a> which we can reproducibly programmatically target (so we don&#8217;t have to track filename changes by hand) with:<\/p>\n<pre id=\"flu-17-03\"><code class=\"language-r\">library(rvest)\r\n\r\npg &lt;- read_html(&quot;https:\/\/www.cdc.gov\/flu\/weekly\/index.htm#MS&quot;)\r\nhtml_nodes(pg, xpath=&quot;.\/\/a[contains(@href, &#039;csv&#039;) and contains(@href, &#039;NCHS&#039;)]&quot;) %&gt;% \r\n  html_attr(&quot;href&quot;) -&gt; mort_ref\r\nmort_url &lt;- sprintf(&quot;https:\/\/www.cdc.gov%s&quot;, mort_ref)\r\n\r\ndf &lt;- readr::read_csv(mort_url)<\/code><\/pre>\n<p>We can, then, take a look at the current &#8220;outbreak&#8221; status (when real-world mortality events exceed the model threshold):<\/p>\n<pre id=\"flu-17-04\"><code class=\"language-r\">mutate(df, week=as.Date(sprintf(&quot;%s %s 1&quot;, Year, Week), format=&quot;%Y %U %u&quot;)) %&gt;% \r\n  select(week, Expected, Threshold, `Percent of Deaths Due to Pneumonia and Influenza`) %&gt;% \r\n  gather(category, percent, -week) %&gt;% \r\n  mutate(percent=percent\/100) %&gt;% \r\n  ggplot() +\r\n  geom_line(aes(week, percent, group=category, color=category)) +\r\n  scale_x_date(date_labels=&quot;%Y-%U&quot;) +\r\n  scale_y_continuous(label=scales::percent) +\r\n  ggthemes::scale_color_tableau(name=NULL) +\r\n  labs(x=NULL, y=NULL, title=&quot;U.S. Pneumonia &amp; Influenza Mortality&quot;,\r\n       subtitle=&quot;Data through week ending December 10, 2016 as of December 28, 2016&quot;,\r\n       caption=&quot;Source: National Center for Health Statistics Mortality Surveillance System&quot;) +\r\n  hrbrmisc::theme_hrbrmstr(grid=&quot;XY&quot;) +\r\n  theme(legend.position=&quot;bottom&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4808\" data-permalink=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/cursor_and___development_cdcfluview_-_master_-_rstudio-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&amp;ssl=1\" data-orig-size=\"2522,1282\" 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___Development_cdcfluview_-_master_-_RStudio\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=300%2C152&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=510%2C259&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?resize=510%2C259&#038;ssl=1\" alt=\"\" width=\"510\" height=\"259\" class=\"aligncenter size-full wp-image-4808\" \/><\/a><\/p>\n<p>That view is for all mortality events from both influenza and pneumonia. We can look at the counts for just influenza as well:<\/p>\n<pre id=\"flu-17-05\"><code class=\"language-r\">mutate(df, week=as.Date(sprintf(&quot;%s %s 1&quot;, Year, Week), format=&quot;%Y %U %u&quot;)) %&gt;% \r\n  select(week, `Influenza Deaths`) %&gt;% \r\n  ggplot() +\r\n  geom_line(aes(week, `Influenza Deaths`), color=ggthemes::tableau_color_pal()(1)) +\r\n  scale_x_date(date_labels=&quot;%Y-%U&quot;) +\r\n  scale_y_continuous(label=scales::comma) +\r\n  ggthemes::scale_color_tableau(name=NULL) +\r\n  labs(x=NULL, y=NULL, title=&quot;U.S. Influenza Mortality (count of mortality events)&quot;,\r\n       subtitle=&quot;Data through week ending December 10, 2016 as of December 28, 2016&quot;,\r\n       caption=&quot;Source: National Center for Health Statistics Mortality Surveillance System&quot;) +\r\n  hrbrmisc::theme_hrbrmstr(grid=&quot;XY&quot;) +\r\n  theme(legend.position=&quot;bottom&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-3.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4816\" data-permalink=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/cursor_and___development_cdcfluview_-_master_-_rstudio-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-3.png?fit=2526%2C726&amp;ssl=1\" data-orig-size=\"2526,726\" 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___Development_cdcfluview_-_master_-_RStudio\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-3.png?fit=300%2C86&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-3.png?fit=510%2C147&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-3.png?resize=510%2C147&#038;ssl=1\" alt=\"\" width=\"510\" height=\"147\" class=\"aligncenter size-full wp-image-4816\" \/><\/a><\/p>\n<p>It&#8217;s encouraging that the overall combined mortality rate is trending downwards and that the mortality rate for influenza is very low. Go. Science.<\/p>\n<p>I&#8217;ll be adding a function to <code>cdcfluview<\/code> to retrieve this new data set a bit later in the year.<\/p>\n<p>Hopefully you&#8217;ll avoid the flu and enjoy a healthy and prosperous 2017.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The family got hit pretty hard with the flu right as the Christmas festivities started and we were all pretty much bed-ridden zombies up until today (2017-01-02). When in the throes of a very bad ILI it&#8217;s easy to imagine that you&#8217;re a victim of a severe outbreak, especially with ancillary data from others that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4808,"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":[753,91],"tags":[810],"class_list":["post-4805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ggplot","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is\" \/>\n<meta property=\"og:description\" content=\"The family got hit pretty hard with the flu right as the Christmas festivities started and we were all pretty much bed-ridden zombies up until today (2017-01-02). When in the throes of a very bad ILI it&#8217;s easy to imagine that you&#8217;re a victim of a severe outbreak, especially with ancillary data from others that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-02T21:25:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T22:29:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"2522\" \/>\n\t<meta property=\"og:image:height\" content=\"1282\" \/>\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\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data)\",\"datePublished\":\"2017-01-02T21:25:54+00:00\",\"dateModified\":\"2018-03-07T22:29:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\"},\"wordCount\":361,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1\",\"keywords\":[\"post\"],\"articleSection\":[\"ggplot\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\",\"url\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\",\"name\":\"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1\",\"datePublished\":\"2017-01-02T21:25:54+00:00\",\"dateModified\":\"2018-03-07T22:29:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1\",\"width\":2522,\"height\":1282},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data)\"}]},{\"@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":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/","og_locale":"en_US","og_type":"article","og_title":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is","og_description":"The family got hit pretty hard with the flu right as the Christmas festivities started and we were all pretty much bed-ridden zombies up until today (2017-01-02). When in the throes of a very bad ILI it&#8217;s easy to imagine that you&#8217;re a victim of a severe outbreak, especially with ancillary data from others that [&hellip;]","og_url":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/","og_site_name":"rud.is","article_published_time":"2017-01-02T21:25:54+00:00","article_modified_time":"2018-03-07T22:29:32+00:00","og_image":[{"width":2522,"height":1282,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&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\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data)","datePublished":"2017-01-02T21:25:54+00:00","dateModified":"2018-03-07T22:29:32+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/"},"wordCount":361,"commentCount":5,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1","keywords":["post"],"articleSection":["ggplot","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/","url":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/","name":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data) - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1","datePublished":"2017-01-02T21:25:54+00:00","dateModified":"2018-03-07T22:29:32+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1","width":2522,"height":1282},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2017\/01\/02\/removing-personal-bias-from-flu-severity-estimation-a-k-a-misery-loves-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Removing Personal Bias From Flu Severity Estimation (a.k.a. Misery Loves Data)"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/01\/Cursor_and___Development_cdcfluview_-_master_-_RStudio-1.png?fit=2522%2C1282&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-1fv","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3215,"url":"https:\/\/rud.is\/b\/2015\/01\/10\/new-r-package-cdcfluview-retrieve-flu-data-from-cdcs-fluview-portal\/","url_meta":{"origin":4805,"position":0},"title":"New R Package: cdcfluview \u2014 Retrieve Flu Data from CDC&#8217;s FluView Portal","author":"hrbrmstr","date":"2015-01-10","format":false,"excerpt":"**NOTE** If there's a particular data set from http:\/\/www.cdc.gov\/flu\/weekly\/fluviewinteractive.htm that you want and that isn't in the pacakge, please file it as an issue and be as specific as you can (screen shot if possible). ----- Towards the end of 2014 I had been tinkering with flu data from the\u2026","rel":"","context":"In &quot;DataVis&quot;","block_context":{"text":"DataVis","link":"https:\/\/rud.is\/b\/category\/datavis-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9442,"url":"https:\/\/rud.is\/b\/2018\/04\/04\/exploring-r-bloggers-posts-with-the-feedly-api\/","url_meta":{"origin":4805,"position":1},"title":"Exploring R-Bloggers Posts with the Feedly API","author":"hrbrmstr","date":"2018-04-04","format":false,"excerpt":"There's a yuge chance you're reading this post (at least initially) on R-Bloggers right now (though you should also check out R Weekly and add their live feed to your RSS reader pronto!). It's a central \"watering hole\" for R folks and is read by many (IIRC over 20,000 Feedly\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/rb-post-count.png?fit=1200%2C568&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/rb-post-count.png?fit=1200%2C568&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/rb-post-count.png?fit=1200%2C568&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/rb-post-count.png?fit=1200%2C568&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/rb-post-count.png?fit=1200%2C568&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4696,"url":"https:\/\/rud.is\/b\/2016\/12\/05\/interacting-with-amazon-athena-from-r\/","url_meta":{"origin":4805,"position":2},"title":"Interacting With Amazon Athena from R","author":"hrbrmstr","date":"2016-12-05","format":false,"excerpt":"This is a short post for those looking to test out Amazon Athena with R. Amazon makes Athena available via JDBC, so you can use RJDBC to query data. All you need is their JAR file and some setup information. Here's how to get the JAR file to the current\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3633,"url":"https:\/\/rud.is\/b\/2015\/08\/23\/using-r-to-get-data-out-of-word-docs\/","url_meta":{"origin":4805,"position":3},"title":"Using R To Get Data *Out Of* Word Docs","author":"hrbrmstr","date":"2015-08-23","format":false,"excerpt":"NOTE: after reading this post head on over to this new one as it has wrapped this functionality (and more!) into a package. Also: docxtractr is now on CRAN This was asked on twitter recently: Is it possible to import data entered in MS Word into R - I have\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3940,"url":"https:\/\/rud.is\/b\/2016\/02\/14\/making-faceted-heatmaps-with-ggplot2\/","url_meta":{"origin":4805,"position":4},"title":"Making Faceted Heatmaps with ggplot2","author":"hrbrmstr","date":"2016-02-14","format":false,"excerpt":"We were doing some exploratory data analysis on some attacker data at work and one of the things I was interested is what were \"working hours\" by country. Now, I don't put a great deal of faith in the precision of geolocated IP addresses since every geolocation database that exists\u2026","rel":"","context":"In &quot;ggplot&quot;","block_context":{"text":"ggplot","link":"https:\/\/rud.is\/b\/category\/ggplot\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/heatmapsample.png?fit=1200%2C808&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/heatmapsample.png?fit=1200%2C808&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/heatmapsample.png?fit=1200%2C808&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/heatmapsample.png?fit=1200%2C808&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/heatmapsample.png?fit=1200%2C808&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3610,"url":"https:\/\/rud.is\/b\/2015\/08\/09\/cdcfluview-on-the-way-to-cran-7k\/","url_meta":{"origin":4805,"position":5},"title":"cdcfluview &#8211; On The Way to &#8220;CRAN 7K&#8221;","author":"hrbrmstr","date":"2015-08-09","format":false,"excerpt":"I like to turn coincidence into convergence whenever possible. This weekend, a user of [cdcfluview](http:\/\/github.com\/hrbrmstr\/cdcfluview) had a question that caused me to notice a difference in behaviour between the package was interacting with CDC FluView API, so I updated the package to accommodate the change and the user. Around the\u2026","rel":"","context":"In &quot;Data Analysis&quot;","block_context":{"text":"Data Analysis","link":"https:\/\/rud.is\/b\/category\/data-analysis-2\/"},"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\/4805","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=4805"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/4808"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=4805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=4805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=4805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}