title: How can I calculate data for a boxplot (quartiles, median) in a Rails app on Heroku? (Heroku uses Postgresql)
body: <p>I'm trying to calculate the data needed to generate a box plot which means I need to figure out the 1st and 3rd Quartiles along with the median.  I have found some solutions for doing it in Postgresql however they seem to depend on either PL/Python or PL/R which it seems like Heroku does not have either enabled for their postgresql databases.  In fact I ran "select lanname from pg_language;" and only got back "internal", "c", and "sql".</p>
  
  <p>I also found some code to do it in pure ruby but that seems somewhat inefficient to me.</p>
  
  <p>I'm rather new to Box Plots, Postgresql, and Ruby on Rails so I'm open to suggestions on how I should handle this.  There is a possibility to have a lot of data which is why I'm concerned with performance however if the solution ends up being too complex I may just do it in ruby and if my application gets big enough to warrant it get my own Postgresql I can host somewhere else.</p>
  
  <p>*note: since I was only able to post one link, cause I'm new, I decided to share a <a href="http://pastie.org/933226" rel="nofollow noreferrer">pastie</a> with some relevant information</p>