156 of 180 Days of Data Viz Learning #jfdi

I’m doing some form of data visualization learning for 180 days because I need to #JFDI.

See post explaining how and why I’m doing this.

Code Learning:

Udacity Data Visualization and D3.js DimpleJS lectures

  • Example of chained use -> every two years in tick marks
    • var time_axis = d3.svg.axis()
      • .scale(time_scale)
      • .ticks(d3.time.years, 2)
  • Think of the ‘g’ element in svg as a div – an invisible fence around other svg objects. eg
    • d3.select(“svg”)
      • .append(‘g’)
      • .attr(‘class’, ‘x axis’)
      • .attr(‘transform’, “translate(0,” + height + “)”) // moves everything in to coordinates
      • .call(time_axis)
  • Use anonymous accessor function to find min and max of a column
    • var count_extent  = d3.extent(data, function (d) { return d[‘attendance’];
    • }); // pulls bound data
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s