Giter Club home page Giter Club logo

chapter-3's People

Contributors

ashleydavis avatar daranzolin avatar sestaton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chapter-3's Issues

Need to limit search results for listing-3.12 to avoid "400 Error"

If you run listing-3.12.js as is you'll get:

{ StatusCodeError: 400 - "Error 400: Bad Request\n\n20160 matching events exceeds search limit of 20000. Modify the search to match fewer events.\n\nUsage details are available from https://earthquake.usgs.gov/fdsnws/event/1\n\nRequest:\n/fdsnws/event/1/query.csv?starttime=2017-01-01&endtime=2017-03-02\n\nRequest Submitted:\n2019-01-23T22:45:30+00:00\n\nService version:\n1.7.0"

This is because the API has a defined limit on the number of items that can be returned (20k). If we limit the number of items in the request it will avoid the issue, and this can be done by changing the URL on line 4 to:

const url = "https://earthquake.usgs.gov/fdsnws/event/1/query.csv?starttime=2017-01-01&endtime=2017-03-02&limit=20000";

I could submit a PR if that would help but it's just a one line fix.

Hope this helps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.