Socket
Book a DemoInstallSign in
Socket

@nearest/nearest-openinghours-format

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nearest/nearest-openinghours-format

Formating openinghours

0.0.15
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Detect duplicate locations

Usage

import duplication from '@nearest/nearest-duplicate-location';

Input

const locations = [
  {
    geojson: {...geojsonObject},
    name: 'Name of original location',
  },
  {
    geojson: {...geojsonObject},
    name: 'Name of location #1 to compare with original',
  },
  {
    geojson: {...geojsonObject},
    name: 'Name of location #2 to compare with original',
  },
  {
    ...
  }
];

Options

const options = {
  minDistance: 10, // minimal distance in meter to determine if identical (default: 10)
  duplicationValue: 0.2432, // minimal similarity value of location name (0.2432)
};

Check

const result = duplication.check(locations, options);

Result

Result value describes how identical to locations are. 0 means completaly different, 1 means completaly identical.

[
  {               // Result between original and #1
    name: 1,      // text similarity of names
    distance: 0,  // sperical distance between original and #1
    value: 1,     // identical
    isDuplicate: true
    },   
  { name: 0.9,
    distance: 9.891107007312382,
    value: 0.9 },
  { name: 0.14285714285714285,
    distance: 918.318771862209,
    value: 0 } ]

Resources

Detecting Nearly Duplicated Records in Location Datasets

FAQs

Package last updated on 07 Oct 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.