

{"id":12114,"date":"2019-03-26T10:58:38","date_gmt":"2019-03-26T15:58:38","guid":{"rendered":"https:\/\/rud.is\/b\/?p=12114"},"modified":"2019-03-27T20:49:44","modified_gmt":"2019-03-28T01:49:44","slug":"rome-was-not-built-in-a-day-but-widgetcard-was","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/","title":{"rendered":"Rome Was Not Built In A Day But widgetcard Was!"},"content":{"rendered":"<p>I saw a second post on turning htmlwidgets into interactive Twitter Player cards and felt somewhat compelled to make creating said entities a bit easier so posited the following:<\/p>\n<blockquote class=\"twitter-tweet\">\n<p lang=\"en\" dir=\"ltr\">Wld this be useful packaged up, <a href=\"https:\/\/twitter.com\/hashtag\/rstats?src=hash&amp;ref_src=twsrc%5Etfw\">#rstats<\/a>?<a href=\"https:\/\/t.co\/sfqlWnEeJV\">https:\/\/t.co\/sfqlWnEeJV<\/a><a href=\"https:\/\/t.co\/troKzmzTNv\">https:\/\/t.co\/troKzmzTNv<\/a><\/p>\n<p>(TLDR\/V: Single function to turn an HTML widget into a deployable interactive Twitter card) <a href=\"https:\/\/t.co\/uahB52YfE2\">pic.twitter.com\/uahB52YfE2<\/a><\/p>\n<p>&mdash; boB Rudis (@hrbrmstr) <a href=\"https:\/\/twitter.com\/hrbrmstr\/status\/1110510174958223362?ref_src=twsrc%5Etfw\">March 26, 2019<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>I figured 40+ ? could not be wrong, so thus begat <code>widgetcard<\/code>:<\/p>\n<ul>\n<li><a href=\"https:\/\/git.sr.ht\/~hrbrmstr\/widgetcard\">SourceHut<\/a><\/li>\n<li><a href=\"https:\/\/gitlab.com\/hrbrmstr\/widgetcard\">GitLab<\/a><\/li>\n<li><a href=\"https:\/\/cinc.rud.is\/web\/packages\/widgetcard\/\">CINC<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/hrbrmstr\/widgetcard\">GitUgh<\/a><\/li>\n<\/ul>\n<p>To make this post as short as possible, the TLDR is that you just pass in an <code>htmlwidget<\/code> and some required parameters and you get back a deployable interactive Twitter Player card as an archive file and local directory. The example code is almost as short since we&#8217;re cheating and using the immensely helpful <code>plotly<\/code> package to turn a ggplot2 vis into something interactive.<\/p>\n<p>First, make the vis:<\/p>\n<pre><code class=\"language-r\">library(ssh)\nlibrary(plotly)\nlibrary(ggplot2)\nlibrary(widgetcard)\n\nggplot(mtcars, aes(wt, mpg)) +\n  geom_point() -&gt; gg\n<\/code><\/pre>\n<p>Now, we create a local preview image for the plot we just made since we need one for the card:<\/p>\n<pre><code class=\"language-r\">preview &lt;- gg_preview(gg)\n<\/code><\/pre>\n<p>NOTE that you can use <em>any<\/em> image you want. This function streamlines the process for plotly plots created from ggplot2 plots. There are links to image sizing guidelines in the package help files.<\/p>\n<p>Now, we convert our ggplot2 object to a plotly object and create the Twitter Player card. Note that Twitter <em>really<\/em> doesn&#8217;t like standalone widgets being used as Twitter Player card links due to their heavyweight size. Therefore, <code>card_widget()<\/code> creates a non-standalone widget but bundles everything up into a single directory and deployable archive.<\/p>\n<pre><code class=\"language-r\">ggplotly(gg) %&gt;% \n  card_widget(\n    output_dir = \"~\/widgets\/tc\",\n    name_prefix = \"tc\",\n    preview_img = preview,\n    html_title = \"A way better title\",\n    card_twitter_handle = \"@hrbrmstr\",\n    card_title = \"Basic ggplot2 example\",\n    card_description = \"This is a sample caRd demonstrating card_widget()\",\n    card_image_url_prefix = \"https:\/\/rud.is\/vis\/tc\/\",\n    card_player_url_prefix = \"https:\/\/rud.is\/vis\/tc\/\",\n    card_player_width = 480,\n    card_player_height = 480\n  ) -&gt; arch_fil\n<\/code><\/pre>\n<p>Here&#8217;s what the resulting directory structure looks like:<\/p>\n<pre><code class=\"language-plain\">tc\n\u251c\u2500\u2500 tc.html\n\u251c\u2500\u2500 tc.png\n\u2514\u2500\u2500 tc_files\n    \u251c\u2500\u2500 crosstalk-1.0.0\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 css\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 crosstalk.css\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 js\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 crosstalk.js\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 crosstalk.js.map\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 crosstalk.min.js\n    \u2502\u00a0\u00a0     \u2514\u2500\u2500 crosstalk.min.js.map\n    \u251c\u2500\u2500 htmlwidgets-1.3\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 htmlwidgets.js\n    \u251c\u2500\u2500 jquery-1.11.3\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 jquery-AUTHORS.txt\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 jquery.js\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 jquery.min.js\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 jquery.min.map\n    \u251c\u2500\u2500 plotly-binding-4.8.0\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 plotly.js\n    \u251c\u2500\u2500 plotly-htmlwidgets-css-1.39.2\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 plotly-htmlwidgets.css\n    \u251c\u2500\u2500 plotly-main-1.39.2\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 plotly-latest.min.js\n    \u251c\u2500\u2500 pymjs-1.3.2\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 pym.v1.js\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 pym.v1.min.js\n    \u2514\u2500\u2500 typedarray-0.1\n        \u2514\u2500\u2500 typedarray.min.js\n<\/code><\/pre>\n<p>(There&#8217;s also a <code>tc.tgz<\/code> at the same level as the <code>tc<\/code> directory.)<\/p>\n<p>The widget is iframe&#8217;d using <code>widgetframe<\/code> and then saved out using <code>htmlwidgets::saveWidget()<\/code>.<\/p>\n<p>Now, for deploying this to a web server, one could use a method like this to <code>scp<\/code> the deployable archive:<\/p>\n<pre><code class=\"language-r\">sess &lt;- ssh_connect(Sys.getenv(\"SSH_HOST\"))\n\ninvisible(scp_upload(\n  sess, files = arch_fil, Sys.getenv(\"REMOTE_VIS_DIR\"), verbose = FALSE\n))\n\nssh_exec_wait(\n  sess,\n  command = c(\n    sprintf(\"cd %s\", Sys.getenv(\"REMOTE_VIS_DIR\")),\n    sprintf(\"tar -xzf %s\", basename(arch_fil))\n  )\n)\n<\/code><\/pre>\n<p>Alternatively, you can use other workflows to transfer and expand the archive <em>or<\/em> copy output to your static blog host.<\/p>\n<p>Make sure to test anything you build with Twitter&#8217;s <a href=\"https:\/\/cards-dev.twitter.com\/validator\">validator<\/a> before tweeting it out.<\/p>\n<h3>FIN<\/h3>\n<p>This works but is super nascent and could use some serious IRL tyre kicking and brutal feedback. Pick the least offensive social coding site you prefer and file issues &amp; PR&#8217;s at-will.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I saw a second post on turning htmlwidgets into interactive Twitter Player cards and felt somewhat compelled to make creating said entities a bit easier so posited the following: Wld this be useful packaged up, #rstats?https:\/\/t.co\/sfqlWnEeJVhttps:\/\/t.co\/troKzmzTNv (TLDR\/V: Single function to turn an HTML widget into a deployable interactive Twitter card) pic.twitter.com\/uahB52YfE2 &mdash; boB Rudis (@hrbrmstr) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"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":[91],"tags":[],"class_list":["post-12114","post","type-post","status-publish","format-standard","hentry","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rome Was Not Built In A Day But widgetcard Was! - 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\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rome Was Not Built In A Day But widgetcard Was! - rud.is\" \/>\n<meta property=\"og:description\" content=\"I saw a second post on turning htmlwidgets into interactive Twitter Player cards and felt somewhat compelled to make creating said entities a bit easier so posited the following: Wld this be useful packaged up, #rstats?https:\/\/t.co\/sfqlWnEeJVhttps:\/\/t.co\/troKzmzTNv (TLDR\/V: Single function to turn an HTML widget into a deployable interactive Twitter card) pic.twitter.com\/uahB52YfE2 &mdash; boB Rudis (@hrbrmstr) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-26T15:58:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-28T01:49:44+00:00\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Rome Was Not Built In A Day But widgetcard Was!\",\"datePublished\":\"2019-03-26T15:58:38+00:00\",\"dateModified\":\"2019-03-28T01:49:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/\"},\"wordCount\":384,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"articleSection\":[\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/\",\"name\":\"Rome Was Not Built In A Day But widgetcard Was! - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2019-03-26T15:58:38+00:00\",\"dateModified\":\"2019-03-28T01:49:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2019\\\/03\\\/26\\\/rome-was-not-built-in-a-day-but-widgetcard-was\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rome Was Not Built In A Day But widgetcard Was!\"}]},{\"@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":"Rome Was Not Built In A Day But widgetcard Was! - 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\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/","og_locale":"en_US","og_type":"article","og_title":"Rome Was Not Built In A Day But widgetcard Was! - rud.is","og_description":"I saw a second post on turning htmlwidgets into interactive Twitter Player cards and felt somewhat compelled to make creating said entities a bit easier so posited the following: Wld this be useful packaged up, #rstats?https:\/\/t.co\/sfqlWnEeJVhttps:\/\/t.co\/troKzmzTNv (TLDR\/V: Single function to turn an HTML widget into a deployable interactive Twitter card) pic.twitter.com\/uahB52YfE2 &mdash; boB Rudis (@hrbrmstr) [&hellip;]","og_url":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/","og_site_name":"rud.is","article_published_time":"2019-03-26T15:58:38+00:00","article_modified_time":"2019-03-28T01:49:44+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Rome Was Not Built In A Day But widgetcard Was!","datePublished":"2019-03-26T15:58:38+00:00","dateModified":"2019-03-28T01:49:44+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/"},"wordCount":384,"commentCount":1,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"articleSection":["R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/","url":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/","name":"Rome Was Not Built In A Day But widgetcard Was! - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2019-03-26T15:58:38+00:00","dateModified":"2019-03-28T01:49:44+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2019\/03\/26\/rome-was-not-built-in-a-day-but-widgetcard-was\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Rome Was Not Built In A Day But widgetcard Was!"}]},{"@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":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-39o","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2933,"url":"https:\/\/rud.is\/b\/2014\/02\/20\/using-twitter-as-a-data-source-for-monitoring-password-dumps\/","url_meta":{"origin":12114,"position":0},"title":"Using Twitter as a Data Source For Monitoring Password Dumps","author":"hrbrmstr","date":"2014-02-20","format":false,"excerpt":"I shot a quick post over at the [Data Driven Security blog](http:\/\/bit.ly\/1hyqJiT) explaining how to separate Twitter data gathering from R code via the Ruby `t` ([github repo](https:\/\/github.com\/sferik\/t)) command. Using `t` frees R code from having to be a Twitter processor and lets the analyst focus on analysis and visualization,\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":[]},{"id":11082,"url":"https:\/\/rud.is\/b\/2018\/07\/22\/new-apache-drill-udf-for-processing-twitter-tweet-text\/","url_meta":{"origin":12114,"position":1},"title":"New Apache Drill UDF for Processing Twitter Tweet Text","author":"hrbrmstr","date":"2018-07-22","format":false,"excerpt":"There are many ways to gather Twitter data for analysis and many R and Python (et al) libraries make full use of the Twitter API when building a corpus to extract useful metadata for each tweet along with the text of each tweet. However, many corpus archives are minimal and\u2026","rel":"","context":"In &quot;Apache Drill&quot;","block_context":{"text":"Apache Drill","link":"https:\/\/rud.is\/b\/category\/apache-drill\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4154,"url":"https:\/\/rud.is\/b\/2016\/03\/18\/stacking-the-deck-against-treemaps\/","url_meta":{"origin":12114,"position":2},"title":"Stacking the deck against treemaps","author":"hrbrmstr","date":"2016-03-18","format":false,"excerpt":"So, I (unapologetically) did this to @Highcharts last week: @hrbrmstr Your loss of words inspired this post!! https:\/\/t.co\/3KO0BP0k0u @hadleywickham @ma_salmon @tdmv @bearloga @rushworth_a @awhstin\u2014 Highcharts (@Highcharts) March 18, 2016 They did an awesome makeover (it's interactive if you follow the link): And, I'm not kidding, it's actually a really good\u2026","rel":"","context":"In &quot;Data Visualization&quot;","block_context":{"text":"Data Visualization","link":"https:\/\/rud.is\/b\/category\/data-visualization\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":12749,"url":"https:\/\/rud.is\/b\/2020\/05\/16\/attach-your-r-code-to-charts-you-tweet-for-reproducible-r-tweets\/","url_meta":{"origin":12114,"position":3},"title":"Attach Your R Code To Charts You Tweet For Reproducible R Tweets!","author":"hrbrmstr","date":"2020-05-16","format":false,"excerpt":"I caught this tweet by Terence Eden about using Twitter image alt-text to \"PGP sign\" tweet and my mind immediately went to \"how can I abuse this for covert communications, malicious command-and-control, and embedding R code in tweets?\". When you paste or upload an image to tweet (web interface, at\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":10121,"url":"https:\/\/rud.is\/b\/2018\/04\/20\/painless-odbc-dplyr-connections-to-amazon-athena-and-apache-drill-with-r-odbc\/","url_meta":{"origin":12114,"position":4},"title":"Painless ODBC  + dplyr Connections to Amazon Athena and Apache Drill with R &#038; odbc","author":"hrbrmstr","date":"2018-04-20","format":false,"excerpt":"I spent some time this morning upgrading the JDBC driver (and changing up some supporting code to account for changes to it) for my metis package? which connects R up to Amazon Athena via RJDBC. I'm used to JDBC and have to deal with Java separately from R so I'm\u2026","rel":"","context":"In &quot;Apache Drill&quot;","block_context":{"text":"Apache Drill","link":"https:\/\/rud.is\/b\/category\/apache-drill\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2425,"url":"https:\/\/rud.is\/b\/2013\/04\/10\/bahrain-egov-conference-risk-reality-slides\/","url_meta":{"origin":12114,"position":5},"title":"Bahrain eGov Conference &#8220;Risk Reality&#8221; Slides","author":"hrbrmstr","date":"2013-04-10","format":false,"excerpt":"For those finding this post from the Bahrain eGov conference, I'd like to re-extend a hearty \"Thank you!\" for being one of most engaging, interactive and intelligent audiences I've ever experienced. I truly enjoyed talking with all of you. You can find the slides on my Dropbox [PDF] and please\u2026","rel":"","context":"In &quot;Information Security&quot;","block_context":{"text":"Information Security","link":"https:\/\/rud.is\/b\/category\/information-security\/"},"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\/12114","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=12114"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/12114\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=12114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=12114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=12114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}