# location-weighted-average

> Do you need location weighted average? You can use my library.

Latest version **1.0.0** (published 2019-07-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install location-weighted-average
pnpm add location-weighted-average
yarn add location-weighted-average
bun add location-weighted-average
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-07-16 |
| First published | 2019-07-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Polomcak |
| Maintainers | lipo11 |
| Keywords | location, weighted, average |

## Links

- npm: https://www.npmjs.com/package/location-weighted-average
- Repository: https://github.com/Lipo11/location-weighted-average
- Homepage: https://github.com/Lipo11/location-weighted-average#readme
- Issues: https://github.com/Lipo11/location-weighted-average/issues
- npm.io page: https://npm.io/package/location-weighted-average

## Recent versions

- 1.0.0 (latest) — 2019-07-16

## README

# Location weighted average
Do you need location weighted average? You can use my library.

### Installing
```
npm install location-weighted-average --save
- or -
yarn add location-weighted-average
```

### Usage
```
const Location = new (require('location-weighted-average'))({ expiry: 60*5/*time in seconds*/ });

Location.update( { coords: { latitude: 10, longitude: 10, accuracy: 10 } } );

const avg_location = Location.get(); //returns { latitude, longitude, radius } or null
```
### API

#### config
Object to constructor. You can define expiry to added locations.
#### update()
Add location to lib.
#### get()
Get the average location.

---
_Source: https://npm.io/package/location-weighted-average · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
