heronshoes/red_amber

View on GitHub
benchmark/rover/penguins.yml

Summary

Maintainability
Test Coverage
contexts:
  - gems:
      red_amber: 0.2.2
  - name: HEAD
    prelude: |
      $LOAD_PATH.unshift(File.expand_path('lib'))
      require 'red_amber'

prelude: |
  require 'rover'
  require 'datasets-arrow'
  ds = Datasets::Penguins.new
  df = RedAmber::DataFrame.new(ds)
  rover = Rover::DataFrame.new(df.to_h)
  group_keys = [:species, :island]
  summary_key = :body_mass_g

benchmark:
  'penguins Group by Rover': |
    rover.group(group_keys).mean(summary_key)

  'penguins Group by RedAmber': |
    df.group(group_keys).mean(summary_key)