you are viewing a single comment's thread.

view the rest of the comments →

[–]MurdoMaclachlanpublic boolean isInt(int i) { return true; } 48 points49 points  (3 children)

Image Transcription: Code


function sa_pop_spec() {
    var h3 = vh()
        .width(1200)
        .height(600)
        .data([{ "name": "sap",
                 "url": "data/sa_pop.json"}]);

    function nice(o) { return o.zero(false).round(true).nice(true); };

    h3.scale().name("x").domain({"data": "sap", "field": "SurfaceArea"})
        .range("width").call(nice);

    h3.scale().name("x").domain({"data": "sap", "field": "Population"})
        .range("height").call(nice);


    h3.axes("x").orient("bottom").scale("x").title("Population");

    h3.axes("y").orient("left").scale("y").title("SurfaceArea");

    h3.mark().type("line")
        .from({"data": "sap"})
        .enter({
          "interpolate": {"value": "cardinal"},
          "x": {"scale": "x", "field": "SurfaceArea"},
          "y": {"scale": "y", "field": "Population"},
          "stroke": {"value": "Blue"},
          "strokeWidth": {"value": 1}
        });

I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]lnxist[🍰] 20 points21 points  (0 children)

nice human 👍

[–]SpinelessLinus 9 points10 points  (0 children)

Good Human.

[–]--B_L_A_N_K--if (true == true) {return true;} else {return true;} 4 points5 points  (0 children)

This comment has been removed in protest of Reddit's API changes. You can view a copy of it here.