

{"id":4460,"date":"2016-06-19T20:53:49","date_gmt":"2016-06-20T01:53:49","guid":{"rendered":"http:\/\/rud.is\/b\/?p=4460"},"modified":"2018-03-07T16:42:22","modified_gmt":"2018-03-07T21:42:22","slug":"a-call-to-armslist-data-analysis","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/","title":{"rendered":"A Call to Arms[list] Data Analysis!"},"content":{"rendered":"<p>The NPR vis team contributed to a recent [story](http:\/\/n.pr\/1USSliN) about Armslist, a &#8220;craigslist for guns&#8221;. Now, I&#8217;m neither pro-&#8220;gun&#8221; or anti-&#8220;gun&#8221; since this subject, like most heated ones, has more than two sides. What I _am_ is pro-*data*, and the U.S. Congress is so [deep in the pockets of the NRA](http:\/\/abcnews.go.com\/Health\/cdc-launched-comprehensive-gun-study-15-years\/story?id=39873289) that there&#8217;s no way for there to be any Federally-supported, data-driven research on gun injuries\/deaths. Thankfully, California is going to [start funding research](http:\/\/www.wired.com\/2016\/06\/congress-refuses-california-funds-gun-violence-research-center\/), so we may see some evidence-based papers in the (hopefully) not-too-distant future.<\/p>\n<p>When I read the NPR story I couldn&#8217;t believe it was easier to get a gun than it is get [pick your vice or other bit of dangerous contraband]. The team at NPR ended up [scraping the Armslist site](http:\/\/blog.apps.npr.org\/2016\/06\/17\/scraping-tips.html) and provided a [CSV of the data](http:\/\/apps.npr.org\/armslist-analysis\/armslist-listings-2016-06-16.csv). Their own blog post admirably started off with a &#8220;Can you scrape?&#8221; section. This is an area I see so many python, R and other folks totally ignore since they seem to feel that just because you _can_ do something also gives you license to do so. <\/p>\n<p>I&#8217;m glad the NPR team provided the CSV of their results since I suspect that Armslist will be adding some &#8220;no scraping&#8221; language to their Terms of Service. Interestingly enough, the Armslist site owners spend a great deal of verbiage across their site indemnifying themselves (that&#8217;s how proud of their service they are).<\/p>\n<p>Since they provided the CSV, I poked at it a bit and produced some alternate views of the data. One bit of info I was interested in is how much the ask price was for the firearms. Since this is a craigslist-like site, some of the prices are missing and others are obviously either &#8220;filler&#8221; like `12345678` or are legitimately large (i.e. the price for a rare antique). Given the huge right-skew, I limited the initial view to &#8220;affordable&#8221; ones (which I defined as between $0.00 &#038; $2,500 USD and if you look at the data yourself you&#8217;ll see why). I then computed the bandwidth for the density estimate and did some other basic maths to see what price range of the offers made up at least 50% of the overall listings. I probably should have excluded the $1 offers but the data is there for you to use to augment anything I&#8217;ve done here. <\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/ask-prices-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4465\" data-permalink=\"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/ask-prices-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/ask-prices-1.png?fit=1536%2C768&amp;ssl=1\" data-orig-size=\"1536,768\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ask-prices-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/ask-prices-1.png?fit=510%2C255&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/ask-prices-1.png?resize=510%2C255&#038;ssl=1\" alt=\"ask-prices-1\" width=\"510\" height=\"255\" class=\"aligncenter size-full wp-image-4465\" \/><\/a><\/p>\n<p>Most of these firearms are quite affordable (even if you ignore the $1.00 USD offers).<\/p>\n<p>One other view I wanted to see was that of the listings-per-day.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4464\" data-permalink=\"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/per-day-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&amp;ssl=1\" data-orig-size=\"1536,960\" 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=\"per-day-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=510%2C319&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?resize=510%2C319&#038;ssl=1\" alt=\"per-day-1\" width=\"510\" height=\"319\" class=\"aligncenter size-full wp-image-4464\" \/><\/a><\/p>\n<p>Info from the NPR vis team suggests this is not a 100% accurate view since the listings &#8220;age out&#8221; and they did a point-in-time scrape. It would be interesting to start a daily scraper for this site or ask to work with the raw data from the site itself (but it&#8217;s unlikely Armslist would have the courage to make said data available to news organizations or researchers). Also, the value for the last segment-bar does not appear to be from a fully day&#8217;s scrape. Nothing says &#8216;Murica like selling guns in a sketchy way for Memorial Day.<\/p>\n<p>Finally, I wanted a different view of the ranked states. <\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/by-state-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4463\" data-permalink=\"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/by-state-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/by-state-1.png?fit=1536%2C1152&amp;ssl=1\" data-orig-size=\"1536,1152\" 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=\"by-state-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/by-state-1.png?fit=510%2C383&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/by-state-1.png?resize=510%2C383&#038;ssl=1\" alt=\"by-state-1\" width=\"510\" height=\"383\" class=\"aligncenter size-full wp-image-4463\" \/><\/a><\/p>\n<p>(The `ggplot2` code for this one is kinda interesting for any R folk who are curious). This segment-bar chart is a bit of an eye strain (click on it to make it larger) but the main thing I wanted to see was if Ohio was as gun-nutty for the three less-than-valid (IMO) types of firearms sales (which is a different view than automatic vs semi-automatic). Sure enough, Ohio leads the pack (in other news, the same states are in the top 5 across these three categories).<\/p>\n<p>&#8220;Spinnable&#8221; R code for these charts is below, so go forth and see if you can tease out any other views from the data. There is a free-text listing description field which may be interesting to mine, and the R code has sorted lists by manufacturer and caliber you can view if you run\/spin it. It might be interesting to get data [like this for Ohio](https:\/\/en.wikipedia.org\/wiki\/Gun_laws_in_Ohio) for other states and do some clustering based on the legal categories outlined in the table.<\/p>\n<pre id=\"prism-r-code\"><code class=\"language-r\">#&#039; ---\r\n#&#039; output:\r\n#&#039;   html_document:\r\n#&#039;     keep_md: true\r\n#&#039; ---\r\n\r\n#+ message=FALSE, echo=FALSE, warning=FALSE\r\nlibrary(dplyr)\r\nlibrary(readr)\r\nlibrary(ggalt)\r\nlibrary(hrbrmisc)\r\nlibrary(KernSmooth)\r\nlibrary(scales)\r\nlibrary(stringi)\r\nlibrary(extrafont)\r\nlibrary(DT)\r\n\r\nloadfonts()\r\n\r\narms &lt;- read_csv(&quot;armslist-listings-2016-06-16.csv&quot;)\r\narms &lt;- mutate(arms,\r\n               price=ifelse(price==&quot;FREE&quot;, 0, price),\r\n               price=ifelse(price==&quot;Offer&quot;, NA, price),\r\n               price=make_numeric(price))\r\narms &lt;- mutate(arms,\r\n               listed_date=gsub(&quot;^.*y, &quot;, &quot;&quot;, listed_date),\r\n               listed_date=as.Date(listed_date, &quot;%B %d, %Y&quot;))\r\n\r\naffordable &lt;- filter(arms, price&gt;0 &amp; price&lt;2500)\r\n\r\nbw &lt;- dpik(affordable$price, scalest=&quot;stdev&quot;)\r\n\r\na_dens &lt;- bkde(affordable$price, bandwidth=bw,\r\n               range.x=range(affordable$price),\r\n               truncate=TRUE)\r\n\r\npeaks &lt;- data_frame(\r\n  pk=which(diff(sign(diff(c(0, a_dens$y)))) == -2),\r\n  x=a_dens$x[pk],\r\n  y=a_dens$y[pk]\r\n)\r\n\r\nann &lt;- sprintf(&#039;%s (%s of all listings) firearms are\\noffered between $1 &amp; $600 USD&#039;,\r\n               comma(nrow(filter(affordable, between(price, 1, 600)))),\r\n               percent(nrow(filter(affordable, between(price, 1, 600)))\/nrow(arms)))\r\n\r\ngrps &lt;- setNames(1:6, unique(arms$category))\r\n\r\nggplot() +\r\n  geom_segment(data=cbind.data.frame(a_dens), aes(x, xend=x, 0, yend=y),\r\n               color=&quot;#2b2b2b&quot;, size=0.15) +\r\n  geom_vline(data=peaks[c(1,8),], aes(xintercept=x), size=0.5,\r\n             linetype=&quot;dotted&quot;, color=&quot;#b2182b&quot;) +\r\n  geom_label(data=peaks[c(1,8),], label.size=0,\r\n            aes(x, y, label=dollar(floor(x)), hjust=c(0, 0)),\r\n            nudge_x=c(10, 10), vjust=0, size=3,\r\n            family=&quot;Arial Narrow&quot;) +\r\n  geom_label(data=data.frame(), hjust=0, label.size=0, size=3,\r\n             aes(label=ann, x=800, y=min(a_dens$y) + sum(range(a_dens$y))*0.7),\r\n             family=&quot;Arial Narrow&quot;) +\r\n  scale_x_continuous(expand=c(0,0), breaks=seq(0, 2500, 500), label=dollar, limits=c(0, 2500)) +\r\n  scale_y_continuous(expand=c(0,0), limits=c(0, max(a_dens$y*1.05))) +\r\n  labs(x=NULL, y=&quot;density&quot;,\r\n       title=&quot;Distribution of firearm ask prices on Armslist&quot;,\r\n       subtitle=sprintf(&quot;Counts are across all firearm types (%s)&quot;,\r\n                        stri_replace_last_regex(paste0(names(grps), collapse=&quot;, &quot;), &quot;,&quot;, &quot; &amp;&quot;)),\r\n       caption=&quot;Source: NPR http:\/\/n.pr\/1USSliN&quot;) +\r\n  theme_hrbrmstr_an(grid=&quot;X=Y&quot;, subtitle_size=10) +\r\n  theme(axis.text.x=element_text(hjust=c(0, rep(0.5, 4), 1))) +\r\n  theme(axis.text.y=element_blank()) +\r\n  theme(plot.margin=margin(10,10,10,10)) -&gt; gg\r\n\r\n#+ ask-prices, dev=&quot;png&quot;, fig.width=8, fig.height=4, fig.retina=2, message=FALSE, echo=FALSE, warning=FALSE\r\ngg\r\n\r\ncount(arms, state, category) %&gt;%\r\n  group_by(category) %&gt;%\r\n  mutate(f=paste0(paste0(rep(&quot; &quot;, grps[category[1]]), collapse=&quot;&quot;), state, collaspe=&quot;&quot;)) %&gt;%\r\n  ungroup() %&gt;%\r\n  arrange(desc(n)) %&gt;%\r\n  mutate(f=factor(f, levels=rev(f))) %&gt;%\r\n  filter(category %in% c(&quot;Handguns&quot;, &quot;Rifles&quot;, &quot;Shotguns&quot;)) %&gt;%\r\n  ggplot(aes(x=n, y=f)) +\r\n  geom_segment(aes(yend=f, xend=0), size=0.5) +\r\n  scale_x_continuous(expand=c(0,0), label=comma) +\r\n  facet_wrap(~category, scales=&quot;free&quot;) +\r\n  labs(x=&quot;Note: free x-axis scale&quot;, y=NULL,\r\n       title=&quot;Distribution of firearm listing by state&quot;,\r\n       subtitle=&quot;Listings of Antique Firearms, Muzzle Loaders &amp; NFA Firearms are not included in this view&quot;,\r\n       caption=&quot;Source: NPR http:\/\/n.pr\/1USSliN&quot;) +\r\n  theme_hrbrmstr_an(grid=&quot;X&quot;, subtitle_size=10) +\r\n  theme(axis.text.y=element_text(size=6)) -&gt; gg\r\n\r\n#+ by-state, dev=&quot;png&quot;, fig.width=8, fig.height=6, fig.retina=2, message=FALSE, echo=FALSE, warning=FALSE\r\ngg\r\n\r\ncount(arms, listed_date) %&gt;%\r\n  ggplot(aes(listed_date, n)) +\r\n  geom_segment(aes(xend=listed_date, yend=0)) +\r\n  geom_vline(xintercept=c(as.numeric(c(as.Date(&quot;2016-05-26&quot;),\r\n                                       as.Date(&quot;2016-05-28&quot;),\r\n                                       as.Date(&quot;2016-06-02&quot;)))), color=&quot;#b2182b&quot;, size=0.5, linetype=&quot;dotted&quot;) +\r\n  geom_label(data=data.frame(), hjust=1, vjust=1, nudge_x=-0.5, label.size=0, size=3,\r\n             aes(x=as.Date(&quot;2016-05-26&quot;), y=1800, label=&quot;NYT &amp; CNN Gun Editorials&quot;),\r\n             family=&quot;Arial Narrow&quot;, color=&quot;#b2182b&quot;) +\r\n  geom_label(data=data.frame(), hjust=1, vjust=1, nudge_x=-0.5, label.size=0, size=3,\r\n             aes(x=as.Date(&quot;2016-05-28&quot;), y=8500, label=&quot;Memorial Day&quot;),\r\n             family=&quot;Arial Narrow&quot;, color=&quot;#b2182b&quot;) +\r\n  geom_label(data=data.frame(), hjust=0, vjust=1, nudge_x=0.5,\r\n             label.size=0, size=3, lineheight=0.9,\r\n             aes(x=as.Date(&quot;2016-06-02&quot;), y=7000,\r\n                 label=&quot;National Gun\\nViolence\\nAwareness Day&quot;),\r\n             family=&quot;Arial Narrow&quot;, color=&quot;#b2182b&quot;) +\r\n  scale_x_date(expand=c(0,1), label=date_format(&quot;%B 2016&quot;)) +\r\n  scale_y_continuous(expand=c(0,0), label=comma, limit=c(0, 9000)) +\r\n  labs(x=NULL, y=NULL,\r\n       title=&quot;Armslist firearm new listings per day&quot;,\r\n       subtitle=&quot;Period range: March 16, 2016 to June 16, 2016&quot;,\r\n       caption=&quot;Source: NPR http:\/\/n.pr\/1USSliN&quot;) +\r\n  theme_hrbrmstr_an(grid=&quot;XY&quot;) +\r\n  theme(plot.margin=margin(10,10,10,10)) -&gt; gg\r\n\r\n#+ per-day, dev=&quot;png&quot;, fig.width=8, fig.height=5, fig.retina=2, message=FALSE, echo=FALSE, warning=FALSE\r\ngg\r\n\r\ncount(arms, manufacturer) %&gt;%\r\n  filter(!is.na(manufacturer)) %&gt;%\r\n  arrange(desc(n)) %&gt;%\r\n  select(Manufacturer=manufacturer, Count=n) %&gt;%\r\n  datatable() %&gt;%\r\n  formatCurrency(columns=&quot;Count&quot;, currency=&quot;&quot;)\r\n\r\ncount(arms, caliber) %&gt;%\r\n  filter(!is.na(caliber)) %&gt;%\r\n  arrange(desc(n)) %&gt;%\r\n  select(Caliber=caliber, Count=n) %&gt;%\r\n  datatable() %&gt;%\r\n  formatCurrency(columns=&quot;Count&quot;, currency=&quot;&quot;)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The NPR vis team contributed to a recent [story](http:\/\/n.pr\/1USSliN) about Armslist, a &#8220;craigslist for guns&#8221;. Now, I&#8217;m neither pro-&#8220;gun&#8221; or anti-&#8220;gun&#8221; since this subject, like most heated ones, has more than two sides. What I _am_ is pro-*data*, and the U.S. Congress is so [deep in the pockets of the NRA](http:\/\/abcnews.go.com\/Health\/cdc-launched-comprehensive-gun-study-15-years\/story?id=39873289) that there&#8217;s no way [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4464,"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-4460","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>A Call to Arms[list] Data Analysis! - 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\/19\/a-call-to-armslist-data-analysis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Call to Arms[list] Data Analysis! - rud.is\" \/>\n<meta property=\"og:description\" content=\"The NPR vis team contributed to a recent [story](http:\/\/n.pr\/1USSliN) about Armslist, a &#8220;craigslist for guns&#8221;. Now, I&#8217;m neither pro-&#8220;gun&#8221; or anti-&#8220;gun&#8221; since this subject, like most heated ones, has more than two sides. What I _am_ is pro-*data*, and the U.S. Congress is so [deep in the pockets of the NRA](http:\/\/abcnews.go.com\/Health\/cdc-launched-comprehensive-gun-study-15-years\/story?id=39873289) that there&#8217;s no way [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-20T01:53:49+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\/per-day-1.png?fit=1536%2C960&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\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=\"4 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\\\/19\\\/a-call-to-armslist-data-analysis\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"A Call to Arms[list] Data Analysis!\",\"datePublished\":\"2016-06-20T01:53:49+00:00\",\"dateModified\":\"2018-03-07T21:42:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/\"},\"wordCount\":751,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/per-day-1.png?fit=1536%2C960&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\\\/19\\\/a-call-to-armslist-data-analysis\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/\",\"name\":\"A Call to Arms[list] Data Analysis! - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/per-day-1.png?fit=1536%2C960&ssl=1\",\"datePublished\":\"2016-06-20T01:53:49+00:00\",\"dateModified\":\"2018-03-07T21:42:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/per-day-1.png?fit=1536%2C960&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/per-day-1.png?fit=1536%2C960&ssl=1\",\"width\":1536,\"height\":960},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/06\\\/19\\\/a-call-to-armslist-data-analysis\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Call to Arms[list] Data Analysis!\"}]},{\"@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":"A Call to Arms[list] Data Analysis! - 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\/19\/a-call-to-armslist-data-analysis\/","og_locale":"en_US","og_type":"article","og_title":"A Call to Arms[list] Data Analysis! - rud.is","og_description":"The NPR vis team contributed to a recent [story](http:\/\/n.pr\/1USSliN) about Armslist, a &#8220;craigslist for guns&#8221;. Now, I&#8217;m neither pro-&#8220;gun&#8221; or anti-&#8220;gun&#8221; since this subject, like most heated ones, has more than two sides. What I _am_ is pro-*data*, and the U.S. Congress is so [deep in the pockets of the NRA](http:\/\/abcnews.go.com\/Health\/cdc-launched-comprehensive-gun-study-15-years\/story?id=39873289) that there&#8217;s no way [&hellip;]","og_url":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/","og_site_name":"rud.is","article_published_time":"2016-06-20T01:53:49+00:00","article_modified_time":"2018-03-07T21:42:22+00:00","og_image":[{"width":1536,"height":960,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&ssl=1","type":"image\/png"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"A Call to Arms[list] Data Analysis!","datePublished":"2016-06-20T01:53:49+00:00","dateModified":"2018-03-07T21:42:22+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/"},"wordCount":751,"commentCount":3,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&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\/19\/a-call-to-armslist-data-analysis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/","url":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/","name":"A Call to Arms[list] Data Analysis! - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&ssl=1","datePublished":"2016-06-20T01:53:49+00:00","dateModified":"2018-03-07T21:42:22+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/06\/per-day-1.png?fit=1536%2C960&ssl=1","width":1536,"height":960},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2016\/06\/19\/a-call-to-armslist-data-analysis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"A Call to Arms[list] Data Analysis!"}]},{"@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\/per-day-1.png?fit=1536%2C960&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-19W","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":6631,"url":"https:\/\/rud.is\/b\/2017\/10\/08\/tragic-documentation\/","url_meta":{"origin":4460,"position":0},"title":"Tragic Documentation","author":"hrbrmstr","date":"2017-10-08","format":false,"excerpt":"NOTE: If the usual aggregators are picking this up and there are humans curating said aggregators, this post is\/was not intended as something to go into the \"data science\" aggregation sites. Just personal commentary with code in the event someone stumbles across it and wanted to double check me. These\u2026","rel":"","context":"In &quot;Commentary&quot;","block_context":{"text":"Commentary","link":"https:\/\/rud.is\/b\/category\/commentary\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3649,"url":"https:\/\/rud.is\/b\/2015\/08\/27\/coloring-and-drawing-outside-the-lines-in-ggplot\/","url_meta":{"origin":4460,"position":1},"title":"Coloring (and Drawing) Outside the Lines in ggplot","author":"hrbrmstr","date":"2015-08-27","format":false,"excerpt":"Time for another Twitter-inspired blog post this week, this time from a tweet by @JonKalodimos: Is there a way to do this in #rstats #ggplot2 https:\/\/t.co\/kxWQFlYpbB\u2014 Jonathan Kalodimos (@JonKalodimos) August 27, 2015 I had seen and appreciated Ann's post on her makeover of the main graphic in [NPR's story](http:\/\/www.npr.org\/sections\/money\/2014\/10\/21\/357629765\/when-women-stopped-coding) and\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":5146,"url":"https:\/\/rud.is\/b\/2017\/03\/12\/think-twice-before-using-ohmconnect\/","url_meta":{"origin":4460,"position":2},"title":"Think Twice Before Using Ohmconnect","author":"hrbrmstr","date":"2017-03-12","format":false,"excerpt":"I listen to @NPR throughout the day (on most days) and a story on Ohmconnect piqued my interest (it aired 5 days prior to this post). The TLDR on Ohmconnect is that it ostensibly helps you save energy by making you more aware of consumption and can be enabled to\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/03\/OhmConnect-9.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/03\/OhmConnect-9.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/03\/OhmConnect-9.png?resize=525%2C300 1.5x"},"classes":[]},{"id":3386,"url":"https:\/\/rud.is\/b\/2015\/05\/09\/quotebox-an-npr-like-embedded-twitter-quote-generator\/","url_meta":{"origin":4460,"position":3},"title":"quotebox &#8211; An NPR-like Embedded Twitter Quote Generator","author":"hrbrmstr","date":"2015-05-09","format":false,"excerpt":"I'm an avid NPR listener also follow a number of their programs and people on Twitter. I really dig their [quotable](https:\/\/github.com\/nprapps\/quotable) tweets. Here's a sample of a recent one: Minn. state senators cannot look other senators in the eye during floor debate. @ailsachang http:\/\/t.co\/SfQBq4yyHQ pic.twitter.com\/DNHGEiVA9j\u2014 NPR News (@nprnews) May 8,\u2026","rel":"","context":"In &quot;phantomjs&quot;","block_context":{"text":"phantomjs","link":"https:\/\/rud.is\/b\/category\/phantomjs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2949,"url":"https:\/\/rud.is\/b\/2014\/04\/01\/mapping-the-march-2014-california-earthquake-with-ggmap\/","url_meta":{"origin":4460,"position":4},"title":"Mapping the March 2014 California Earthquake with ggmap","author":"hrbrmstr","date":"2014-04-01","format":false,"excerpt":"I had no intention to blog this, but @jayjacobs convinced me otherwise. I was curious about the recent (end of March, 2014) [California earthquake](http:\/\/www.latimes.com\/local\/lanow\/la-me-ln-an-estimated-17-million-people-felt-51-earthquake-in-california-20140331,0,2465821.story#axzz2xfGBteq0) \"storm\" and did a quick plot for \"fun\" and personal use using `ggmap`\/`ggplot`. I used data from the [Southern California Earthquake Center](http:\/\/www.data.scec.org\/recent\/recenteqs\/Maps\/Los_Angeles.html) (that I cleaned up\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":1545,"url":"https:\/\/rud.is\/b\/2012\/08\/06\/just-when-you-thought-it-was-safe-to-make-a-slopegraph\/","url_meta":{"origin":4460,"position":5},"title":"Just When You Thought It Was Safe To Make A Slopegraph","author":"hrbrmstr","date":"2012-08-06","format":false,"excerpt":"Thanks to a nice call-out post link on Flowing Data in my RSS feeds this morning, I found Naomi Robbins' Effective Graphs Forbes blog, perused the archives a bit and came across her post on arrow charts. She presented a nice comparison between (ugh) pie charts, arrow charts and slopegraphs.\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4460","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=4460"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4460\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/4464"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=4460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=4460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=4460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}