Presenting data with Daru and Nyaplot on Rails

117 views
Skip to first unread message

Lokesh Sharma

unread,
Jun 12, 2016, 10:04:59 PM6/12/16
to SciRuby Development
I have come across a lot of people who wants an easy solution to deal with data and display graphs and other statistical measures in their web apps. And there are no easy solutions to this. If you google you will find how hard it is to have a working data analytic tool in any of the web framework. Even with rails there isn't a unified tool which could accomplish it. I see a great opportunity for Daru and Nyaplot here. What do you think?


Sameer Deshmukh

unread,
Jun 14, 2016, 8:01:12 AM6/14/16
to SciRuby Development
That's been going on in my mind for a while too. How do you think we should package this new tool? Can you share some of the use cases you came across so that we can get a better context?

Also, have a look at nyaplot_on_web: https://github.com/takahashim/nyaplot_on_web

Lokesh Sharma

unread,
Jun 15, 2016, 1:08:48 PM6/15/16
to SciRuby Development
Here's a small web app I created to see what problems one might face on showing real time analytics using Daru in Rails.

http://daru-rails.herokuapp.com/codes

I found out it was quite easy to make Daru work with Rails. You can follow the link, click the "New Code" button and add a name with number of code lines written by the user. On clicking "Create code" and the "back" you can now see the resultant vector shown using Daru::Vector.

It took like only 4 lines of code to link Active Record with Daru. But for more optimization I think we might need some work. But I'm confident that all the functionality of Daru can work without any effort in Rails.

Another important part which I want to accomplish is to try drawing plots using Nyaplot. "Nyaplot_on_web" doesn't seem to help here because we require something that could generate html for the directly. I will take a thorough look at that.

Sameer Deshmukh

unread,
Jun 15, 2016, 4:11:39 PM6/15/16
to SciRuby Development
Nyaplot::Frame has a to_html method that converts plots to HTML. I think that can be used.

Kenta Murata

unread,
Jun 17, 2016, 12:08:53 AM6/17/16
to SciRuby Development
I tried to integrate rails and iruby several months ago as my work in the previous company.

I've remembered the way to integrate iruby and rails, and made it a gem library just now.  It's named iruby-rails.  Check it out.

Github page is here:

2016年6月16日(木) 5:11 Sameer Deshmukh <sameer.d...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lokesh Sharma

unread,
Jun 17, 2016, 12:22:34 PM6/17/16
to SciRuby Development, mr...@mrkn.jp
I've remembered the way to integrate iruby and rails, and made it a gem library just now.  It's named iruby-rails.  Check it out.

Great. Just help me with one thing. I do not understand how it can be used inside rails. From what I understand from the README of the repo it seems that it loads rails environment into a running iruby notebook.

Thanks




Lokesh Sharma

unread,
Jun 19, 2016, 5:08:51 AM6/19/16
to SciRuby Development
Finally I was able to integrate Nyaplot with Rails. #to_iruby produced the html which helped me. You can view it here: http://daru-rails.herokuapp.com/

I will now try to create some meaningful web apps with power of Daru and Nyaplot now.
Reply all
Reply to author
Forward
0 new messages