Git Product home page Git Product logo

Comments (8)

WilliamfShaw avatar WilliamfShaw commented on August 26, 2024

@iiVi Ok, what have you tried to do to resolve this? Have you checked in on the documentation for the API regarding rate limits? Have you checked to see if there is a bug somewhere in your code preventing it from seeding further?

Also please use backticks when inserting code


var poop = "poop" 

You can do this with the ```

from parkly.

iiVi avatar iiVi commented on August 26, 2024

Docs say nothing about rate limits. Not getting any errors anywhere when running this script. Will seed a number of the objects, but not all.

from parkly.

WilliamfShaw avatar WilliamfShaw commented on August 26, 2024

taken

from parkly.

harimohanraj89 avatar harimohanraj89 commented on August 26, 2024

Left some comments below.

var testAdd = function () {
    $.ajax({
        url: 'http://andrewcarton1.cartodb.com/api/v2/sql?format=GeoJSON&q=SELECT%20*%20FROM%20parking_regulationshp_1&api_key=a8614e1207568c75211faba281eda4f8d56c8164',
        method: 'get'
    }).done(testAddData);
};

var testAddData = function (regulationsCarto) {
        // Good use of a debugger
        // What is the length of `regulationsCarto` here?
        // Is it the full length? If so, then the code below has problems. Else, the code above (with cartodb) has problems
    debugger; 
    for(var i = 0; i < regulationsCarto.features.length; i++) {
        $.ajax({
            url: '/regulations/newpoop',
            method: 'post',
            data: {
                object_id: regulationsCarto.features[i].properties.objectid,
                borough: regulationsCarto.features[i].properties.sg_key_bor,
                location_id: regulationsCarto.features[i].properties.sg_order_n,
                sign_sequence: regulationsCarto.features[i].properties.sg_seqno_n,
                curb_distance: regulationsCarto.features[i].properties.sr_dist,
                sign_code: regulationsCarto.features[i].properties.sg_mutcd_c,
                sign_faces: regulationsCarto.features[i].properties.sg_sign_fc,
                sign_arrow: regulationsCarto.features[i].properties.sg_arrow_d,
                sign_description: regulationsCarto.features[i].properties.signdesc1,
                cartodb_id: regulationsCarto.features[i].properties.cartodb_id,
                x: regulationsCarto.features[i].geometry.coordinates[1],
                y: regulationsCarto.features[i].geometry.coordinates[0]
            }
        }).done(function() {
            console.log('done with one');
        }); // Can you use a .fail() to console log failures?
                    // When you do, do you see the right number failures? (total - successes)
                    // Can you use .fail() to gain more information about WHY things are failing? (What response
                    // do you get from your API?
                    // Can you try with a smaller dataset and identify patterns as to which ones are succeeding
                    // and which ones are failing?
    };
};

from parkly.

harimohanraj89 avatar harimohanraj89 commented on August 26, 2024

@WilliamfShaw All yours.

from parkly.

iiVi avatar iiVi commented on August 26, 2024

at my debugger, i'm getting the right total number, but cannot immediately see any bugs with the following code. Checking .fail now

from parkly.

iiVi avatar iiVi commented on August 26, 2024

also, not seeing anything other than 200's come back. it just stops at around 5k ish objects posted

from parkly.

iiVi avatar iiVi commented on August 26, 2024

AAHHHHH, THIS IS SO F*CKEDDDDDD

from parkly.

Related Issues (4)

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.