Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mpa-reg-based-classification

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpa-reg-based-classification

Implements a regulation-based classification system for Marine Protected Areas based on https://doi.org/10.1016/j.marpol.2016.06.021

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Javascript implementation of A regulation-based classification system for Marine Protected Areas.

CircleCI Unit Tests

Installation

npm install mpa-reg-based-classification

Usage

classifyZone(gearTypes: [String], aquacultureActivities: String, anchoringActivities: String)

You can pass the full description of activities from the publication verbatim but that will bind your application to an exact phrasing. The strings are long so this is both error prone and limits flexibility. Best to use the provided constants as a shorthand.

import {classifyZone, constants} from "mpa-reg-based-classification";

const gearTypes = constants.GEAR_TYPES;
const aquaculture = constants.AQUACULTURE_AND_BOTTOM_EXPLOITATION;
const anchoring = constants.BOATING_AND_ANCHORING;

const classification = classifyZone(
  [
    gearTypes.SPEARFISHING,
    gearTypes.LINES
  ],
  aquaculture.NOT_ALLOWED,
  anchoring.FULLY_REGULATED
);

console.log(classification);
>>> 4

classifyMPA([[gearTypes: [String], aquacultureActivities: String, anchoringActivities: String, area:number]])

classifyMPA accepts an array of the same arguments as classifyZone for multiple zones, with the addition of an area for each zone. Unit doesn't matter.

Keywords

FAQs

Package last updated on 02 Mar 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc