usgs-earthquake-reports
This is a library that parses and returns USGS earthquake reports.
Install
$ npm install usgs-earthquake-reports
Usage
var earthquakeReports = ; // Request all events with a magnitude between 0.5 and 1.5 between the specified times and north of the equatorvar filterOptions = minMag: 05 maxMag: 15 minTime: '2016-04-17T20:30:04' maxTime: '2016-04-17T20:45:04' minLat: 00; ;
API
earthquakeReports([timeFrame, filterOptions])
timeFrame(optional)
- Type:
string
- Default:
day
- Valid Options:
hour | day | week | month
- Note: All USGS products are updated every 5 minutes, with the exception of monthly data which is updated in 15 minute intervals. It is highly suggested that requested data is cached to reduce the load put on the USGS servers.
filterOptions (optional)
- Type:
object
- Note: Defines filters for the returned data. Filters do not need to be combined with counterpart options.
- Properties:
minMag
- Type:
decimal
- Defines the minimum magnitude event to return
- Type:
minMag
- Type:
decimal
- Defines the maximum magnitude event to return
- Type:
minTime
- Type:
string
- Format:
YYYY-MM-DDTHH:mm:ss
, e.g. 2016-01-30T00:00:00 - Defines the oldest event to return in UTC
- Type:
maxTime
- Type:
string
- Format:
YYYY-MM-DDTHH:mm:ss
, e.g. 2016-01-30T23:59:59 - Defines the most recent event to return in UTC
- Type:
minLat
- Type:
float
- Defines the minimum event latitude to return
- Type:
maxLat
- Type:
float
- Defines the maximum event latitude to return
- Type:
minLng
- Type:
float
- Defines the minimum event longitude to return
- Type:
maxLng
- Type:
float
- Defines the maximum event longitude to return
- Type: