1.3.0 • Published 6 years ago

invite-list-jr v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Build Status tested with jest npm version david.dm codecov

NPM

invite-list-jr

Find a list of customers who are close to the proximity (in KM). Mainly used to create a invitation list of customers within a certain radius of the event.

Setup

[sudo] npm i -g invite-list-jr

Usage

The program expects 2 inputs while looking for the right information:

  • Customer records in a text file (customers.txt) -- one customer per line, JSON-encoded. Example here.
  • config.json file, with the structure and information here.

Once you have the above information, run the following command:

invite-list-jr --f=[location to customers.txt] --c=[location to config.json]

This will give you a list of customers within in the proximity defined and number of results.

image

For easiness, we have provided a customers.txt and config.json example to get started with.

Calculation

Currently the program uses haversine function to calculate the distance and convert it to KM's. That said, we have an option to change the program to use spherical law of cosines here.

For more information regarding the algorithms, please refer to https://en.wikipedia.org/wiki/Great-circle_distance.

Roadmap

  • Allow the algorithm to be configurable.
  • Ability to write the results to a file and convert it to .csv for easy export.

Development

git clone git@github.com:jeremyrajan/invite-list-jr.git
npm install
gulp # starts a watcher
npm test # to run the tests using jest
1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago