{"id":13484503,"url":"https://github.com/SciRuby/daru-view","last_synced_at":"2025-03-27T16:31:05.699Z","repository":{"id":45282688,"uuid":"92973307","full_name":"SciRuby/daru-view","owner":"SciRuby","description":"daru-view is for easy and interactive plotting in web application \u0026 IRuby notebook. daru-view is a plugin gem to the existing daru gem.","archived":false,"fork":false,"pushed_at":"2022-08-28T04:58:19.000Z","size":19195,"stargazers_count":95,"open_issues_count":48,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-20T21:13:16.296Z","etag":null,"topics":["charts","daru","daru-view","data-analysis","data-visualization","graphs","iruby-notebook","nanoc","plot-library","rails","ruby","sinatra"],"latest_commit_sha":null,"homepage":"https://sciruby.github.io/daru-view/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SciRuby.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-31T17:52:52.000Z","updated_at":"2025-03-13T19:21:45.000Z","dependencies_parsed_at":"2022-08-22T19:41:00.087Z","dependency_job_id":null,"html_url":"https://github.com/SciRuby/daru-view","commit_stats":null,"previous_names":["shekharrajak/daru-view"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Fdaru-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Fdaru-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Fdaru-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciRuby%2Fdaru-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SciRuby","download_url":"https://codeload.github.com/SciRuby/daru-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882317,"owners_count":20687862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charts","daru","daru-view","data-analysis","data-visualization","graphs","iruby-notebook","nanoc","plot-library","rails","ruby","sinatra"],"created_at":"2024-07-31T17:01:25.339Z","updated_at":"2025-03-27T16:31:00.690Z","avatar_url":"https://github.com/SciRuby.png","language":"Jupyter Notebook","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eDaru::View\u003c/h1\u003e\n\u003cp\u003e\ndaru-view is for easy and interactive plotting in web application \u0026 IRuby notebook. daru-view is a plugin gem to the existing daru gem\n\u003c/p\u003e\n\u003ca href=\"https://github.com/SciRuby/daru-view/blob/master/LICENSE.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/SciRuby/daru-view?color=8c3038\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/SciRuby/daru-view/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/SciRuby/daru-view?color=8c3038\u0026logoColor=ffffff\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/SciRuby/daru-view/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/SciRuby/daru-view?color=8c3038\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/SciRuby/daru-view?branch=master\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/SciRuby/daru-view/badge.svg?branch=master\" alt=\"Coverage Status\" /\u003e\u003c/a\u003e\n\u003ca href=\"code_of_conduct.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://badge.fury.io/rb/daru-view\"\u003e\u003cimg src=\"https://badge.fury.io/rb/daru-view.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/SciRuby/daru-view\"\u003e\u003cimg src=\"https://travis-ci.org/SciRuby/daru-view.svg?branch=master\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n# About\n\n[Daru](https://github.com/sciruby/daru) (Data Analysis in Ruby) is a library for analysis, manipulation, and visualization of data. Daru-view is for easy and interactive plotting in web applications \u0026 IRuby notebook. It can work in frameworks like Rails, Sinatra, Nanoc, and hopefully in others too.\n\nIt is a plugin gem to Data Analysis in Ruby([Daru](https://github.com/sciruby/daru)) for visualization of data\n\n## Documentation:\n\n- [Documentation present in Rubydoc](http://www.rubydoc.info/github/sciruby/daru-view/)\n\n- [daru-view/wiki](https://github.com/SciRuby/daru-view/wiki)\n\n## Blogs:\n\n- [ScirRuby/blog](http://sciruby.com/blog/2017/09/01/gsoc-2017-data-visualization-using-daru-view/)\n\n- [GSoC 2017 Blog posts](http://shekharrajak.github.io/gsoc_2017_posts/)\n\n- [GSoC 2018: Work Product](https://32teethglitter.wordpress.com/2018/08/07/work-product-gsoc-2018/)\n\n- [Rubyist’s, so-called Powerful Future Plotting library](https://medium.com/@Shekharrajak/rubyists-so-called-powerful-future-plotting-library-1c4e202eee6d)\n\n- [I am a Ruby developer. How can I use Highcharts?](https://www.highcharts.com/blog/post/i-am-ruby-developer-how-can-i-use-highcharts/?__cf_chl_jschl_tk__=338bba242759c7d002887f58fad0e75aa46ed51a-1590914540-0-AQMW--o2s08ZWLQPqt7pePLoMu7ffsDtNrL-9goaQigUbeCmxrCFfev9yAtGpwnEl3W6SDFy3NUKf04OfUXff8rKSfSRZDr32vJdkHnjnvgaaFWz1o3zeuneNUSriZsyFOGQ3OD5Gr5qWQJc-lWOI9X7Dc8g6qiV36RH2hUS1WLloOy23igNvfODDZwSt5WXQNh7-SoiJbJfiUXb7k_k3a49sqY9qmHvUsz6qTlMs1QivPkDU17-CdhNLK6tfOO6YEqSFy9tvvj-WzdMIUXCwa5x6OmOpJPo9qzfPqz7hCmnZcGBjepS1LLQmFKt4d1vAoRquLZPJI4oHBh0CVKi6LMcayOHXmwbq-tnRfNuhqyIAx-pD56OY0B2-rmLE3h3UB9FoDfI5hpOE1XAI7YB-9M)\n\n- [How to create charts with daru-view and Highcharts in any Ruby web application framework](https://www.highcharts.com/blog/tutorials/how-to-create-charts-with-daru-view-and-highcharts/?__cf_chl_jschl_tk__=55ff70069823ebbf589d04997c7d68914e94a5dc-1590914539-0-AbSHzGQB6RsWEv-9EV-Ia-Lgk281WXlDwulwWHMivv_SZ8D2SmSEA3xWLfyFVubIrBi0DYER-Y8A7M37WKJmsbPAO5EGfoOL-0GLwl6An3Ol0iwkUN_BFvtntg3oS2sysjvCakfMJvo50yDgLAzFAiJuxeHfUhpn9ejs4Qxk0xQy3coVmH6qjpFXjDb9ZEJxbEZ2F7LmUW4DBg9MmgWyu7KNMZn5B0P7c6TFhOxv4xBb6__A17QWGOb-Af8_a1-y_8aKAVtTE2uJOuil5tPL9IuWI1oDZ2kMaeg04es9VLJOv6MFH0u9ayN3OyEUPYN7xVkn8b-weKpo8sJoEc60UvX9zDyx-1StSVWbGUbHgOLlNPZT6Xz6365q7MLHXaYAFICXSafLDGY6DSizy147MDuZbNVg6glgFosbgHjeCXK4)\n\n## Examples:\n\n- [IRuby notebook examples](http://nbviewer.jupyter.org/github/sciruby/daru-view/tree/master/spec/dummy_iruby/)\n\n- [Demo web applications (Rails, Sinatra, Nanoc)](https://github.com/Shekharrajak/demo_daru-view)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'daru-view', git: 'https://github.com/SciRuby/daru-view'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install daru-view\n\nIf the above is not working or you want to install the latest version from the GitHub repo:\n\n```\ngem install specific_install\ngem specific_install https://github.com/SciRuby/daru-view\n\n```\n\n## Usage\n\n### Use in IRuby notebook\n\n- To install IRuby notebook in your system, follow the steps given in [IRuby repo](https://github.com/SciRuby/iruby#quick-start).\n\n- Create a separate folder and Gemfile inside it. Add a minimum these lines to it\n\n```ruby\nsource \"http://rubygems.org\"\n\n# iruby dependencies\ngem 'rbczmq'\ngem 'ffi-rzmq'\ngem 'iruby'\n\n# fetch from the github master branch\ngem 'daru-view', :git =\u003e 'https://github.com/SciRuby/daru-view'\n\ngem \"daru\", git: 'https://github.com/SciRuby/daru.git'\ngem \"nyaplot\", git: 'https://github.com/SciRuby/nyaplot.git'\ngem 'google_visualr', git: 'https://github.com/winston/google_visualr.git'\ngem 'daru-data_tables', git: 'https://github.com/Shekharrajak/daru-data_tables.git'\n```\n\n- Now do `bundle install` and run `iruby notebook`\n\n- You may like to try some examples that are added in specs : [spec/dummy_iruby/](http://nbviewer.jupyter.org/github/sciruby/daru-view/tree/master/spec/dummy_iruby/)\n\n#### HighCharts example:\n\n```ruby\n\n# set the library, to plot charts\nDaru::View.plotting_library = :highcharts\n\n# Simple line chart\n@line_graph = Daru::View::Plot.new(\n  data=[43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]\n)\n\n# to see graph in IRuby notebook\n@line_graph.show_in_iruby\n\n# to see graph in any ruby web application framework\n# Add this line in your view file, where you want to see your graph in the web application. (It will put the HTML code of the line graph on the web page)\n\u003c%=raw @line_graph.div %\u003e\n\n```\n\n![Line Graph](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/HighChartBlog/lineChart.gif)\n\n##### GoogleChart example:\n\n```ruby\n\n# Default chart type is Line.\ndata = [\n        [0, 0],   [1, 10],  [2, 23],  [3, 17],  [4, 18],  [5, 9],\n        [6, 11],  [7, 27],  [8, 33],  [9, 40],  [10, 32], [11, 35],\n        [12, 30], [13, 40], [14, 42], [15, 47], [16, 44], [17, 48],\n        [18, 52], [19, 54], [20, 42], [21, 55], [22, 56], [23, 57],\n        [24, 60], [25, 50], [26, 52], [27, 51], [28, 49], [29, 53],\n        [30, 55], [31, 60], [32, 61], [33, 59], [34, 62], [35, 65],\n        [36, 62], [37, 58], [38, 55], [39, 61], [40, 64], [41, 65],\n        [42, 63], [43, 66], [44, 67], [45, 69], [46, 69], [47, 70],\n        [48, 72], [49, 68], [50, 66], [51, 65], [52, 67], [53, 70],\n        [54, 71], [55, 72], [56, 73], [57, 75], [58, 70], [59, 68],\n        [60, 64], [61, 60], [62, 65], [63, 67], [64, 68], [65, 69],\n        [66, 70], [67, 72], [68, 75], [69, 80]\n      ]\nline_basic_chart = Daru::View::Plot.new(data)\nline_basic_chart.show_in_iruby\n\n```\n\n![Line Graph GoogleChart](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/GoogleChart/lineChart.gif)\n\n#### GoogleChart - GeoChart\n\n```ruby\n\ncountry_population = [\n          ['Germany', 200],\n          ['United States', 300],\n          ['Brazil', 400],\n          ['Canada', 500],\n          ['France', 600],\n          ['RU', 700]\n]\n\ndf_cp = Daru::DataFrame.rows(country_population)\ndf_cp.vectors = Daru::Index.new(['Country', 'Population'])\ngeo_table = Daru::View::Table.new(df_cp, pageSize: 5, adapter: :googlecharts, height: 200, width: 200)\ngeochart = Daru::View::Plot.new(\n    geo_table.table, type: :geo, adapter: :googlecharts, height: 500, width: 800)\ngeochart.show_in_iruby\n\n```\n\n![World map GoogleChart](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/GoogleChart/worldMap.gif)\n\n- You can find more examples in this [IRuby notebook example](https://nbviewer.jupyter.org/github/sciruby/daru-view/blob/master/spec/dummy_iruby/Google%20Charts%20%7C%20Geo%20Charts%20examples.ipynb).\n\n#### GoogleChart - datatable\n\n```ruby\n\ndata = {\n  cols: [{id: 'Name', label: 'Name', type: 'string'},\n          {id: 'Salary', label: 'Salary', type: 'number'},\n          {type: 'boolean', label: 'Full Time Employee' },\n        ],\n  rows: [\n    {c:[{v: 'Mike'}, {v: 10000, f: '$10,000'}, {v: true}]},\n    {c:[{v: 'Jim'}, {v:8000,   f: '$8,000'}, {v: false}]},\n    {c:[{v: 'Alice'}, {v: 12500, f: '$12,500'}, {v: true}]},\n    {c:[{v: 'Bob'}, {v: 7000,  f: '$7,000'}, {v: true}]},\n    ]\n  }\ntable = Daru::View::Table.new(data, {height: 300, width: 200})\ntable.show_in_iruby\n\n```\n\n![GoogleChart datatable](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/GoogleChart/GoogleChartDatatable.gif)\n\n- Check out more amazing examples of GoogleChart datatable in [IRuby notebook](https://nbviewer.jupyter.org/github/sciruby/daru-view/blob/master/spec/dummy_iruby/GoolgeChart%20%7C%20Datatables.ipynb).\n\n#### DataTable example\n\n```ruby\n\narrayOfArray = [\n      [1, 3, 5, 7, 5, 0],\n      [1, 5, 2, 5, 1, 0],\n      [1, 6, 7, 2, 6, 0]\n    ]\narrayOfArrayTable = Daru::View::Table.new(arrayOfArray, pageLength: 3, adapter: :datatables)\n\n# paste the div part of the table in view part of the app or any HTML file.\n# First load the dependency for the datatable using this line : `Daru::View.dependent_script(:datatables)`\narrayOfArrayTable.div\n\n# For Rails application, we can use this line  \u003c%=raw arrayOfArrayTable.div %\u003e\n# For Nanoc and Sinatra application, we can use this line  \u003c%= arrayOfArrayTable.div %\u003e\n\n```\n\n- NOTE: It works seamlessly in Ruby web applications, but currently DataTable doesn't work in IRuby notebook,\n  because of conflict in DataTable dependent js and IRuby dependent js.\n\n- To see more examples, please check datatables examples written in [demo_daru-view](https://github.com/Shekharrajak/demo_daru-view) repository for different Ruby web application frameworks.\n\n#### HighMap example\n\n```ruby\n\nopts = {\n      chart: {\n        map: 'countries/in/in-all'\n      },\n\n      title: {\n          text: 'Highmaps basic demo'\n      },\n\n      subtitle: {\n          text: 'Source map: \u003ca href=\"http://code.highcharts.com/mapdata/countries/in/in-all.js\"\u003eIndia\u003c/a\u003e'\n      },\n\n      mapNavigation: {\n          enabled: true,\n          buttonOptions: {\n              verticalAlign: 'bottom'\n          }\n      },\n\n      colorAxis: {\n          min: 0\n      }\n    }\n\ndf = Daru::DataFrame.new(\n  {\n    countries: ['in-py', 'in-ld', 'in-wb', 'in-or', 'in-br', 'in-sk', 'in-ct', 'in-tn', 'in-mp', 'in-2984', 'in-ga', 'in-nl', 'in-mn', 'in-ar', 'in-mz', 'in-tr', 'in-3464', 'in-dl', 'in-hr', 'in-ch', 'in-hp', 'in-jk', 'in-kl', 'in-ka', 'in-dn', 'in-mh', 'in-as', 'in-ap', 'in-ml', 'in-pb', 'in-rj', 'in-up', 'in-ut', 'in-jh'],\n    data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]\n  }\n)\nmap = Daru::View::Plot.new(df, opts, chart_class: 'map')\nmap.show_in_iruby\n\n```\n\n![HighMap example India](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/HighMap/highMap.gif)\n\n- Read more about HighMap API in daru-view gem in this [wiki page section](https://github.com/SciRuby/daru-view/wiki/HighCharts-features#highmap).\n\n#### Nyaplot example :\n\n```ruby\n\n# set the library, to plot charts (Default it is nyaplot only)\nDaru::View.plotting_library = :nyaplot\n\n\n# options for the charts\nopts = {\n  type: :bar\n}\n\n# Vector data for the charts\ndata_vector = Daru::Vector.new [:a, :a, :a, :b, :b, :c], type: :category\ndata_df = Daru::DataFrame.new({\n  a: [1, 2, 4, -2, 5, 23, 0],\n  b: [3, 1, 3, -6, 2, 1, 0],\n  c: ['I', 'II', 'I', 'III', 'I', 'III', 'II']\n  })\ndata_df.to_category :c\n\n# initialize\n@bar_graph_vector = Daru::View::Plot.new(data_vector ,opts)\n@bar_graph_df = Daru::View::Plot.new(data_df, type: :bar, x: :c)\n\n# Add this line in your view file, where you want to see your graph in the web application. (It will put the HTML code of the line graph on the web page)\n\n\u003c%=raw @bar_graph_vector.div %\u003e\n\u003c%=raw @bar_graph_df.div %\u003e\n\n# Now refresh the page, you will be able to see your graph.\n\n\n# IRuby notebook\n@bar_graph_vector.show_in_iruby\n\n```\n\n![Bar Graph Nyaplot Vector](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/Nyaplot/nyaplot%2Bvector.gif)\n\n```\n@bar_graph_df.show_in_iruby\n\n```\n\n![Bar Graph Nyaplot Dataframe](https://raw.githubusercontent.com/Shekharrajak/medium-daru-view-blog/master/GIF_Images/Nyaplot/nyaplot_df.gif)\n\n- User can try examples, that are added in [Demo web applications (Rails, Sinatra, Nanoc)](https://github.com/Shekharrajak/demo_daru-view). To set up the rails app, run the following commands :\n\n```\nbundle install\nbundle exec rails s\n\n```\n\nNow go to the http://localhost:3000/nyaplot to see the Nyaplot examples or http://localhost:3000/highcharts and similarly for googlecharts, datatables\nto see the Highcharts examples.\n\n### Use in web application\n\n- Add this line in your Gemfile :\n\n```ruby\n\ngem 'daru-view', :git =\u003e 'https://github.com/sciruby/daru-view.git'\n\ngem \"daru\", git: 'https://github.com/SciRuby/daru.git'\ngem \"nyaplot\", git: 'https://github.com/SciRuby/nyaplot.git'\ngem 'google_visualr', git: 'https://github.com/winston/google_visualr.git'\ngem 'daru-data_tables', git: 'https://github.com/Shekharrajak/daru-data_tables.git'\n```\n\n_Note_ : Right now, in daru-view gemspec file `daru` and `nyaplot` are not added as development_dependency. Since daru-view required the latest GitHub version of the Daru and Nyaplot gem and we can't fetch gem from GitHub in the gemspec.\n\n#### Rails application\n\n- In the controller, do the data analysis process using daru operations and get the DataFrame/Vectors.\n\n- Set a plotting library using e.g. `Daru::View.plotting_library = :highcharts`\n\n- To set up the dependencies of HighCharts/DataTables in rails app, we can use the below line in app/assets/javascript/application.js file :\n\n```\n//= require highcharts/highcharts\n//= require highcharts/highcharts-more\n//= require highcharts/map\n//= require jquery-latest.min\n//= require jquery.dataTables\n```\n\nand CSS files can be included as:\n\n```\n *= require jquery.dataTables\n```\n\nInclude the below line in the head of the layout file(wherever you want to plot charts):\n\n```\n\n\u003c%= javascript_include_tag \"application\" %\u003e\n\u003c%= stylesheet_link_tag \"application\" %\u003e\n```\n\nNOTE: [ Old way ] In view, add the required JS files (for the plotting library), in head tag (generally) using the line, e.g.: `Daru::View.dependent_script(:highcharts)`\n\nThe line `\u003c%=raw Daru::View.dependent_script(:highcharts) %\u003e` for rails app, must be added in the layout file of the application.\n\nYou can read more about this feature in [this wiki page section](https://github.com/SciRuby/daru-view/wiki/GSoC-2018---Progress-Report#reduce-a-bunch-of-lines-due-to-js-files-in-source-html-in-rails-pr-115-in-daru-view-pr-23-in-daru-data_tables).\n\n#### Sinatra application\n\n- In view, add the required JS files (for the plotting library), in head tag (generally) using the line , e.g. : `Daru::View.dependent_script(:highcharts)`\n\nThe line `\u003c%= Daru::View.dependent_script(:highcharts) %\u003e` for sinatra app, must be added in the layout file of the application(inside the head tag).\n\n```ruby\n# In side the `app.rb` user must do data analysis process using daru features and define the Daru::View::Plot class instance variables to pass into the webpages in the `view` files. You will understand this better if you will try to run sinatra app present in the `[Demo web applications (Rails, Sinatra, Nanoc)](https://github.com/Shekharrajak/demo_daru-view)`\n\n# Add this line in your view file, where you want to see your graph in the web application. (It will put the HTML code of the line graph on the web page)\n\n\u003c%= @line_graph.div %\u003e\n\n\u003c%= @bar_graph1.div %\u003e\n\u003c%= @bar_graph2.div %\u003e\n\n# Now refresh the page, you will be able to see your graph.\n\n```\n\n- User can try examples, that are added in [Demo web applications (Rails, Sinatra, Nanoc)](https://github.com/Shekharrajak/demo_daru-view). To set up the rails app, run the following commands :\n\n```\nbundle install\nbundle exec ruby app.rb\n\n```\n\nNow go to the http://localhost:4567/nyaplot to see the Nyaplot examples or http://localhost:4567/highcharts to see the Highcharts examples.\n\n#### Nanoc application\n\nMost of the things are similar to the Rails application (syntax of the view part of the application).\n\n- User can try examples, that are added in [Demo web applications (Rails, Sinatra, Nanoc)](https://github.com/Shekharrajak/demo_daru-view). To set up the rails app, run the following commands :\n\n```\nbundle install\nbundle exec nanoc\nbundle exec nanoc view\n\n```\n\nNow go to the http://localhost:3000/nyaplot to see the Nyaplot examples or http://localhost:3000/highcharts and similarly for googlecharts, datatables\nto see the Highcharts examples.\n\n#### Live demo links\n\nNanoc web application compiles and generates the HTML code of the nanoc web application. So you can see the running Nanoc app here :\n\nNote: There is some problem in nyaplot (in the live link. It works fine locally). Some CSS is not working so some styling ain't working properly. You can see it properly in the local setup.\n\n[index.html](https://sciruby.github.io/daru-view/spec/dummy_nanoc/output/)\n\n[nyaplot](https://sciruby.github.io/daru-view/spec/dummy_nanoc/output/nyaplot)\n\n[highcharts](https://sciruby.github.io/daru-view/spec/dummy_nanoc/output/highcharts)\n\n[googlecharts](https://sciruby.github.io/daru-view/spec/dummy_nanoc/output/googlecharts)\n\nFor now, for other applications (Rails/Sinatra) you need to run it locally.\n\n## Update to latest js library. Additional command line\n\n### 1. Users\n\n- To view command usage:\n\n```\ndaru-view\n```\n\n- To update all the JS files:\n\n```\ndaru-view update\n```\n\n- To update JS files for google charts:\n\n```\ndaru-view update -g (or) --googlecharts\n```\n\n- To update JS files for highcharts:\n\n```\ndaru-view update -H (or) --highcharts\n```\n\n### 2. Developers\n\nTo update to the current highcharts.js directly from http://code.highcharts.com/\", you can always run\n\n    rake highcharts:update\n\nAnd it will be copied to your adapters/js/highcharts_js directory.\n\nSimilarly for other libraries.\n\nTo update the all libraries Javascript file, run this command :\n\n    rake update_all\n\n## Creating a new adapter (Developers)\n\nTo create a new adapter `Demo`, run\n\n```\nrake new:adapter Demo\n```\n\nand a file demo.rb will be created in the daru/view/adapters folder with all the necessary methods (init, init_script, init_ruby, generate_body, show_in_iruby, and export_html_file) as TODO.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nGenerally, I prefer to use `bundle console` for testing a few codes and experimenting with the gem repo.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sciruby/daru-view. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\nPick a feature from the Roadmap or the issue tracker or think of your own and send me a Pull Request!\n\nFor details see [CONTRIBUTING](CONTRIBUTING.md).\n\n## Acknowledgments\n\nThis software has been developed by [Shekhar Prasad Rajak](https://github.com/Shekharrajak) as a product in Google Summer of Code 2017 (GSoC2017). Visit the [blog posts](http://shekharrajak.github.io/gsoc_2017_posts/) or [mailing list of SciRuby](https://groups.google.com/forum/#!forum/sciruby-dev) to see the progress of this project.\n\n## License\n\nThe gem is available as open-source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\nCopyright (c) 2017 Shekhar Prasad Rajak(@shekharrajak)\n","funding_links":[],"categories":["Scientific"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSciRuby%2Fdaru-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSciRuby%2Fdaru-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSciRuby%2Fdaru-view/lists"}