I created this to help me understand object constancy and how to add and remove data. The following two tutorials helped me greatly.
http://www.samselikoff.com/writings/intro-to-d3/
https://medium.com/@c_behrens/enter-update-exit-6cafc6014c36#.4ctg82y0y
https://d3js.org/d3.v3.min.js