

{"id":3469,"date":"2015-06-19T18:07:08","date_gmt":"2015-06-19T23:07:08","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3469"},"modified":"2018-03-07T16:43:48","modified_gmt":"2018-03-07T21:43:48","slug":"do-something-nifffty-with-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/","title":{"rendered":"DO Something Nifffty with R"},"content":{"rendered":"<p>@briandconnelly (of [pushoverr](http:\/\/crantastic.org\/authors\/4002) fame) made a super-cool post about [connecting R](http:\/\/bconnelly.net\/2015\/06\/connecting-r-to-everything-with-ifttt\/) to @IFTTT via IFTTT&#8217;s &#8220;Maker&#8221; channel. The IFTTT Maker interface to receive events is fairly straightforward and Brian&#8217;s code worked flawlessly, so it was easy to tweak a bit and [wrap into a package](https:\/\/github.com\/hrbrmstr\/nifffty). <\/p>\n<p>To get started, you can clone an [example public IFTTT recipe](https:\/\/ifttt.com\/recipes\/300804-post-maker-event-values-to-dropbox-file) that posts data to a Dropbox folder. All you need to do is add the IFTTT channel to your account and add the API key to your `.Renviron` file, which will look something like:<\/p>\n<pre lang=\"shell\">IFTTT_API_KEY=uGlySTringOfCharACTers-<\/pre>\n<p>Sticking it in the `.Renviron` file is a nice platform-independent way of getting the variable in your environment (and you can set a similar environment variable in Travis for automated testing). NOTE that you&#8217;ll need to restart your R\/RStudio session for that value to become available (what, you don&#8217;t have RStudio up all the time?).<\/p>\n<p>Once you have the key in place and the IFTTT recipe setup, all you have to do is:<\/p>\n<pre lang=\"rsplus\">devtools::install_github(\"hrbrmstr\/nifffty\")\r\nlibrary(nifffty)\r\nmaker(\"rtest\", \"this\", \"is a\", \"test\")<\/pre>\n<p>and you&#8217;ll have a file named something like `june_19__2015_at_0927am.txt` in a Dropbox folder that should have values like:<\/p>\n<pre lang=\"text\">Value 1: this\r\nValue 2: is a\r\nValue 3: test<\/pre>\n<p>The potential IFTTT integrations are not limited to Dropbox (or iOS\/Android notification as in Brian&#8217;s example). You can literally trigger _anything_ from R in the IFTTT catalogue. Go foRth and automate!<\/p>\n<p>### DOing even MoRe<\/p>\n<p>As stated, Brian&#8217;s code was complete, so making a package to post to IFTTT&#8217;s Maker channel was really easy. But, this is R and if we can get data _to_ it, things can be _even cooler_. So, I made a `receiver` function that will catch Maker channel web requests and do stuff with them.  Since I have an Apple Watch, I decided I wanted to test the interface out with IFTTT&#8217;s [DO button](http:\/\/blog.ifttt.com\/post\/116563004243\/do-for-ipad-and-apple-watch) and have R receive my coordinates whenever I press this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3474\" data-permalink=\"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/img_0853\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?fit=312%2C390&amp;ssl=1\" data-orig-size=\"312,390\" 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=\"IMG_0853\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?fit=312%2C390&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?resize=312%2C390&#038;ssl=1\" alt=\"IMG_0853\" width=\"312\" height=\"390\" class=\"aligncenter size-full wp-image-3474\" \/><\/a><\/p>\n<p>(That&#8217;s an actual screen capture from the Apple Watch).<\/p>\n<p>If you have both R and an Apple Watch, you can create a DO app as such (NOTE that DO apps work fine on the iPhone _without_ an Apple Watch):<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/do_button_r_nifffty.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3475\" data-permalink=\"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/do_button_r_nifffty\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/do_button_r_nifffty.png?fit=777%2C1125&amp;ssl=1\" data-orig-size=\"777,1125\" 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=\"do_button_r_nifffty\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/do_button_r_nifffty.png?fit=510%2C738&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/do_button_r_nifffty.png?resize=510%2C738&#038;ssl=1\" alt=\"do_button_r_nifffty\" width=\"510\" height=\"738\" class=\"aligncenter size-full wp-image-3475\" \/><\/a><\/p>\n<p>That will `POST` a bit of JSON to whatever is listening for it. To get R to listen to it, you need to build a small script that I&#8217;ll call `listen.R`, create a function to process the data and register it with the instance of the [Rook](http:\/\/cran.r-project.org\/web\/packages\/Rook\/README.html) web server that it will automagically create for you. You can specify which IP address and\/or port to listen on as well. NOTE that this R server _must_ be reachable _from_ the internet, so you may need to do port forwarding if behind a NAT firewall.<\/p>\n<p>My sample `listen.R` looks like this:<\/p>\n<pre lang=\"rsplus\">library(nifffty)\r\n\r\n# not the best name for a function but it works\r\ndo_it <- function(req) {\r\n  require(jsonlite)\r\n  print(fromJSON(names(req$POST())))\r\n  writeLines(names(req$POST()), \"\/tmp\/bob.txt\")\r\n}\r\n\r\n# you can change the port to match what you put into IFTTT\r\nrcvr <- receiver(port=10999, handler=do_it)\r\n\r\n# this is not necessary but it's a good diagnostic for a test script\r\nprint(rcvr)\r\n\r\n# keeps the script alive\r\nwhile (TRUE) Sys.sleep(24 * 60 * 60)<\/pre>\n<p>You can run that from a command-line (I tested it on Ubuntu) as such:<\/p>\n<pre lang=\"shell\">bob@server:~$ Rscript listen.R\r\nLoading required package: methods\r\nLoading required package: Rook\r\nServer started on 0.0.0.0:10999\r\n[1] nifffty http:\/\/0.0.0.0:10999\/custom\/nifffty\r\n\r\nCall browse() with an index number or name to run an application.<\/pre>\n<p>When you tap the DO button on the Apple Watch, you'll see the following in the console:<\/p>\n<pre lang=\"rsplus\">Loading required package: jsonlite\r\n\r\nAttaching package: \u2018jsonlite\u2019\r\n\r\nThe following object is masked from \u2018package:utils\u2019:\r\n\r\n    View\r\n\r\n$latitude\r\n[1] 43.25931\r\n\r\n$longitude\r\n[1] -70.80062\r\n\r\n$timestamp\r\n[1] \"June 19, 2015 at 04:45PM\"<\/pre>\n<p>and the following in the file it was instructed to write to:<\/p>\n<pre lang=\"shell\">bob@server:~$ cat \/tmp\/bob.txt\r\n{ \"latitude\": 43.2593566552207, \"longitude\": -70.8004647307757, \"timestamp\": \"June 19, 2015 at 04:46PM\" }<\/pre>\n<p>JSON is a good choice given how easy it is to work with in R and you can have R do _anything_ you can dream up with the data that's sent to it. You can connect _any_ supported IFTTT component and hook any variable from said component into the JSON that R will receive.<\/p>\n<p>### Coming Soon<\/p>\n<p>The next step is to make a Shiny interface so it can receive and process real-time events. I'm hoping to make a sample Shiny app that will update my location on a map every time I tap the DO button and also compute some stats for it. I also need to put some polish on the receiver interface (add logging and some error checking).<\/p>\n<p>If you have cool ideas or have hooked R up to IFTTT's Maker channel to do something cool, drop a note in the comments and definitely submit any pull requests or issues [on github](https:\/\/github.com\/hrbrmstr\/nifffty).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>@briandconnelly (of [pushoverr](http:\/\/crantastic.org\/authors\/4002) fame) made a super-cool post about [connecting R](http:\/\/bconnelly.net\/2015\/06\/connecting-r-to-everything-with-ifttt\/) to @IFTTT via IFTTT&#8217;s &#8220;Maker&#8221; channel. The IFTTT Maker interface to receive events is fairly straightforward and Brian&#8217;s code worked flawlessly, so it was easy to tweak a bit and [wrap into a package](https:\/\/github.com\/hrbrmstr\/nifffty). To get started, you can clone an [example public IFTTT [&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":[729,728,727,91],"tags":[810],"class_list":["post-3469","post","type-post","status-publish","format-standard","hentry","category-apple-watch","category-automation","category-ifttt","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>DO Something Nifffty with R - 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\/2015\/06\/19\/do-something-nifffty-with-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DO Something Nifffty with R - rud.is\" \/>\n<meta property=\"og:description\" content=\"@briandconnelly (of [pushoverr](http:\/\/crantastic.org\/authors\/4002) fame) made a super-cool post about [connecting R](http:\/\/bconnelly.net\/2015\/06\/connecting-r-to-everything-with-ifttt\/) to @IFTTT via IFTTT&#8217;s &#8220;Maker&#8221; channel. The IFTTT Maker interface to receive events is fairly straightforward and Brian&#8217;s code worked flawlessly, so it was easy to tweak a bit and [wrap into a package](https:\/\/github.com\/hrbrmstr\/nifffty). To get started, you can clone an [example public IFTTT [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-19T23:07:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:43:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"DO Something Nifffty with R\",\"datePublished\":\"2015-06-19T23:07:08+00:00\",\"dateModified\":\"2018-03-07T21:43:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/\"},\"wordCount\":699,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/IMG_0853.png\",\"keywords\":[\"post\"],\"articleSection\":[\"Apple Watch\",\"automation\",\"IFTTT\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/\",\"name\":\"DO Something Nifffty with R - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/IMG_0853.png\",\"datePublished\":\"2015-06-19T23:07:08+00:00\",\"dateModified\":\"2018-03-07T21:43:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/IMG_0853.png?fit=312%2C390&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/IMG_0853.png?fit=312%2C390&ssl=1\",\"width\":312,\"height\":390},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/06\\\/19\\\/do-something-nifffty-with-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DO Something Nifffty with R\"}]},{\"@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":"DO Something Nifffty with R - 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\/2015\/06\/19\/do-something-nifffty-with-r\/","og_locale":"en_US","og_type":"article","og_title":"DO Something Nifffty with R - rud.is","og_description":"@briandconnelly (of [pushoverr](http:\/\/crantastic.org\/authors\/4002) fame) made a super-cool post about [connecting R](http:\/\/bconnelly.net\/2015\/06\/connecting-r-to-everything-with-ifttt\/) to @IFTTT via IFTTT&#8217;s &#8220;Maker&#8221; channel. The IFTTT Maker interface to receive events is fairly straightforward and Brian&#8217;s code worked flawlessly, so it was easy to tweak a bit and [wrap into a package](https:\/\/github.com\/hrbrmstr\/nifffty). To get started, you can clone an [example public IFTTT [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/","og_site_name":"rud.is","article_published_time":"2015-06-19T23:07:08+00:00","article_modified_time":"2018-03-07T21:43:48+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png","type":"","width":"","height":""}],"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\/2015\/06\/19\/do-something-nifffty-with-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"DO Something Nifffty with R","datePublished":"2015-06-19T23:07:08+00:00","dateModified":"2018-03-07T21:43:48+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/"},"wordCount":699,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png","keywords":["post"],"articleSection":["Apple Watch","automation","IFTTT","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/","url":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/","name":"DO Something Nifffty with R - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png","datePublished":"2015-06-19T23:07:08+00:00","dateModified":"2018-03-07T21:43:48+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?fit=312%2C390&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/06\/IMG_0853.png?fit=312%2C390&ssl=1","width":312,"height":390},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/06\/19\/do-something-nifffty-with-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"DO Something Nifffty with R"}]},{"@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-TX","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3558,"url":"https:\/\/rud.is\/b\/2015\/07\/25\/roll-your-own-gist-comments-notifier-in-r\/","url_meta":{"origin":3469,"position":0},"title":"Roll Your Own Gist Comments Notifier in R","author":"hrbrmstr","date":"2015-07-25","format":false,"excerpt":"As I was putting together the [coord_proj](https:\/\/rud.is\/b\/2015\/07\/24\/a-path-towards-easier-map-projection-machinations-with-ggplot2\/) ggplot2 extension I had posted a (https:\/\/gist.github.com\/hrbrmstr\/363e33f74e2972c93ca7) that I shared on Twitter. Said gist received a comment (several, in fact) and a bunch of us were painfully reminded of the fact that there is no built-in way to receive notifications from said comment\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":3672,"url":"https:\/\/rud.is\/b\/2015\/09\/10\/a-better-way-to-read-nest-data-into-r\/","url_meta":{"origin":3469,"position":1},"title":"A Better Way To Read Nest Data Into R","author":"hrbrmstr","date":"2015-09-10","format":false,"excerpt":"I glimpsed a [post](http:\/\/blagrants.blogspot.com\/2015\/09\/nest-thermostat-and-r-creating-shiny.html) in the RSS feeds today on how to connect Nest data with a Shiny dashboard and was compelled to post a less brute-force way to get data from the Nest API. The authors of the Shiny+Nest post used `system` calls to `curl` and regular expression character\u2026","rel":"","context":"In &quot;APIs&quot;","block_context":{"text":"APIs","link":"https:\/\/rud.is\/b\/category\/apis\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4696,"url":"https:\/\/rud.is\/b\/2016\/12\/05\/interacting-with-amazon-athena-from-r\/","url_meta":{"origin":3469,"position":2},"title":"Interacting With Amazon Athena from R","author":"hrbrmstr","date":"2016-12-05","format":false,"excerpt":"This is a short post for those looking to test out Amazon Athena with R. Amazon makes Athena available via JDBC, so you can use RJDBC to query data. All you need is their JAR file and some setup information. Here's how to get the JAR file to the current\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3662,"url":"https:\/\/rud.is\/b\/2015\/09\/06\/three-new-rstats-twitter-bots-to-follow\/","url_meta":{"origin":3469,"position":3},"title":"Three New #rstats Twitter Bots To Follow","author":"hrbrmstr","date":"2015-09-06","format":false,"excerpt":"I engage with the Stack[Overflow|Exchange] community quite a bit and was super-happy @treycausey made the [Stack Overflow #rstats bot](https:\/\/twitter.com\/StackOverflowR) (@StackOverflowR) since I'm also on Twitter alot (mostly hanging out in #rstats these days). However, #rstats questions exist in other Stack watering holes, like the [Geographic Information Systems Stack Exchange](http:\/\/gis.stackexchange.com\/questions\/tagged\/r). [Cross\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11859,"url":"https:\/\/rud.is\/b\/2019\/02\/03\/r-package-update-urlscan\/","url_meta":{"origin":3469,"position":4},"title":"R Package Update: urlscan","author":"hrbrmstr","date":"2019-02-03","format":false,"excerpt":"The urlscan? package (an interface to the urlscan.io API) is now at version 0.2.0 and supports urlscan.io's authentication requirement when submitting a link for analysis. The service is handy if you want to learn about the details \u2014 all the gory technical details \u2014 for a website. For instance, say\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":5954,"url":"https:\/\/rud.is\/b\/2017\/05\/16\/r%e2%81%b6-using-r-with-amazon-athena-awas-temporary-security-credentials\/","url_meta":{"origin":3469,"position":5},"title":"R\u2076 \u2014 Using R With Amazon Athena &#038; AWS Temporary Security Credentials","author":"hrbrmstr","date":"2017-05-16","format":false,"excerpt":"Most of the examples of working with most of the AWS services show basic username & password authentication. That's all well-and-good, but many shops use the AWS Security Token Service to provide temporary credentials and session tokens to limit exposure and provide more uniform multi-factor authentication. At my workplace, Frank\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":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3469","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=3469"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3469\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}