Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsr

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsr

Total Shots Ratio: a football analytics library.

  • 0.1.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
432
decreased by-17.08%
Maintainers
1
Weekly downloads
 
Created
Source

tsr Build Status Bitdeli Badge NPM

Total Shots Ratio (tsr) is a means of expressing the number of shots taken by a team to the number of shots condeded. Theoretically, more successful teams should have higher TSR's.

TSR is a very simple calculation. The number of shots created by a team is divided by the numbers of shot created plus the number of shots conceded.

TSR = (taken / ( taken + conceded))

Getting started

Install the module with: npm install tsr

Require the module in your js: var tsr = require('tsr');

TSR takes two arguments: shots taken + shots conceded. You can pass in either numbers or arrays.

tsr(taken, conceded);
tsr(10, 10); // 0.5
tsr(10, 30); // 0.25
tsr([5,5], [15,15]); // 0.25

There is a fantastic overview of TSR and a few more complex alternatives over at 11tegen11 that you might want to check out. Thanks @11tegen11

License

Copyright (c) 2013 jacquestardie
Licensed under the MIT license.

FAQs

Package last updated on 19 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc