

{"id":7269,"date":"2017-11-27T15:38:43","date_gmt":"2017-11-27T20:38:43","guid":{"rendered":"https:\/\/rud.is\/b\/?p=7269"},"modified":"2018-03-07T16:53:57","modified_gmt":"2018-03-07T21:53:57","slug":"voteogram-is-now-on-cran","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/","title":{"rendered":"voteogram Is Now On CRAN"},"content":{"rendered":"<p>Earlier this year, I made a package that riffed off of ProPublica&#8217;s really neat voting cartograms (maps) for the U.S. House and Senate. You can see one for disaster relief spending <a href=\"https:\/\/projects.propublica.org\/represent\/votes\/115\/house\/1\/566\">in the House<\/a> and one for the ACA &#8220;Skinny Repeal&#8221; <a href=\"https:\/\/projects.propublica.org\/represent\/votes\/115\/senate\/1\/179\">in the Senate<\/a>.<\/p>\n<p>We can replicate both here with the <code>voteogram<\/code> package (minus the interactivity, for now):<\/p>\n<pre id=\"crancarto01\"><code class=\"language-r\">library(voteogram)\r\nlibrary(ggplot2)\r\n\r\nhr_566 &lt;- roll_call(critter=&quot;house&quot;, number=115, session=1, rcall=566)\r\n\r\nhouse_carto(hr_566) +\r\n  coord_equal() +\r\n  theme_voteogram()<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/Plot_Zoom.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"7270\" data-permalink=\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/plot_zoom-14\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/Plot_Zoom.png?fit=756%2C430&amp;ssl=1\" data-orig-size=\"756,430\" 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=\"Plot_Zoom\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/Plot_Zoom.png?fit=300%2C171&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/Plot_Zoom.png?fit=510%2C290&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/Plot_Zoom.png?resize=378%2C215&#038;ssl=1\" alt=\"\" width=\"378\" height=\"215\" class=\"aligncenter size-full wp-image-7270\" \/><\/a><\/p>\n<pre id=\"crancarto02\"><code class=\"language-r\">sen_179 &lt;- roll_call(critter=&quot;senate&quot;, number=115, session=1, rcall=179)\r\n\r\nsenate_carto(sen_179) +\r\n  coord_equal() +\r\n  theme_voteogram()<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-4.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"7271\" data-permalink=\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/plot_zoom_png-7\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-4.png?fit=794%2C498&amp;ssl=1\" data-orig-size=\"794,498\" 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=\"plot_zoom_png\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-4.png?fit=300%2C188&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-4.png?fit=510%2C320&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-4.png?resize=397%2C249&#038;ssl=1\" alt=\"\" width=\"397\" height=\"249\" class=\"aligncenter size-full wp-image-7271\" \/><\/a><\/p>\n<p>I think folks might have more fun with the <code>roll_call()<\/code> objects though:<\/p>\n<pre id=\"crancarto03\"><code class=\"language-r\">str(hr_566)\r\n## List of 29\r\n##  $ vote_id              : chr &quot;H_115_1_566&quot;\r\n##  $ chamber              : chr &quot;House&quot;\r\n##  $ year                 : int 2017\r\n##  $ congress             : chr &quot;115&quot;\r\n##  $ session              : chr &quot;1&quot;\r\n##  $ roll_call            : int 566\r\n##  $ needed_to_pass       : int 282\r\n##  $ date_of_vote         : chr &quot;October 12, 2017&quot;\r\n##  $ time_of_vote         : chr &quot;03:23 PM&quot;\r\n##  $ result               : chr &quot;Passed&quot;\r\n##  $ vote_type            : chr &quot;2\/3 YEA-AND-NAY&quot;\r\n##  $ question             : chr &quot;On Motion to Suspend the Rules and Agree&quot;\r\n##  $ description          : chr &quot;Providing for the concurrence by the House in the Senate amendment to H.R. ## 2266, with an amendment&quot;\r\n##  $ nyt_title            : chr &quot;On Motion to Suspend the Rules and Agree&quot;\r\n##  $ total_yes            : int 353\r\n##  $ total_no             : int 69\r\n##  $ total_not_voting     : int 11\r\n##  $ gop_yes              : int 164\r\n##  $ gop_no               : int 69\r\n##  $ gop_not_voting       : int 7\r\n##  $ dem_yes              : int 189\r\n##  $ dem_no               : int 0\r\n##  $ dem_not_voting       : int 5\r\n##  $ ind_yes              : int 0\r\n##  $ ind_no               : int 0\r\n##  $ ind_not_voting       : int 0\r\n##  $ dem_majority_position: chr &quot;Yes&quot;\r\n##  $ gop_majority_position: chr &quot;Yes&quot;\r\n##  $ votes                :Classes \u2018tbl_df\u2019, \u2018tbl\u2019 and &#039;data.frame&#039;:  435 obs. of  11 variables:\r\n##   ..$ bioguide_id         : chr [1:435] &quot;A000374&quot; &quot;A000370&quot; &quot;A000055&quot; &quot;A000371&quot; ...\r\n##   ..$ role_id             : int [1:435] 274 294 224 427 268 131 388 320 590 206 ...\r\n##   ..$ member_name         : chr [1:435] &quot;Ralph Abraham&quot; &quot;Alma Adams&quot; &quot;Robert B. Aderholt&quot; &quot;Pete Aguilar&quot; ...\r\n##   ..$ sort_name           : chr [1:435] &quot;Abraham&quot; &quot;Adams&quot; &quot;Aderholt&quot; &quot;Aguilar&quot; ...\r\n##   ..$ party               : chr [1:435] &quot;R&quot; &quot;D&quot; &quot;R&quot; &quot;D&quot; ...\r\n##   ..$ state_abbrev        : chr [1:435] &quot;LA&quot; &quot;NC&quot; &quot;AL&quot; &quot;CA&quot; ...\r\n##   ..$ display_state_abbrev: chr [1:435] &quot;La.&quot; &quot;N.C.&quot; &quot;Ala.&quot; &quot;Calif.&quot; ...\r\n##   ..$ district            : int [1:435] 5 12 4 31 12 3 2 19 36 2 ...\r\n##   ..$ position            : chr [1:435] &quot;Yes&quot; &quot;Yes&quot; &quot;Yes&quot; &quot;Yes&quot; ...\r\n##   ..$ dw_nominate         : num [1:435] 0.493 -0.462 0.36 -0.273 0.614 0.684 0.388 NA 0.716 NA ...\r\n##   ..$ pp_id               : chr [1:435] &quot;LA_5&quot; &quot;NC_12&quot; &quot;AL_4&quot; &quot;CA_31&quot; ...\r\n##  - attr(*, &quot;class&quot;)= chr [1:2] &quot;pprc&quot; &quot;list&quot;<\/code><\/pre>\n<p>as they hold tons of info on the votes.<\/p>\n<p>I need to explore the following a bit more but there are some definite &#8220;patterns&#8221; in the way the 115th Senate has voted this year:<\/p>\n<pre id=\"crancarto04\"><code class=\"language-r\">library(hrbrthemes)\r\n\r\n# I made a mistake in how I exposed these that I&#039;ll correct next month\r\n# but we need to munge it a bit anyway for this view\r\nfills &lt;- voteogram:::vote_carto_fill\r\nnames(fills) &lt;- tolower(names(fills))\r\n\r\nrcalls &lt;- map(1:280, ~voteogram::roll_call(critter=&quot;senate&quot;, session=1, number=115, rcall=.x))\r\n# save it off so you don&#039;t have to waste those calls again\r\nwrite_rds(rcalls, &quot;2017-115-1-sen-280-roll-calls.rds&quot;)\r\n\r\n# do a bit of wrangling\r\nmap_df(rcalls, ~{\r\n  mutate(.x$votes, vote_id = .x$vote_id) %&gt;% \r\n    arrange(party, position) %&gt;% \r\n    mutate(fill = tolower(sprintf(&quot;%s-%s&quot;, party, position))) %&gt;% \r\n    mutate(ques = .x$question) %&gt;% \r\n    mutate(x = 1:n())\r\n}) -&gt; votes_df\r\n\r\n# plot it\r\nggplot(votes_df, aes(x=x, y=vote_id, fill=fill)) +\r\n  geom_tile() +\r\n  scale_x_discrete(expand=c(0,0)) +\r\n  scale_y_discrete(expand=c(0,0)) +\r\n  scale_fill_manual(name=NULL, values=fills) +\r\n  labs(x=NULL, y=NULL, title=&quot;Senate Roll Call Votes&quot;,\r\n       subtitle=&quot;2017 \/ 115th, Session 1, Votes 1-280&quot;,\r\n       caption=&quot;Note free-Y scales&quot;) +\r\n  facet_wrap(~ques, scales=&quot;free_y&quot;, ncol=3) +\r\n  theme_ipsum_rc(grid=&quot;&quot;) +\r\n  theme(axis.text = element_blank()) +\r\n  theme(legend.position=&quot;right&quot;)<\/code><\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"7272\" data-permalink=\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/plot_zoom_png-1-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&amp;ssl=1\" data-orig-size=\"2362,2666\" 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=\"plot_zoom_png-1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=266%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=510%2C576&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?resize=510%2C576&#038;ssl=1\" alt=\"\" width=\"510\" height=\"576\" class=\"aligncenter size-full wp-image-7272\" \/><\/a><\/p>\n<p>Hopefully I&#8217;ll get some time to dig into the differences and report on anything interesting. If you get to it before me definitely link to your blog post in a comment!<\/p>\n<h3>FIN<\/h3>\n<p>I still want to make an <code>htmlwidgets<\/code> version of the plots and also add the ability to get the index of roll call votes by Congress number and session to make it easier to iterate.<\/p>\n<p>I&#8217;m also seriously considering creating different palettes. I used the ones from the source interactive site but am not 100% happy with them. Suggestions\/PRs welcome.<\/p>\n<p>Hopefully this package will make it easier for U.S. folks to track what&#8217;s going on in Congress and keep their representatives more accountable to the truth.<\/p>\n<p>Everything&#8217;s on <a href=\"https:\/\/github.com\/hrbrmstr\/voteogram\">GitHub<\/a> so please file issues, questions or PRs there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this year, I made a package that riffed off of ProPublica&#8217;s really neat voting cartograms (maps) for the U.S. House and Senate. You can see one for disaster relief spending in the House and one for the ACA &#8220;Skinny Repeal&#8221; in the Senate. We can replicate both here with the voteogram package (minus the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7272,"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":[721,91],"tags":[810],"class_list":["post-7269","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cartography","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>voteogram Is Now On CRAN - 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\/11\/27\/voteogram-is-now-on-cran\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"voteogram Is Now On CRAN - rud.is\" \/>\n<meta property=\"og:description\" content=\"Earlier this year, I made a package that riffed off of ProPublica&#8217;s really neat voting cartograms (maps) for the U.S. House and Senate. You can see one for disaster relief spending in the House and one for the ACA &#8220;Skinny Repeal&#8221; in the Senate. We can replicate both here with the voteogram package (minus the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-27T20:38:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:53:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"2362\" \/>\n\t<meta property=\"og:image:height\" content=\"2666\" \/>\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\/2017\/11\/27\/voteogram-is-now-on-cran\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"voteogram Is Now On CRAN\",\"datePublished\":\"2017-11-27T20:38:43+00:00\",\"dateModified\":\"2018-03-07T21:53:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\"},\"wordCount\":262,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1\",\"keywords\":[\"post\"],\"articleSection\":[\"cartography\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\",\"url\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\",\"name\":\"voteogram Is Now On CRAN - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1\",\"datePublished\":\"2017-11-27T20:38:43+00:00\",\"dateModified\":\"2018-03-07T21:53:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1\",\"width\":2362,\"height\":2666},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"voteogram Is Now On CRAN\"}]},{\"@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":"voteogram Is Now On CRAN - 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\/11\/27\/voteogram-is-now-on-cran\/","og_locale":"en_US","og_type":"article","og_title":"voteogram Is Now On CRAN - rud.is","og_description":"Earlier this year, I made a package that riffed off of ProPublica&#8217;s really neat voting cartograms (maps) for the U.S. House and Senate. You can see one for disaster relief spending in the House and one for the ACA &#8220;Skinny Repeal&#8221; in the Senate. We can replicate both here with the voteogram package (minus the [&hellip;]","og_url":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/","og_site_name":"rud.is","article_published_time":"2017-11-27T20:38:43+00:00","article_modified_time":"2018-03-07T21:53:57+00:00","og_image":[{"width":2362,"height":2666,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&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\/2017\/11\/27\/voteogram-is-now-on-cran\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"voteogram Is Now On CRAN","datePublished":"2017-11-27T20:38:43+00:00","dateModified":"2018-03-07T21:53:57+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/"},"wordCount":262,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1","keywords":["post"],"articleSection":["cartography","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/","url":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/","name":"voteogram Is Now On CRAN - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1","datePublished":"2017-11-27T20:38:43+00:00","dateModified":"2018-03-07T21:53:57+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1","width":2362,"height":2666},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2017\/11\/27\/voteogram-is-now-on-cran\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"voteogram Is Now On CRAN"}]},{"@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\/11\/plot_zoom_png-1-2.png?fit=2362%2C2666&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-1Tf","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":5916,"url":"https:\/\/rud.is\/b\/2017\/05\/07\/plot-the-vote-making-u-s-senate-house-cartograms-in-r\/","url_meta":{"origin":7269,"position":0},"title":"Plot the Vote: Making U.S. Senate &#038; House Cartograms in R","author":"hrbrmstr","date":"2017-05-07","format":false,"excerpt":"Political machinations are a tad insane in the U.S. these days & I regularly hit up @ProPublica & @GovTrack sites (& sub to the GovTrack e-mail updates) as I try to be an informed citizen, especially since I've got a Senator and Representative who seem to be in the sway\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/rep_gt-1.png?fit=1200%2C840&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/rep_gt-1.png?fit=1200%2C840&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/rep_gt-1.png?fit=1200%2C840&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/rep_gt-1.png?fit=1200%2C840&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/rep_gt-1.png?fit=1200%2C840&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":9579,"url":"https:\/\/rud.is\/b\/2018\/04\/12\/convert-epub-to-text-for-processing-in-r\/","url_meta":{"origin":7269,"position":1},"title":"Convert epub to Text for Processing in R","author":"hrbrmstr","date":"2018-04-12","format":false,"excerpt":"@RMHoge asked the following on Twitter: Hello #rstats hyve mind! Is there a package that reads epub into R? I can not find any, I now convert to text and parse the text but you sort of lose the structure of the text. Pinging @dataandme @hrbrmstr\u2014 Roel (@RMHoge) April 12,\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":4490,"url":"https:\/\/rud.is\/b\/2016\/07\/05\/a-simple-prediction-web-service-using-the-new-firery-package\/","url_meta":{"origin":7269,"position":2},"title":"A Simple Prediction Web Service Using the New fiery Package","author":"hrbrmstr","date":"2016-07-05","format":false,"excerpt":"[`fiery`](https:\/\/github.com\/thomasp85\/fiery) is a new `Rook`\/`httuv`-based R web server in town created by @thomasp85 that aims to fill the gap between raw http & websockets and Shiny with a flexible framework for handling requests and serving up responses. The intent of this post is to provide a quick-start to using it\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":9496,"url":"https:\/\/rud.is\/b\/2018\/04\/08\/dissecting-r-package-utility-belts\/","url_meta":{"origin":7269,"position":3},"title":"Dissecting R Package &#8220;Utility Belts&#8221;","author":"hrbrmstr","date":"2018-04-08","format":false,"excerpt":"Many R package authors (including myself) lump a collection of small, useful functions into some type of utils.R file and usually do not export the functions since they are (generally) designed to work on package internals rather than expose their functionality via the exported package API. Just like Batman's utility\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\/r-utility-belt-final.png?fit=891%2C375&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/r-utility-belt-final.png?fit=891%2C375&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/r-utility-belt-final.png?fit=891%2C375&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/r-utility-belt-final.png?fit=891%2C375&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":9442,"url":"https:\/\/rud.is\/b\/2018\/04\/04\/exploring-r-bloggers-posts-with-the-feedly-api\/","url_meta":{"origin":7269,"position":4},"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":8416,"url":"https:\/\/rud.is\/b\/2018\/03\/07\/handling-semantic-version-string-like-a-boss-with-the-semver-package\/","url_meta":{"origin":7269,"position":5},"title":"Handling Semantic Version Strings Like a Boss with the semver Package","author":"hrbrmstr","date":"2018-03-07","format":false,"excerpt":"I work with internet-scale data and do my fair share of macro-analyses on vulnerabilities. I use the R semver package for most of my work and wanted to blather on a bit about it since it's super-helpful for this work and doesn't get the attention it deserves. semver makes it\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\/03\/unnamed-chunk-6-1.png?fit=1200%2C480&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/unnamed-chunk-6-1.png?fit=1200%2C480&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/unnamed-chunk-6-1.png?fit=1200%2C480&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/unnamed-chunk-6-1.png?fit=1200%2C480&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/unnamed-chunk-6-1.png?fit=1200%2C480&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/7269","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=7269"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/7269\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/7272"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=7269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=7269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=7269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}