1.0.1 • Published 6 years ago

ingv v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ingv

NPM Version node Dependency Status JavaScript Style Guide

Get INGV Earthquake events in Node.js

Node API client to get INGV earthquake events.

Install

npm install --save ingv

Example

const ingv = require('ingv')

let options = {
  startTime: null /* Date obj */,
  endTime: null /* Date obj */,
  minMag: 2 /* 0-10 */,
  maxMag: 10 /* 0-10 */,
  minDepth: -10 /* negative/positive number (Km) */,
  maxDepth: 1000 /* negative/positive number  (Km) */,
  minLat: -90 /* from -90 to 90 */,
  maxLat: 90 /* from -90 to 90 */,
  minLon: -180 /* from -180 to 180 */,
  maxLon: 180 /* from -180 to 180 */,
  limit: 10000 /* number */
}

ingv(options).then((data) => {
  /* // Example result:
[
  {
    time: '2018-05-05T07:47:25.490000',
    latitude: 43.0368,
    longitude: 13.0522,
    author: 'SURVEY-INGV',
    catalog: '',
    contributor: '',
    contributorID: '',
    magType: 'ML',
    magnitude: 2.1,
    magAuthor: '--',
    eventLocationName: '1 km S Pieve Torina (MC)',
    eventID: 19187041,
    depthKm: 7.7 
  },
  {
    time: '2018-05-05T13:58:55.630000',
    latitude: 43.0342,
    longitude: 13.0418,
    author: 'SURVEY-INGV',
    catalog: '',
    contributor: '',
    contributorID: '',
    magType: 'ML',
    magnitude: 2.2,
    magAuthor: '--',
    eventLocationName: '1 km SW Pieve Torina (MC)',
    eventID: 19192021,
    depthKm: 8.8
  },
...
]
  */
}).catch(console.error)

License

MIT

Author

Rocco Musolino @roccomuso