Coding Period Week - 6

Organization : SciRuby
Make Daru more ready for integration with modern Web framework

8 July 2017 - 15 July 2017

by Shekhar Prasad Rajak — Posted on July 8, 2017

Back to Main Blog Home page

Google charts tool continue & DataTables

8 july 2017 Report:

When you run this links : , it will just load the entire data into browser so it takes too much time and your browser crashes.

Same amount of data is loading in this link: and it is pretty fast to load and shows data according to the scrolling.

In both link I am loading 16042100 number of rows.

I am trying to understand some concepts in DataTables then I will try it with DataFrame.

  • Adding more google charts examples .

9,10 July 2017 Report :
  • Mostly working on DataTables. To draw large table smoothly. Since there is no gem right now for DataTables, as I discussed it here.

  • I have created gem for generating the html and javascript of the table from the Ruby interface. The repo link.

  • datatables.rb will be useful to generate large table from the URL(server side processing) or from the html table (client side) generated by the daru dataframe or vector. Some example I added which is not working in iruby notebook

  • I also tried Rails app that is working fine . Rails app is present in spec/dummy_rails of the data_tables repo.

  • Also tried some static examples in this repo.

11, 12 July 2017 Report :
  • I am working on data_tables , which will be used in daru-view table. It can handle large set smoothly.

  • I have changed daru dataframe#to_html function and generating the dataframe table’s thead and tbody html code separately. You can see the changes here.

The changes is in my forked daru repo: shekharrajak/daru , branch: html_table_with_id .

The problem may be related to this issue :

  • I am working on it and hope it will be fixed soon. Then it will be easy to use in daru-view.

13 July 2017 Report :
  • In javascript , generated by Datatables gem checks the thead and tbody of the table .Also it is needed to extract only the body part of the table (only rows of the table). So I have modified the table template for Vector & DataFrame and generating the thead and tbody code using method to_html_thead and to_html_tbody.

I have done these changes in this PR :

Just clone it and do bundle , bundle exec rails s, you will be able to see table generated using datatables js with pagination and search features. There are many features that can be added into data_tables gem.

Follow @shekharrajak