Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lucioerlan/calculate-distance-matrix

:bear: Get distance or time between two locations using a csv.
https://github.com/lucioerlan/calculate-distance-matrix

distance-matrix node-js reactjs

Last synced: about 2 months ago
JSON representation

:bear: Get distance or time between two locations using a csv.

Awesome Lists containing this project

README

        

[![PRETTIER](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://gitter.im/jlongster/prettie)
[![LICENSE](https://img.shields.io/github/license/arshadkazmi42/awesome-github-init.svg)](https://github.com/arshadkazmi42/awesome-github-init/LICENSE)
[![LinkedIn][linkedin-shield]](https://www.linkedin.com/in/erlanlucio/)
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Flucioerlan%2Fcalculate-distance-matrix&count_bg=%23E71A18&title_bg=%23555555&icon=dependabot.svg&icon_color=%23E7E7E7&title=views&edge_flat=false)](https://hits.seeyoufarm.com)




Calculate Distance Matrix ๐Ÿ”ฐ



Logo




Report Bug
ยท
Request Feature

## ๐Ÿค” About The Project

This program, calculates a distance matrix using the Janson-Shanon algorithm, bringing the result of the distance or the travel time between two locations. To use, it is very simple, just send a file formatted correctly with the extension .csv on the client as soon as the file is processed, the server returns it on screen.

**-** Frontend

**-** Backend


## ๐Ÿ”จ Installation Default

You'll need [Node.js](https://nodejs.org) installed on your computer in order to build this app.

```bash
git clone https://github.com/lucioerlan/calculate-distance-matrix.git
$ cd calculate-distance-matrix/client -and- calculate-distance-matrix/server
$ npm install
```

Considerations:

- Format the .csv file correctly, example of the .csv file formatted in /server
- This program was run on Linux/Windows ๐Ÿ˜„


## ๐Ÿ”ฅ Setup

#### Copy or rename the file

```
$ cp .env-examples .env
```

#### Have a google account

ใ…ค[Then get a Google API key](https://developers.google.com/maps/documentation/javascript/get-api-key)


#### Finalizing configurations ๐Ÿ’จ

* After obtaining a google maps key, place it in [.env] in the GOOGLE_MAPS_API_KEY variable.


## ๐Ÿค“ Documentation and running tests

* Access swagger http://localhost:5000/api/docs ๐Ÿฅ‡
* $ npm test


## ๐Ÿš€ Running Default

```
$ /client npm start
```
```
$ /server npm start
```

#### Or Run Docker ๐Ÿณ

```
$ docker-compose up -d
```


## ๐Ÿ”“ License

This project lives under MIT License. See LICENSE for more details. ยฉ - [Erlan Lucio](https://www.linkedin.com/in/erlanlucio/)

[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=flat-square
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=flat-square
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=flat-square
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/othneildrew
[product-screenshot]: images/screenshot.png