intensityjs - calculate Japanese scale intensity of earth quake.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.eslintrc.yml
.gitignore
.travis.yml
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

intensityjs Build Status

A library for calculate Japanese scale intensity of earth quake.

Usage

const intensityjs = require('intensityjs');

const intensity = intensityjs.calc({
  rate: 0.01,
  data: {
    x: [
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4],
    y: [
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4],
    z: [
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
      0, 1, 2, 3, 4, 0, 1, 2, 3, 4],
  },
});

console.log(intensity); // => 1.7

License

MIT

Author

Kotaro Takahashi@k4h4shi