Ratistics Charts

Charting/graphing extensions for the Ratistics statistics gem

Build Status Dependency Status

Ratistics Charts is an extension to the Ratistics library for statistics and statistical computing. It adds data visualization through simple charting and graphing. It is intended to work with that library specifically but is general enough it may be useful with data generated from other sources. Ratistics Charts is not intended to be a full-featured data visualization solution. It is intended to provide simple charting/graphing convenience functions only.

Ratistics is pronounced ra-TIS-tics. Just like "statistics" but with an 'R'

"Statistics".gsub(/^St/i, 'R') #=> "Ratistics"

The project is hosted on the following sites:

See the changelog for information on the latest updates.

Project Goals

This library is intended to solve a small but powerful set of use cases related to data visualization in statistical computing. As much as possible the project is designed to achieve the following goals:

  • Be simple and easy to use
  • Provide an API consistent with Ratistics
  • Maintain an internally-consistent set of conventions with reasonable defaults
  • Work directly against data and data structures produced by Ratistics functions
  • Hide the details of the underlying charting/graphing/image processing libraries

Because simplicity is a key goal, much of the power of the underlying charting/graphing/image libraries will not be exposed. If Ratistics Charts proves too limited for your needs I recommend working directly with one of the many full-features Ruby data visualization solutions.

Installation

Install from RubyGems:

gem install ratistics-charts

or add the following line to Gemfile:

gem 'ratistics-charts'

and run bundle install from your shell.

Usage

Require Ratistics within your Ruby project:

require 'ratistics_charts'

then use it:

sample = [2, 3, 4, 5, 6]
Ratistics::Chart.simple_line_graph('Chart Title', sample)
  #=> chart_title.png  400x300 DirectClass 16-bit 16kb

Data Visualization Functions

  • simple_line_graph

Sample Chart

histogram

Copyright

Ratistics and Ratistics Charts are Copyright © 2013 Jerry D'Antonio. It is free software and may be redistributed under the terms specified in the LICENSE file.

License

Released under the MIT license.

http://www.opensource.org/licenses/mit-license.php

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.