title: Finding data trendlines with Ruby?
body: <p>I have a dataset with user session numbers from my site which looks like:</p>
  
  <pre><code>page_1 = [4,2,4,1,2,6,3,2,1,6,2,7,0,0,0]
  page_2 = [6,3,2,3,5,7,9,3,1,6,1,6,2,7,8]
  ...
  </code></pre>
  
  <p>And so on. </p>
  
  <p>I would like to find out whether the page has a positive or negative trendline in terms of growth, however I would also like to get the pages that are growing/falling beyond a certain threshold. </p>
  
  <p>Python has a ton of solutions and libs for this kind of task, yet Ruby has only one gem (<a href="https://github.com/rubylogicgems/trendline" rel="nofollow noreferrer">trendline</a>) which has no code in it. Before I start learning how to do this using math maybe somebody has a working solution?</p>