Crosstab-0.1.0 Released

crosstab version 0.1.0 has been released!

DESCRIPTION:

Crosstab is a library for generating formatted pivot tables.

FEATURES:

  • Input your data as an array of hashes
  • Input a report layout, built using a Ruby DSL
  • Outputs ASCII pivot tables suitable for fast reports
  • Pretty fast: takes less than a second to process 1,000 records of
    data by a report with 100 rows and 10 columns.

SYNOPSIS:

require ‘rubygems’
require ‘crosstab’

data = [{:gender => “M”, :age => 1},
{:gender => “F”, :age => 2},
{:gender => “M”, :age => 3}]

my_crosstab = crosstab data do
table do
title “Q.A Age:”
group “18 - 54” do
row “18 - 34”, :age => 1
row “35 - 54”, :age => 2
end
row “55 or older”, :age => 3
end

 banner do
   column "Total"
   group "Gender" do
     column "Male", :gender => "M"
     column "Female", :gender => "F"
   end
 end

end

puts my_crosstab.to_s

=> …

Table 1
Q.A Age:
Gender
----------------
Total Male Female
(A) (B) (C)
------- ------- -------
(BASE) 3 2 1

18 - 54 2 1 1
----------------------------- 67% 50% 100%

 18 - 34                            1        1       --
                                  33%      50%

 35 - 54                            1       --        1
                                  33%              100%

55 or older 1 1 –
33% 50%

TO INSTALL:

  • sudo gem install crosstab

Changes:

0.1.0 / 2007-11-17

Hi,

On 10/18/07, Michael J. [email protected] wrote:

require ‘rubygems’
row “18 - 34”, :age => 1
end
----------------

Changes:

0.1.0 / 2007-11-17

This looks pretty cool, I look forward to checking it out.

Michael G.

I’d love to try it however, rubygems is having some trouble resolving
the
dependencies.

% sudo gem install text-reform
Successfully installed text-reform-0.2.0
Successfully installed text-hyphen-1.0.0
Installing ri documentation for text-reform-0.2.0…
Installing ri documentation for text-hyphen-1.0.0…
Installing RDoc documentation for text-reform-0.2.0…
Could not find main page Text::Reform
Could not find main page Text::Reform
Could not find main page Text::Reform
Could not find main page Text::Reform
Installing RDoc documentation for text-hyphen-1.0.0…

% sudo gem install crosstab
Need to update 2 gems from http://gems.rubyforge.org

complete
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find text/reform (> 0.0.0) in any repository

Hi,

On Oct 19, 2007, at 4:17 PM, Andrew Nutter-Upham wrote:

Sorry about that. I mucked up the dependencies list when releasing
it. If you “sudo gem install crosstab” again, version 0.1.2 has it
fixed.

Kind regards,

Michael J.
SurveyComplete
[email protected] | 425-213-0097 | Seattle