SciRuby github data analysis (Using daru-view/googlecharts)

Data is taken from GitHub API

Code to import data from API into Daru::DataFrame (yes, that's all!):
@watchers = Daru::DataFrame.read_json(
  'https://api.github.com/orgs/Sciruby/repos',
  repo_name: '$..name',
  watchers: '$..watchers'
)
      

Export to various formats

CSV XLS JSON
Code (helpers for responding in various formats)
respond_to do |format|
  format.html
  format.csv  { send_data(dataframe.to_csv_string)                         }
  format.xls  { send_data(dataframe.to_excel_string)                       }
  format.json { send_data(dataframe.to_json_string(pretty: true))          }
end
      

Data table

daru_table(
  @watchers,
  adapter: :googlecharts, pageSize: 10,
  height: 300, width: 400
)
      

Line chart

daru_chart(
  @watchers,
  type: :line,
  adapter: :googlecharts,
  height: 500,
  width: 1000
)
      

3D Pie chart

daru_chart(
  @watchers,
  type: :pie,
  adapter: :googlecharts,
  height: 500,
  width: 1000,
  title: 'Sciruby Popular repos (in the view of number of watchers)',
  is3D: true
)