<commit_before># scale

[![Build Status](https://travis-ci.org/javiercejudo/scale.svg)](https://travis-ci.org/javiercejudo/scale)
[![Coverage Status](https://coveralls.io/repos/javiercejudo/scale/badge.svg?branch=master)](https://coveralls.io/r/javiercejudo/scale?branch=master)
[![Code Climate](https://codeclimate.com/github/javiercejudo/scale/badges/gpa.svg)](https://codeclimate.com/github/javiercejudo/scale)

Scale normalised data

## Install

    npm i scale-normalised

## Usage

```js
var scale = require('scale-normalised').scale;

scale(.5, [2, 4]); // => 3
scale(-.25, [-3, 5]); // => returns -5

scale(Math.E); // => Math.E

scale(-3, 'invalid scale'); // => RescaleError
```

See [spec](test/spec.js).
<commit_msg>docs(README): add related projects section<commit_after># scale

[![Build Status](https://travis-ci.org/javiercejudo/scale.svg)](https://travis-ci.org/javiercejudo/scale)
[![Coverage Status](https://coveralls.io/repos/javiercejudo/scale/badge.svg?branch=master)](https://coveralls.io/r/javiercejudo/scale?branch=master)
[![Code Climate](https://codeclimate.com/github/javiercejudo/scale/badges/gpa.svg)](https://codeclimate.com/github/javiercejudo/scale)

Scale normalised data

## Install

    npm i scale-normalised

## Usage

```js
var scale = require('scale-normalised').scale;

scale(.5, [2, 4]); // => 3
scale(-.25, [-3, 5]); // => returns -5

scale(Math.E); // => Math.E

scale(-3, 'invalid scale'); // => RescaleError
```

See [spec](test/spec.js).

## Related projects

- [linear-converter](https://github.com/javiercejudo/linear-converter): flexible linear converter with built in conversions for common units.
- [rescale](https://github.com/javiercejudo/rescale): rescales a point given two scales.
- [normalise](https://github.com/javiercejudo/normalise): normalise data to [0, 1].
- [rescale-util](https://github.com/javiercejudo/rescale-util): rescale utilities.

{'fraction_non_alphanumeric': 0.1973753280839895, 'fraction_numerical': 0.011548556430446194, 'mean_word_length': 4.82874617737003, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6970760', 'n_tokens_mistral': 716, 'n_tokens_neox': 680, 'n_words': 107}