Dataset for Florence Nightingale's famous polar area diagram.
$ npm install datasets-nightingales-rose
For use in the browser, use browserify.
var data = require( 'datasets-nightingales-rose' );
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
},
...
]
*/
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
- 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.
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.
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
Copyright © 2015. The Compute.io Authors.