0.1.9 • Published 5 years ago

@sablelab/pricing-calculator v0.1.9

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Pricing Calculator

Fantasy Baseball Pricing Calculator using Z-Scores

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. This project uses Node.js and Typescript.

Prerequisites

I plan on publishing a more detailed blog post on how the background and usage of this library (as well as it's roadmap), but here is quick Getting Started.

This assumes that you already have Node and TypeScript installed.

Installing

  1. Create a new directory for a sample consumer application:
mkdir sample && cd sample
  1. Create a node application
npm init -y
  1. Install the pricing-calculator
npm install --save @sablelab/pricing-calculator
  1. Create an index.js file
touch index.js
  1. Create a directory to hold your sample data
makedir sample-data
  1. Populuate the sample-data directory with the following input files. There are sample files in the gihub repository that you can use:
  1. Use the sample files to calculate pricing:
var pricing = require('@sablelab/pricing-calculator');

// use our sample data to generate the necessary inputs:
var params = require('./sample-data/params.json');
var batting = require('./sample-data/batting.json');
var pitching = require('./sample-data/pitching.json');

// create a new calculator with the inputs:
var calc = new pricing.PriceCalculator(params, batting, pitching);

// calculate the reponse:
var response = calc.calculate();

// inspect the response object to see all of the pricing information:
console.log(`Batting Iterations: ${r.battersOutput.numberOfIterations}`);
console.log(`Pitching Iterations: ${r.pitchersOutput.numberOfIterations}`);
  1. Run the application to generate the response:
node index.js

// output:
Batting Iterations: 4
Pitching Iterations: 3

Running the tests

Explain how to run the automated tests for this system

Break down into end to end tests

Explain what these tests test and why

Give an example

And coding style tests

Explain what these tests test and why

Give an example

Deployment

Add additional notes about how to deploy this on a live system

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Kevin R. Sherman - Initial work - Sablelab

See also the list of contributors who participated in this project.

License

This project is licensed under the ISC License - see the LICENSE.md file for details

Acknowledgments

This engine was built by piecing together prior-work from (among others):

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago