In this land, there was a

guild of builders

DOMinick

Scale

        function scale(domainMax, rangeMax) {
          return function(inputValue) {
            return (inputValue / domainMax) * rangeMax;
          }
        }

        height = scale(1, 500);
        height(0.5); // => 250
        
        height = d3.scaleLinear().
                   .domain([0, 1])
                   .range([0, 500])

        height(0.5); // => 250
        
height2 = height.range([500, 0])
selection
  .on("mouseover", function(d, i) {
    d3.select(this)
      .attr("fill", "red");
  })
  .on("mouseout", function(d, i) {
    d3.select(this)
      .attr("fill", "green");
  });
        
landscape
   .attr(...)
   .transition()
   .duration(1000)
   .attr(...)
        
        svg.selectAll("circle")
             .data([32, 57, 293])
           .enter().append("circle")
             .attr("cy", 90)
             .attr("cx", function(d) { return d })
             .attr("r", function(d) {
               return Math.sqrt(d)
             })
           .exit().remove();
        
        svg.selectAll("circle")








        

             .data([32, 57, 293])







        


           .enter().append("circle")






        



             .attr("cy", 90)
             .attr("cx", function(d) { return d })
             .attr("r", function(d) {
               return Math.sqrt(d)
             })

        








           .exit().remove();
        
with a little help from my friends
d3.selectAll("person")






        

    .data(data)





        


  .enter()




        


          .append("person")




        



    .attr("pose", function(d) {
      return d;
    })

        






  .exit()
        






         .remove();
        

The End

Image Credits
var title = "Data Driven Documents";














          

var data = title.split(" ");













          


var div = d3.select(".left");












          




var color = d3.scaleOrdinal()
      .domain([0,1,2])
      .range(['yellow','white','dodgerblue']);








          








div.selectAll("p")






          









  .data(data)





          










  .enter().append("p")




          











  .text(function(d) { return d })
  .attr('style', function(d,i) {
    return 'background-color: '+color(i)
  });
          
var title = "Data Driven Documents";
var data = title.split(" ");
var div = d3.select(".left");

var color = d3.scaleOrdinal()
      .domain([0,1,2])
      .range(['yellow','white','dodgerblue']);

div.selectAll("p")
  .data(data)
  .enter().append("p")
  .text(function(d) { return d })
  .attr('style', function(d,i) {
    return 'background-color: '+color(i)
  });