{"id":3860,"date":"2017-07-24T08:36:32","date_gmt":"2017-07-24T15:36:32","guid":{"rendered":"http:\/\/www.couchbase.com\/blog\/?p=3860"},"modified":"2022-07-06T06:31:37","modified_gmt":"2022-07-06T13:31:37","slug":"using-couchbase-r","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/","title":{"rendered":"Using Couchbase with R"},"content":{"rendered":"<p>I have seen a lot of interest in the field about using Couchbase with R. It is an easy integration, so here you have some examples to start using it right now.<\/p>\n<p>As a little background, R is a language and environment for statistical computing and graphics. You will find it in the firsts positions in best languages rankings for Data Analysis, Machine Learning or Data Crunching. Data Scientist use R as one of their most powerful tools.<\/p>\n<p>For data ingestion, R can load files in different formats like csv, excel, html, plain text, and more with a simple command line. R can also load data from remote sites using HTTP, and can easily work with JSON.<\/p>\n<p>With all of this in mind, how can we load data from Couchbase into R? Do we need a special adapter? N1QL is the answer. Couchbase query engine accept REST requests, returning JSON documents, so we can directly import data into R. No extra components needed.<\/p>\n<p>Here you have some examples with data from the \u201ctravel-sample\u201d bucket, included in Couchbase as an example data set. I am using here the versions R 3.4.1 and Couchbase 4.6.2.<\/p>\n<p>As first exercise, let us load the top 20 airline companies with more flights in our system. We will load this data into an R Data Frame, show the results in the console and built a simple bar graph.<\/p>\n<p>From Couchbase side, this is the query to run:<\/p>\n<pre class=\"\">SELECT a.name, count(*) as total_flights\r\n\u00a0 FROM `travel-sample` r JOIN `travel-sample` a ON KEYS r.airlineid\r\n\u00a0 WHERE r.type =\"route\" AND a.type=\"airline\"\r\n\u00a0 GROUP BY a.name\r\n\u00a0 ORDER BY total_flights DESC\r\n\u00a0 LIMIT 20<\/pre>\n<p>For the R side, we will use the R Console. First, we have to import the libraries used in this exercise:<\/p>\n<pre class=\"lang:r decode:true\">library(httr)\r\nlibrary(jsonlite)\r\nlibrary(ggplot2)\r\nlibrary(leaflet)<\/pre>\n<p>Next step is to build some variables, including the Couchbase Query node address and the query. Note the escaped double quotes (\\&#8221;):<\/p>\n<pre class=\"wrap:true lang:r decode:true\">cbServer &lt;- \"https:\/\/cb451box:8093\/query\/service\"\r\nquery &lt;- \"SELECT a.name, count(*) as total_flights FROM `travel-sample` r JOIN `travel-sample` a ON KEYS r.airlineid WHERE r.type =\\\"route\\\" AND a.type=\\\"airline\\\" GROUP BY a.name ORDER BY total_flights DESC LIMIT 20\"<\/pre>\n<p>Then we must construct the HTTP request, and read the response in JSON format:<\/p>\n<pre class=\"wrap:true lang:r decode:true\">req &lt;- httr::POST(cbServer, httr::add_headers(\"Content-Type\" = \"application\/x-www-form-urlencoded;charset=UTF-8\"), body = paste(\"statement=\", query))\r\nres &lt;- fromJSON(httr::content(req, \"text\"))<\/pre>\n<p><strong>NOTE<\/strong>: If you are using a password protected bucket you have to include credentials as the following:<\/p>\n<pre class=\"wrap:true lang:r decode:true\">creds &lt;- \"[{\\\"user\\\":\\\"local:bucketName\\\", \\\"pass\\\":\\\"password\\\"}]\"\r\nreq &lt;- httr::POST(cbServer, httr::add_headers(\"Content-Type\" = \"application\/x-www-form-urlencoded;charset=UTF-8\"), body =\u00a0paste(\"statement=\", query, \"&amp;creds=\", creds));<\/pre>\n<p>Then we can save the result in a variable.<\/p>\n<pre class=\"lang:r decode:true\">airlineFlights &lt;- res$results<\/pre>\n<p>To see the value it is enough to type the variable name:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3862\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/airlines_cmd-267x300.jpg\" alt=\"\" width=\"369\" height=\"415\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines_cmd-267x300.jpg 267w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines_cmd-300x337.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines_cmd-18x20.jpg 18w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines_cmd.jpg 554w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\n<p>We can also build a bar graph using the ggplot library:<\/p>\n<pre class=\"wrap:true lang:r decode:true\">ggplot(data=airlineFlights, aes(x=name, y=total_flights)) + theme(axis.text.x=element_text(angle=90,hjust=1)) + geom_bar(stat=\"identity\")<\/pre>\n<p>This is the result:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3861\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/airlines-292x300.jpg\" alt=\"\" width=\"578\" height=\"593\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-292x300.jpg 292w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-996x1024.jpg 996w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-1494x1536.jpg 1494w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-50x50.jpg 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-300x309.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines-20x20.jpg 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/airlines.jpg 1548w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>As a second example, we are going to search for the available pet friendly hotels in London, and show them over a map.\u00a0The N1QL query is like this:<\/p>\n<pre class=\"\">SELECT name,geo.lat as lat,geo.lon as long\r\nFROM `travel-sample`\r\nWHERE type=\"hotel\" AND city=\"London\" AND pets_ok=true<\/pre>\n<p>The R code to execute the query and save results:<\/p>\n<pre class=\"wrap:true lang:r decode:true\">query &lt;- \"SELECT name, geo.lat as lat, geo.lon as long FROM `travel-sample` WHERE type=\\\"hotel\\\" AND city=\\\"London\\\" AND pets_ok=true\"\r\nreq &lt;- httr::POST(cbServer, httr::add_headers(\"Content-Type\" = \"application\/x-www-form-urlencoded;charset=UTF-8\"), body = paste(\"statement=\", query))\r\nres &lt;- fromJSON(httr::content(req, \"text\"))\r\npetFriendlyHotelsLondon &lt;- res$results<\/pre>\n<p>This are the results:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3864\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/petFriendlyHotelsLondon-274x300.jpg\" alt=\"\" width=\"527\" height=\"577\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon-274x300.jpg 274w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon-936x1024.jpg 936w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon-768x840.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon-300x328.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon-18x20.jpg 18w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/petFriendlyHotelsLondon.jpg 1006w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/p>\n<p>Now we can use the leaflet library for drawing the results over a map:<\/p>\n<pre class=\"wrap:true lang:r decode:true\">leaflet(data = petFriendlyHotelsLondon) %&gt;% addTiles() %&gt;% addMarkers(~long, ~lat, popup = ~as.character(name), label = ~as.character(name)) %&gt;% addProviderTiles(providers$OpenStreetMap)<\/pre>\n<p>The map is opened in a browser:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3863 aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/hotelsLondon-300x206.jpg\" alt=\"\" width=\"744\" height=\"511\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-300x206.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-1024x702.jpg 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-768x527.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-1536x1054.jpg 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-2048x1405.jpg 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-235x160.jpg 235w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-20x14.jpg 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/hotelsLondon-1320x905.jpg 1320w\" sizes=\"auto, (max-width: 744px) 100vw, 744px\" \/>That\u2019s all. I hope this is useful as first steps in using Couchbase from R. Happy Data Analysis!<\/p>\n<p>For more detail, visit:<br \/>\n<a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-rest-api\/index.html\">N1QL REST API reference<\/a><br \/>\n<a href=\"https:\/\/www.r-project.org\/\">R: The R Project for Statistical Computing<\/a><br \/>\n<a href=\"https:\/\/rstudio.github.io\/leaflet\/\">Leaflet for R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have seen a lot of interest in the field about using Couchbase with R. It is an easy integration, so here you have some examples to start using it right now. As a little background, R is a language [&hellip;]<\/p>\n","protected":false},"author":69,"featured_media":3865,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1816,1812],"tags":[2014,2013],"ppma_author":[9041],"class_list":["post-3860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","category-n1ql-query","tag-data-analysis","tag-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Using Couchbase with R - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Learn by example how to integrate Couchbase and R using N1QL and REST API\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Couchbase with R\" \/>\n<meta property=\"og:description\" content=\"Learn by example how to integrate Couchbase and R using N1QL and REST API\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-24T15:36:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-06T13:31:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/featuredR.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2036\" \/>\n\t<meta property=\"og:image:height\" content=\"1264\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Manuel Hurtado, Solutions Engineer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manuel Hurtado, Solutions Engineer, Couchbase\" \/>\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:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/\"},\"author\":{\"name\":\"Manuel Hurtado, Solutions Engineer, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/00c164bc72955b52cd86c966aafb9237\"},\"headline\":\"Using Couchbase with R\",\"datePublished\":\"2017-07-24T15:36:32+00:00\",\"dateModified\":\"2022-07-06T13:31:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/\"},\"wordCount\":455,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2017\\\/07\\\/featuredR.jpg\",\"keywords\":[\"Data Analysis\",\"R\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\",\"SQL++ \\\/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/\",\"name\":\"Using Couchbase with R - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2017\\\/07\\\/featuredR.jpg\",\"datePublished\":\"2017-07-24T15:36:32+00:00\",\"dateModified\":\"2022-07-06T13:31:37+00:00\",\"description\":\"Learn by example how to integrate Couchbase and R using N1QL and REST API\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2017\\\/07\\\/featuredR.jpg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2017\\\/07\\\/featuredR.jpg\",\"width\":2036,\"height\":1264},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/using-couchbase-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Couchbase with R\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/00c164bc72955b52cd86c966aafb9237\",\"name\":\"Manuel Hurtado, Solutions Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=gd792e93660734cc10c1f8a5bbc2cf29a\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=g\",\"caption\":\"Manuel Hurtado, Solutions Engineer, Couchbase\"},\"description\":\"Manuel is a Couchbase Solutions Engineer, with more than 15 years of experience helping companies to architect their systems, as developer, consultant, trainer and project manager. Happy to learn from the field how people use technology to success.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/manuel-hurtado\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using Couchbase with R - The Couchbase Blog","description":"Learn by example how to integrate Couchbase and R using N1QL and REST API","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:\/\/www.couchbase.com\/blog\/using-couchbase-r\/","og_locale":"en_US","og_type":"article","og_title":"Using Couchbase with R","og_description":"Learn by example how to integrate Couchbase and R using N1QL and REST API","og_url":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-07-24T15:36:32+00:00","article_modified_time":"2022-07-06T13:31:37+00:00","og_image":[{"width":2036,"height":1264,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/07\/featuredR.jpg","type":"image\/jpeg"}],"author":"Manuel Hurtado, Solutions Engineer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Manuel Hurtado, Solutions Engineer, Couchbase","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/"},"author":{"name":"Manuel Hurtado, Solutions Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/00c164bc72955b52cd86c966aafb9237"},"headline":"Using Couchbase with R","datePublished":"2017-07-24T15:36:32+00:00","dateModified":"2022-07-06T13:31:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/"},"wordCount":455,"commentCount":2,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/featuredR.jpg","keywords":["Data Analysis","R"],"articleSection":["Best Practices and Tutorials","Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/","url":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/","name":"Using Couchbase with R - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/featuredR.jpg","datePublished":"2017-07-24T15:36:32+00:00","dateModified":"2022-07-06T13:31:37+00:00","description":"Learn by example how to integrate Couchbase and R using N1QL and REST API","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/featuredR.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/07\/featuredR.jpg","width":2036,"height":1264},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/using-couchbase-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Couchbase with R"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/00c164bc72955b52cd86c966aafb9237","name":"Manuel Hurtado, Solutions Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=gd792e93660734cc10c1f8a5bbc2cf29a","url":"https:\/\/secure.gravatar.com\/avatar\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=g","caption":"Manuel Hurtado, Solutions Engineer, Couchbase"},"description":"Manuel is a Couchbase Solutions Engineer, with more than 15 years of experience helping companies to architect their systems, as developer, consultant, trainer and project manager. Happy to learn from the field how people use technology to success.","url":"https:\/\/www.couchbase.com\/blog\/author\/manuel-hurtado\/"}]}},"acf":[],"authors":[{"term_id":9041,"user_id":69,"is_guest":0,"slug":"manuel-hurtado","display_name":"Manuel Hurtado, Solutions Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/e8eced6ee14aeefdf82ebfb694cfa145280c2e206f819d892eb82d5fef8a6a25?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/69"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=3860"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3860\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/3865"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=3860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=3860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=3860"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=3860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}