-
Notifications
You must be signed in to change notification settings - Fork 20
Why to use daru view ?
daru-view is plugin gem for daru (daru (Data Analysis in RUby) is a library for storage, analysis, manipulation and visualization of data in Ruby). daru is working pretty good, as the data analysis tool and we can see the charts , table in iruby notebook. But still we need better plotting libraries in daru. Currently daru uses the nyaplot, gruff plotting libraries.
If we want to plot charts in webpages (mostly we will be working on Rails/Sinatra/Nanoc ruby frameworks), then daru plotting system don't provide that functions. Also we want a better plotting system that can generate most of the charts and more interactive.
daru-view comes into picture, which can generate data tables and charts in iruby notebook as well as in webpages. It can work smoothly in Rails/Sinatra/Nanoc web frameworks and I hope it can work in other ruby frameworks as well, because daru-view is generating the html code and javascript code for the chart, which is basic need of the webpage.
If you are using daru gem for analysing the data and want to visualise it, then it will be good if you have data-visualisation within daru and can plot it directly using DataFrame/Vector objects of daru.
daru-view will be helpful in plotting charts and tables directly from the Daru::DataFrame
and Daru::Vector
. daru-view using nyaplot, highcharts , google charts right now to plot the chart. So user can set the plotting library and get the chart accordingly.
Most of the plotting libraries doesn't provide the features of plotting charts in iruby notebook. They are defined only for web applications (mostly for Rails). But daru-view can plot charts in any ruby web application as well as iruby notebook.
Google Chart tools is very useful in creating table, query, data analysis and plotting charts. Also Google chart will be updated frequently. daru-view
uses the google chart library (once you set the Daru::View.plotting_library = :googlecharts
). Using Daru::View::Table
we can get the Google DataTable from the Daru::DataFrame
, Daru::Vector
and Arrays of data rows . We can directly use the Table to generate charts html code for web application and iruby notebook.
Data table original object can be accessed using Daru::View::Table#table
and charts using Daru::View::Plot#chart
. Functions for normal daru use; is added in Daru::View::Plot#method_name
, Daru::View::Table#method_name
. If you are experienced in original chart library functions (e.g. google::visualization::LineChart or HighCharts) you can use those functions in the Daru::View::Plot#chart
(which is google chart object or highcharts object according to the chart library). Similar things for Daru::View::Table#table
.
There are more features added into daru-view for the easy use.