datasets-nightingales-rose
v1.0.0
Published
Dataset for Nightingale's famous polar area diagram.
Downloads
16
Maintainers
Readme
Nightingale's Rose
Dataset for Florence 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
- Nightingale, Florence. A contribution to the sanitary history of the British army during the late war with Russia. London: John W. Parker and Son, West Strand, 1859. Print.
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
Copyright
Copyright © 2015. The Compute.io Authors.