datasets-nightingales-rose

1.0.0 • Public • Published

Nightingale's Rose

NPM version Build Status Coverage Status Dependencies

Dataset for Florence Nightingale's famous polar area diagram.

Nightingale's famous polar area diagram.

Installation

$ npm install datasets-nightingales-rose

For use in the browser, use browserify.

Usage

var data = require( 'datasets-nightingales-rose' );

data

Dataset for Florence Nightingale's famous polar area diagram.

console.log( data );
/*
    [
        {
            "date": "1854-04-01T07:00:00.000Z",
            "army_size": 8571,
            "disease": 1,
            "wounds": 0,
            "other": 5
        },
        ...
    ]
*/

Examples

var data = require( 'datasets-nightingales-rose' );
 
var len = data.length,
    scalar,
    d, i;
 
// Calculate the average annual mortality per 1000 for each cause, as done by Nightingale. See http://understandinguncertainty.org/node/214.
for ( i = 0; i < len; i++ ) {
    d = data[ i ];
    scalar = 1000*12 / d.army_size;
    d.disease = d.disease * scalar;
    d.wounds = d.wounds * scalar;
    d.other = d.other * scalar;
}
console.dir( data );

To run the example code from the top-level application directory,

$ node ./examples/index.js

References

Tests

Unit

Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:

$ make test

All new feature development should have corresponding unit tests to validate correct functionality.

Test Coverage

This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:

$ make test-cov

Istanbul creates a ./reports/coverage directory. To access an HTML version of the report,

$ make view-cov

License

MIT license.

Copyright

Copyright © 2015. The Compute.io Authors.

Package Sidebar

Install

npm i datasets-nightingales-rose

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kgryte