{"id":2217,"date":"2016-04-03T03:45:04","date_gmt":"2016-04-03T03:45:03","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2217"},"modified":"2019-04-01T04:15:35","modified_gmt":"2019-04-01T11:15:35","slug":"exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/","title":{"rendered":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data"},"content":{"rendered":"<h2>Part 5: Graphing<\/h2>\n<h4>Necessary Materials:<\/h4>\n<ul>\n<li>Node.js<\/li>\n<li>Express<\/li>\n<li>Chart.js<\/li>\n<\/ul>\n<h4>Node Modules Used:<\/h4>\n<ul>\n<li><a href=\"https:\/\/carlcraig.github.io\/tc-angular-chartjs\/\">tc-angular-chartjs<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/expressjs\/body-parser\">body-parser<\/a><\/li>\n<li><a href=\"https:\/\/momentjs.com\/\">moment.js<\/a><\/li>\n<\/ul>\n<h4>Summary:<\/h4>\n<p>To maintain a social network, and improve the experience for an end-user, it&#8217;s important to keep track of information about these users and their usage habits. Much of this information may not seem immediately useful to the end-user, but one intersection of this tracking and useful end-user information is login times. This information is used in many different ways to optimize usage of these networks for the consumers (scale up nodes for peak traffic), as well as to track potential security concerns.<\/p>\n<p>Since this application concerns itself primarily with the basic bones of a social network, we use some graphing to analyze data we are collecting about the user.<\/p>\n<p>From the start we discussed the &#8216;timeTracker&#8217; object within each user document. This had a &#8216;loginTimes&#8217; attribute which we have been continually updating during every login with the <strong>&#8216;\/api\/loginAuth&#8217;<\/strong> endpoint. If this is new to you, refer back to part 2 where this endpoint was discussed at length. In essence, this endpoint continually prepends the latest time the user logs in to the array &#8216;loginTimes&#8217;. This is the data we will analyze using a N1QL query, as well as a Chart.js adaptation for Angular.js (tc-angular-chartjs), to display the information retrieved from the N1QL date query.<\/p>\n<p>Below, we have the statistics endpoint which is used to retrieve the data from each user&#8217;s &#8216;loginTimes&#8217; attribute, and return an object that the front-end graphing library can use to plot the site&#8217;s usage over time.<\/p>\n<h4>&#8216;\/api\/graphData&#8217; API<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/d245ebb79db87fe54fef.js\"><\/script><\/p>\n<p>This endpoint takes in one argument, which is the scope of time which should be displayed. In this case, the function either accepts &#8216;day&#8217; or &#8216;week&#8217;. This will return an array of either 24 integer values (&#8216;day&#8217;), or 7 integer values (&#8216;week&#8217;) depending on which type of date range is specified. The function that gets all of this data is <strong>&#8216;Statistics.newGraph&#8217;<\/strong>, which will create a N1QL query to get the values we desire. The function is shown below.<\/p>\n<h4>&#8216;Statistics.newGraph&#8217; function<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/cc80101d7edbfd36962c.js\"><\/script><\/p>\n<p>This incredibly long function is actually doing something very simple. There are three parts to this:<\/p>\n<ol>\n<li>Check the date range of &#8216;week&#8217; or &#8216;day&#8217;<\/li>\n<li>Execute N1QL query to group data by the last 7 days or the last 24 hours<\/li>\n<li>Use moment.js and arrays to create the proper order of the x-axis<\/li>\n<\/ol>\n<p>The first part of this is accomplished simply using &#8216;if\/else&#8217; statements. The next part gets slightly more complicated, so we will take a second to break down the N1QL query that is being executed, and how we understand what data it will retrieve for us.<\/p>\n<h4>N1QL date query example for past day<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/adf8f9baeb1489ac5189.js\"><\/script><\/p>\n<p>Let&#8217;s take the example of a &#8216;day&#8217; to understand the process. The way to look at it is that we first unnest all of the array elements into their own separate objects. In this way we can observe each one individually. After we <strong>UNNEST<\/strong> them, we find out how many hours ago each login time occured, from the time of the API request, which is done using <strong>DATE_DIFF_STR(STR_TO_UTC(NOW_STR())<\/strong>. We then take each of these times and <strong>GROUP BY<\/strong> how long ago they occured. Based on these groups, we get a <strong>COUNT<\/strong> of the number of times that are in that group (how many of these logins occured per hour). This gives us an array of objects that contain the number of hours ago these times occured, and a count that describes how many logins occured this many hours ago. Once we have this, we create a <strong>HAVING<\/strong> clause that checks to make sure the number of hours ago these happened does not exceed 24, so that we simply get one day; no more, no less. This now gives us exactly what we needed, which is an array of objects stratified by the number of hours ago each of these logins happened, as well as how many logins happened.<\/p>\n<p>After this, we take the array of objects, and place the login counts into an array, which is indexed based on the hour at which they happened. This array is initialized with 0s, such that there is no error with graphing undefined values. Once this is done, the process of handling data from the N1QL query is complete.<\/p>\n<p>That takes care of a bulk of the work, and now all we have to do is simply match these up with the proper hours and dates accordingly. We use a predefined array of either <strong>&#8216;hoursX&#8217;<\/strong> or <strong>&#8216;daysX&#8217;<\/strong> and loop through it to create the proper x-axis. Using the current day, which is found by moment.js, we then create a successful iterative pattern to find the according days and weeks. When we use the moment.js function for <strong>&#8216;moment().day();&#8217;<\/strong>, etc. we retrieve a day or hour indexed starting at 1. This is accounted for in the iterative pattern.<\/p>\n<h4>Front-end usage<\/h4>\n<p>Once both of these arrays are created\/obtained, there is no more work to be done, other than on the front-end. We simply return these two arrays to the API endpoint in the form of <strong>&#8216;graphObj&#8217;<\/strong> and then send them back to the client in our <strong>&#8216;\/api\/graphData&#8217;<\/strong> endpoint. This completes the back-end work. A set of example code of using this with tc-angular-chartjs can be seen in the github repo in <strong>public\/js\/touchbase.js<\/strong> under &#8216;statisticsController&#8217;, and the HTML for it can be seen in <strong>public\/html\/statistics-partial.html<\/strong>.<\/p>\n<p>That concludes the graphing portion of the Touchbase tutorial. Please comment below with any feedback or criticism. Thanks for reading, and hope you have an easier time making beautiful charts using N1QL date queries and a great front-end graphing library!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 5: Graphing Necessary Materials: Node.js Express Chart.js Node Modules Used: tc-angular-chartjs body-parser moment.js Summary: To maintain a social network, and improve the experience for an end-user, it&#8217;s important to keep track of information about these users and their usage [&hellip;]<\/p>\n","protected":false},"author":60,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1819,1822,1812],"tags":[],"ppma_author":[9034],"class_list":["post-2217","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-modeling","category-node-js","category-n1ql-query"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Graph user data using N!QL date queries- The Couchbase Blog<\/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:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data\" \/>\n<meta property=\"og:description\" content=\"Part 5: Graphing Necessary Materials: Node.js Express Chart.js Node Modules Used: tc-angular-chartjs body-parser moment.js Summary: To maintain a social network, and improve the experience for an end-user, it&#8217;s important to keep track of information about these users and their usage [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-03T03:45:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-01T11:15:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pranav Mayuram\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pranav Mayuram\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\"},\"author\":{\"name\":\"Pranav Mayuram\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa\"},\"headline\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data\",\"datePublished\":\"2016-04-03T03:45:03+00:00\",\"dateModified\":\"2019-04-01T11:15:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\"},\"wordCount\":979,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Data Modeling\",\"Node.js\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\",\"name\":\"Graph user data using N!QL date queries- The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-04-03T03:45:03+00:00\",\"dateModified\":\"2019-04-01T11:15:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data\"}]},{\"@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\/454261061bad5159ad2696e0bf162eaa\",\"name\":\"Pranav Mayuram\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/61baa4ff0f18aa9a8ce672f0f97f1ac0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"caption\":\"Pranav Mayuram\"},\"description\":\"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/pranav-mayuram\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Graph user data using N!QL date queries- The Couchbase Blog","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\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/","og_locale":"en_US","og_type":"article","og_title":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data","og_description":"Part 5: Graphing Necessary Materials: Node.js Express Chart.js Node Modules Used: tc-angular-chartjs body-parser moment.js Summary: To maintain a social network, and improve the experience for an end-user, it&#8217;s important to keep track of information about these users and their usage [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-04-03T03:45:03+00:00","article_modified_time":"2019-04-01T11:15:35+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Pranav Mayuram","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pranav Mayuram","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/"},"author":{"name":"Pranav Mayuram","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa"},"headline":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data","datePublished":"2016-04-03T03:45:03+00:00","dateModified":"2019-04-01T11:15:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/"},"wordCount":979,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Data Modeling","Node.js","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/","url":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/","name":"Graph user data using N!QL date queries- The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-04-03T03:45:03+00:00","dateModified":"2019-04-01T11:15:35+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-5-graphing-user-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 5: Graphing User Data"}]},{"@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\/454261061bad5159ad2696e0bf162eaa","name":"Pranav Mayuram","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/61baa4ff0f18aa9a8ce672f0f97f1ac0","url":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","caption":"Pranav Mayuram"},"description":"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.","url":"https:\/\/www.couchbase.com\/blog\/author\/pranav-mayuram\/"}]}},"authors":[{"term_id":9034,"user_id":60,"is_guest":0,"slug":"pranav-mayuram","display_name":"Pranav Mayuram","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","author_category":"","last_name":"Mayuram","first_name":"Pranav","job_title":"","user_url":"","description":"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2217","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\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2217"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2217\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2217"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}