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!):
@repos = Daru::DataFrame.read_json(
  'https://api.github.com/orgs/Sciruby/repos',
  repo_name: '$..name',
  forks: '$..forks',
  open_issues: '$..open_issues_count'
)
      

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(
  @repos,
  adapter: :googlecharts, pageSize: 10,
  height: 300, width: 400
)
      

Column chart

daru_chart(
  @repos,
  type: :column,
  adapter: :googlecharts,
  height: 500,
  width: 1000
)
      

Histogram chart

daru_chart(
  @repos,
  type: :histogram,
  adapter: :googlecharts,
  height: 500,
  width: 1000
)