{"id":1130,"date":"2026-07-21T09:56:38","date_gmt":"2026-07-21T09:56:38","guid":{"rendered":"https:\/\/ruby-doc.org\/blog\/?p=1130"},"modified":"2026-09-15T15:48:14","modified_gmt":"2026-09-15T14:48:14","slug":"translating-data-science-logic-into-web-apps-a-developers-guide","status":"publish","type":"post","link":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/","title":{"rendered":"Translating Data Science Logic into Web Apps: A Developer&#8217;s Guide"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/07\/Translating-Data-Science-Logic-into-Web-Apps-1-1024x683.png\" alt=\"\" class=\"wp-image-1136\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Occasionally a Rails application needs to calculate something from the data in its database. This could be ranking products, summarizing sensor readings or forecasting potential sales from prior purchases. While Python is well-established in the field of data science, Ruby teams face a very practical decision \u2013 can the current application manage this requirement, or will a separate service be needed for this feature?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ruby has mathematical functions and collection tools, but imperfect input, memory usage and how quickly customers expect a result also matter. Consider these issues when designing your application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Leveraging Ruby&#8217;s Native Mathematical Modules<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, look at the&nbsp;<a href=\"https:\/\/ruby-doc.org\/core-3.1.1\/Math.html\">standard Math module<\/a>, which provides trigonometric and transcendental functions through calls to C library routines in CRuby. By using native functions, you don&#8217;t have to write common calculations yourself, though a native function does not guarantee that the whole algorithm will be fast.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use&nbsp;<code>Math.erf<\/code>&nbsp;(error function), and&nbsp;<code>Math.erfc<\/code>&nbsp;(its complementary error function), for probability-related calculations. At large negative and positive values, the error function approaches -1 and +1 respectively; since these values are rounded off to the nearest float, they can sometimes appear to be exactly -1 and +1. There is also&nbsp;<code>Math.frexp<\/code>, which returns a fraction and a base two exponent that together represent a float.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose your numeric types deliberately. The\u00a0Complex class\u00a0allows you to define Complex numbers (numbers with real and imaginary parts), and supports basic arithmetic operations, division operations, and power operations. However, using Complex does not eliminate rounding errors if you perform operations on floating point values. Use\u00a0<code>Rational<\/code>\u00a0when you need exact fractional arithmetic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compare floating point results with an acceptable tolerance related to your problem. Even a simple calculation has an input contract. What happens when the dataset is empty? Should missing readings cause an error? Or should your application exclude them? With a numeric array named&nbsp;<code>scores<\/code>,&nbsp;<code>scores.sum.fdiv(scores.length)<\/code>&nbsp;calculates a floating-point mean. Before attempting to reach that expression, check for an empty array. Your determination of &#8220;no readings&#8221; is part of defining the calculation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Clustering and Transformation via Enumerables<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using&nbsp;<a href=\"https:\/\/ruby-doc.org\/core-3.1.1\/Enumerable.html\">the Enumerable mixin<\/a>, Ruby developers can apply rules to group and filter collections.&nbsp;<code>group_by<\/code>&nbsp;collects elements under a key returned by a block.&nbsp;<code>partition<\/code>&nbsp;divides elements into matching and nonmatching groups. These methods help organize data, but they do not themselves perform statistical clustering such as k-means.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Enumerable method<\/th><th class=\"has-text-align-left\" data-align=\"left\">Return type<\/th><th class=\"has-text-align-left\" data-align=\"left\">Algorithmic use case<\/th><\/tr><\/thead><tbody><tr><td><code>chunk {... }<\/code><\/td><td>Enumerator<\/td><td>Creates groups of consecutive elements returning the same key produced by a block; useful for runs in ordered readings.<\/td><\/tr><tr><td><code>minmax_by {... }<\/code><\/td><td>Array<\/td><td>Returns the minimum and maximum element(s) based on a scoring block; returns two nil values if the input is empty.<\/td><\/tr><tr><td><code>slice_after {... }<\/code><\/td><td>Enumerator<\/td><td>Ends each group after an element satisfies a condition, such as a marker that signals the end of a batch.<\/td><\/tr><tr><td><code>tally<\/code><\/td><td>Hash<\/td><td>Tallies how many times each distinct value appears; e.g., labels or response codes.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Grouping an entire collection differs from finding consecutive runs. Sorting the input first can change the meaning and cost of the operation. Note that&nbsp;<code>group_by<\/code>&nbsp;stores the collected elements in memory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can create an\u00a0<a href=\"https:\/\/docs.ruby-lang.org\/en\/master\/Enumerator\/Chain.html\">Enumerator::Chain<\/a>\u00a0to visit several enumerators sequentially without first merging them together into one array. Chain does not make all later operations lazy. Use\u00a0Enumerator::Lazy\u00a0for supported filtering\/mapping steps that are designed to run on-demand. Storing all results in an array with\u00a0<code>to_a<\/code>\u00a0still requires memory to hold those results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Rails, first find out if the database can handle the aggregation. Active Record supports\u00a0<code>group<\/code>,\u00a0<code>count<\/code>,\u00a0<code>sum<\/code>\u00a0and\u00a0<code>average<\/code>\u00a0aggregations which avoid loading model objects just to get totals. If the calculation needs each record in Ruby, use\u00a0<code>find_each<\/code>\u00a0to fetch records in batches. Be aware of the order that\u00a0<code>find_each<\/code>\u00a0will traverse through the records when the algorithm depends on a particular sequence. See\u00a0the Active Record querying guide\u00a0for both approaches.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Architecting Algorithmic Services and Complexity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once the calculation grows, a Plain Old Ruby Object (PORO) provides a home for the logic outside the controller and makes it easier to test. Calling a PORO from a controller still executes that work during the request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a small service object that accepts a validated numeric array and returns the count and mean:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class ReadingSummary\n  def call(readings)\n    return { count: 0, mean: nil } if readings.empty?\n\n    {\n      count: readings.length,\n      mean: readings.sum.fdiv(readings.length)\n    }\n  end\nend\n\nReadingSummary.new.call(&#91;12, 18, 24])\n# =&gt; { count: 3, mean: 18.0 }<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The application handles database access and validates the input; the object handles the calculation. Tests can cover empty input, a single reading and known results without invoking any controller code. More complicated statistical methods can follow the same boundary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check runtime using a realistic amount of input. Some calculations will produce quadratic growth when every record is compared against every other record. For graph coloring, a scheduling heuristic is different from a search for an optimal coloring. Identify the actual algorithm before assigning a complexity label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the calculation takes too long for a web request,\u00a0Active Job\u00a0allows you to enqueue jobs into your Rails application via methods such as\u00a0<code>perform_later<\/code>. Once you have configured a suitable queue backend and running workers, you can save the calculation&#8217;s result so your application can retrieve it. Using jobs changes where and when the calculation is performed &#8211; it does not reduce the calculation&#8217;s CPU or memory requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Domain knowledge matters too.&nbsp;<a href=\"https:\/\/www.omnicalculator.com\/authors\/rijk-de-wet\">Rijk de Wet<\/a>, a developer at Omni Calculator, has a data-science background that includes building and evaluating a swarm-intelligence clustering algorithm. His calculator work covers mathematics and engineering. When developing similar tools in Ruby, the practical lesson here is to critically evaluate the assumptions of your model alongside the implementation of its results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The debate about language choice&nbsp;<a href=\"https:\/\/news.ycombinator.com\/item?id=48100433\">remains<\/a>&nbsp;active among developers. For a team developing a Rails application, start by understanding what your calculation needs to perform and how much computing power that calculation needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ruby&#8217;s Math and Enumerable tools allow you to support useful application-level analysis. Active Record supports database aggregation which helps reduce the number of records Ruby processes. Additionally, writing custom logic inside a smaller service object makes testing your custom logic simpler. When the calculation takes too long for a request, consider a properly configured job system or a specialized numerical service. Base the choice on measured behavior, required accuracy and the tools the calculation needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Occasionally a Rails application needs to calculate something from the data in its database. This could be ranking products, summarizing sensor readings or forecasting potential sales from prior purchases. While Python is well-established in the field of data science, Ruby teams face a very practical decision \u2013 can the current application manage this requirement, or [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1130","post","type-post","status-publish","format-standard","hentry","category-programming"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":7}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Translating Data Science Logic into Web Apps: A Developer&#039;s Guide - Ruby-Doc Learn<\/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:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Translating Data Science Logic into Web Apps: A Developer&#039;s Guide - Ruby-Doc Learn\" \/>\n<meta property=\"og:description\" content=\"Occasionally a Rails application needs to calculate something from the data in its database. This could be ranking products, summarizing sensor readings or forecasting potential sales from prior purchases. While Python is well-established in the field of data science, Ruby teams face a very practical decision \u2013 can the current application manage this requirement, or [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Ruby-Doc Learn\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-21T09:56:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-15T14:48:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/07\/Translating-Data-Science-Logic-into-Web-Apps.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"James Britt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Britt\" \/>\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:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/james-britt\\\/#james-britt\"},\"headline\":\"Translating Data Science Logic into Web Apps: A Developer&#8217;s Guide\",\"datePublished\":\"2026-07-21T09:56:38+00:00\",\"dateModified\":\"2026-09-15T14:48:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/\"},\"wordCount\":1033,\"publisher\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Translating-Data-Science-Logic-into-Web-Apps-1-1024x683.png\",\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/\",\"url\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/\",\"name\":\"Translating Data Science Logic into Web Apps: A Developer's Guide - Ruby-Doc Learn\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Translating-Data-Science-Logic-into-Web-Apps-1-1024x683.png\",\"datePublished\":\"2026-07-21T09:56:38+00:00\",\"dateModified\":\"2026-09-15T14:48:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/translating-data-science-logic-into-web-apps-a-developers-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Translating Data Science Logic into Web Apps: A Developer&#8217;s Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#website\",\"url\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/\",\"name\":\"Ruby-Doc Learn\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#organization\",\"name\":\"Ruby-Doc Learn\",\"url\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/ruby-doc-logo-transparent.png\",\"contentUrl\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/ruby-doc-logo-transparent.png\",\"width\":1650,\"height\":305,\"caption\":\"Ruby-Doc Learn\"},\"image\":{\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/james-britt\\\/#james-britt\",\"name\":\"James Britt\",\"image\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/jgb_self-portrait-20140914.png\",\"description\":\"Creator and long-term maintainer of Ruby-Doc.org, founder of Neurogami, and author of practical Ruby tutorials for Ruby-Doc Learn.\",\"sameAs\":[\"https:\\\/\\\/jamesbritt.com\\\/\",\"https:\\\/\\\/neurogami.com\\\/\",\"https:\\\/\\\/www.oreilly.com\\\/pub\\\/au\\\/2595\",\"https:\\\/\\\/www.rubyevents.org\\\/profiles\\\/james-britt\"],\"url\":\"https:\\\/\\\/ruby-doc.org\\\/learn\\\/james-britt\\\/\",\"jobTitle\":\"Ruby developer and writer\",\"knowsAbout\":[\"Ruby programming language\",\"Ruby documentation\",\"JRuby\",\"Open Sound Control\",\"Software development\"],\"affiliation\":{\"@type\":\"Organization\",\"name\":\"Ruby-Doc.org\",\"url\":\"https:\\\/\\\/ruby-doc.org\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Translating Data Science Logic into Web Apps: A Developer's Guide - Ruby-Doc Learn","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:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/","og_locale":"en_US","og_type":"article","og_title":"Translating Data Science Logic into Web Apps: A Developer's Guide - Ruby-Doc Learn","og_description":"Occasionally a Rails application needs to calculate something from the data in its database. This could be ranking products, summarizing sensor readings or forecasting potential sales from prior purchases. While Python is well-established in the field of data science, Ruby teams face a very practical decision \u2013 can the current application manage this requirement, or [&hellip;]","og_url":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/","og_site_name":"Ruby-Doc Learn","article_published_time":"2026-07-21T09:56:38+00:00","article_modified_time":"2026-09-15T14:48:14+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/07\/Translating-Data-Science-Logic-into-Web-Apps.png","type":"image\/png"}],"author":"James Britt","twitter_card":"summary_large_image","twitter_misc":{"Written by":"James Britt","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#article","isPartOf":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/"},"author":{"@id":"https:\/\/ruby-doc.org\/learn\/james-britt\/#james-britt"},"headline":"Translating Data Science Logic into Web Apps: A Developer&#8217;s Guide","datePublished":"2026-07-21T09:56:38+00:00","dateModified":"2026-09-15T14:48:14+00:00","mainEntityOfPage":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/"},"wordCount":1033,"publisher":{"@id":"https:\/\/ruby-doc.org\/learn\/#organization"},"image":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/07\/Translating-Data-Science-Logic-into-Web-Apps-1-1024x683.png","articleSection":["Programming"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/","url":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/","name":"Translating Data Science Logic into Web Apps: A Developer's Guide - Ruby-Doc Learn","isPartOf":{"@id":"https:\/\/ruby-doc.org\/learn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#primaryimage"},"image":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/07\/Translating-Data-Science-Logic-into-Web-Apps-1-1024x683.png","datePublished":"2026-07-21T09:56:38+00:00","dateModified":"2026-09-15T14:48:14+00:00","breadcrumb":{"@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/ruby-doc.org\/learn\/translating-data-science-logic-into-web-apps-a-developers-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ruby-doc.org\/learn\/"},{"@type":"ListItem","position":2,"name":"Translating Data Science Logic into Web Apps: A Developer&#8217;s Guide"}]},{"@type":"WebSite","@id":"https:\/\/ruby-doc.org\/learn\/#website","url":"https:\/\/ruby-doc.org\/learn\/","name":"Ruby-Doc Learn","description":"","publisher":{"@id":"https:\/\/ruby-doc.org\/learn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ruby-doc.org\/learn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ruby-doc.org\/learn\/#organization","name":"Ruby-Doc Learn","url":"https:\/\/ruby-doc.org\/learn\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ruby-doc.org\/learn\/#\/schema\/logo\/image\/","url":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/09\/ruby-doc-logo-transparent.png","contentUrl":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/09\/ruby-doc-logo-transparent.png","width":1650,"height":305,"caption":"Ruby-Doc Learn"},"image":{"@id":"https:\/\/ruby-doc.org\/learn\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ruby-doc.org\/learn\/james-britt\/#james-britt","name":"James Britt","image":"https:\/\/ruby-doc.org\/learn\/wp-content\/uploads\/2026\/09\/jgb_self-portrait-20140914.png","description":"Creator and long-term maintainer of Ruby-Doc.org, founder of Neurogami, and author of practical Ruby tutorials for Ruby-Doc Learn.","sameAs":["https:\/\/jamesbritt.com\/","https:\/\/neurogami.com\/","https:\/\/www.oreilly.com\/pub\/au\/2595","https:\/\/www.rubyevents.org\/profiles\/james-britt"],"url":"https:\/\/ruby-doc.org\/learn\/james-britt\/","jobTitle":"Ruby developer and writer","knowsAbout":["Ruby programming language","Ruby documentation","JRuby","Open Sound Control","Software development"],"affiliation":{"@type":"Organization","name":"Ruby-Doc.org","url":"https:\/\/ruby-doc.org\/"}}]}},"_links":{"self":[{"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/posts\/1130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/comments?post=1130"}],"version-history":[{"count":2,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/posts\/1130\/revisions"}],"predecessor-version":[{"id":1636,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/posts\/1130\/revisions\/1636"}],"wp:attachment":[{"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/media?parent=1130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/categories?post=1130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ruby-doc.org\/learn\/wp-json\/wp\/v2\/tags?post=1130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}