Interactive Data Visualization for the Web

Errata for Interactive Data Visualization for the Web

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Other Digital Version
?
us-states.json

Very basically, I followed the example from the Geo Mapping chapter (12). Data is corrupted for the Virginia state: translation to path makes it a huge rectangle, filling over the whole svg, hence nothing is seen.

Note from the Author or Editor:
Already fixed for 1st ed

Anonymous  Oct 06, 2013 
Safari Books Online
us-states.json
Chapter 12

Confirming Anonymous' submission of the problem with the path for Virginia. Cause: the second polygon in the state's definition is composed of 4 coordinates that all have the same latitude (37.95325) making the polygon a line which is not gracefully handled when rendered. Quick Fix: removed the second polygon with the colinear coordinates from the geometry definition for Virginia. Chapter 12 examples are not useable without a working version of us-states.json.

Note from the Author or Editor:
Fixed already for 1st ed

James Roller  Oct 29, 2013 
Safari Books Online
Ch10
Ch10

Example specifies "to apply a 0.2-second transition" However CSS uses 0.3 second transition.

Note from the Author or Editor:
Fixed for 2nd ed.

Richard Penman  Feb 21, 2016 
Safari Books Online
9.3.3
count backwards 4th paragraph

9.3 Transitions, belong the "Please Do Not delay()" section: 1,000,400 seconds or 11.5 days -> 1,000,400 ms or 16.67 seconds

Note from the Author or Editor:
There was an error in my math here, but the reporter of this erratum also has an error in his/her math. On the top of page 147, this parenthetical reads: (1,000,400 seconds or 11.5 days to be precise) The corrected text should read: (1,000,400 ms or 16.67 minutes to be precise) Also, at the bottom of page 146, the first "long," could be removed, so this text: you could spend a long, long time is changed to read: you could spend a long time

lisongfeng  Apr 09, 2013  Apr 12, 2013
PDF
Page 28
2nd paragraph from bottom

Mismatch between text "(Note how under �Computed Style� is listed display: block.)" and Figure 3-4, in which "Computed Styles" are folded and the opened "Matched CSS Rules" instead reveals the "display: block" text.

Note from the Author or Editor:
Fixed for 2nd ed

therden  May 17, 2013 
PDF
Page 40
1st paragraph

No big deal, just left off an 's'. Sentence: "All GeoJSON object are JSON objects, and all JSON objects are JavaScript objects." Ought to be: "All GeoJSON objects..." Awesome book! Super easy, super fun.

Note from the Author or Editor:
Fixed for 2nd ed

Cole Jackowski  Dec 07, 2013 
PDF
Page 40
3rd paragraph

Text: "...just know that this is what simple GeoJSON data could look like the following:" Ought to be: "...just know that this is what simple GeoJSON data could like:" or: "...just know that simple GeoJSON data could look like the following:"

Note from the Author or Editor:
Fixed for 2nd ed

Cole Jackowski  Dec 07, 2013 
PDF, ePub
Page 87
Bar chart image

The image is supposed to show three different bar chart, each the result of a random dataset. However, the first two charts are exactly the same. Either the random generator is broken, or the same chart got included twice.

Note from the Author or Editor:
Report confirmed. When the illustrations were merged, the top chart was duplicated. To fix: Figure 6-8 needs to be updated, replacing the middle chart with the original chart I had generated.

Patrick Hubers  Mar 28, 2013  Apr 12, 2013
PDF
Page 91
2nd paragraph from bottom

This statement "There are no additional anonymous function parameters to learn about later" is inaccurate. A third parameter "j" is also supported. See https://groups.google.com/forum/?fromgroups#!searchin/d3-js/index$20j/d3-js/bpBkf9arDOA/58wI0U0j9vcJ See also the following sentence from http://bost.ocks.org/mike/nest/#data : "You can also access the row index (j) by adding a third argument to the function."

Note from the Author or Editor:
Fixed for 2nd ed

therden  May 20, 2013 
Printed
Page 103
.

On p. 103 when the data is meant to drive the color of the bar chart, the Math.round function should be used to make the "blue" component an integer. The rgb() function doesn't seem to like floating point. i.e. return "rgb(0,0," + (d*10) + ")"; works better as return "rgb(0,0," + Math.round(d*10) + ")"; The problem does not show up if you use an integer dataset, but if you allow the data to be randomized (as I did from a previous example) you need to round the color first.

Note from the Author or Editor:
Fixed in 2nd ed

Anonymous  Sep 18, 2014 
PDF
Page 123
nice() method description

"This tells the scale to take whatever input domain that you gave to range() and expand both ends to the nearest round value. " Is not range() domain()? nice()is a method for expand domain().

Note from the Author or Editor:
Fixed for 2nd ed

zziuni  Jun 29, 2013 
PDF
Page 131
first paragraph

D3 inteprets the ticks() value as merely a suggestion and will override your suggestion with what it determines to be the most clean and human-readable values�in this case, intervals of 100�even when that requires including slightly more or fewer ticks than you requested. inteprets -> interpret

Note from the Author or Editor:
Fixed for 2nd ed

zziuni  Jul 10, 2013 
PDF
Page 131
Y not section's first paragraph

Time to label the vertical axis! By copying and tweaking the code we already wrote for the xAxis, we add this near the top of of our code: top of of our code: -> top of our code:

Note from the Author or Editor:
Fixed for 2nd ed.

zziuni  Jul 10, 2013 
PDF
Page 180
first paragraph

The transition duration in the css-code (0.3s) differs from the duration mentioned in the next paragraph (0.2s)

Note from the Author or Editor:
In the print edition, see bottom of page number 183, top of 184. To correct this, let's update the text to reference the value already shown in the sample code. In the paragraph that begins "This tells browsers", change both instances of "0.2" to "0.3". Affected areas will then read: "to apply a 0.3-second transition" "over a brief 0.3-second period. Nice!"

Donald Vrakking  May 01, 2013 
PDF
Page 221
3rd paragraph

"...albersUsa is actually the default projection for d3.path.geo(),..." It is not d3.path.geo(), d3.geo.path() is right.

zziuni  Aug 22, 2013 
PDF
Page 223
Example city CSV with lat/lon

The latitude and longitude of many of the cities are wildly inaccurate, like placing Chicago in Minnesota, Seattle in Oregon, etc. A more accurate representation has been submitted in pull request: https://github.com/alignedleft/d3-book/pull/3

Note from the Author or Editor:
Fixed for 2nd ed.

Jeff Weiss  Apr 20, 2013 
PDF
Page 225
Both diagrams

Apologies for the duplicate - this supersedes the previous one. The sample cities data referenced in Chapter 12's geomapping example has incorrect coordinates for several cities (e.g., Seattle, Dallas...). The correct locations and updated population data from Wikipedia are posted on my github page: https://github.com/jimcarson/d3-book/blob/master/chapter_12/us-cities.csv The data file is part of the supplemental files downloadable from Github; however the error manifests itself on page 225 of the PDF version.

Note from the Author or Editor:
Fixed for 2nd ed.

jim_carson  Apr 21, 2013 
Printed
Page 232
6th paragraph

On page 232 of the first print edition, the term "d3.simplify" is wrapped over two lines. This should be corrected so "d3.simplify" is maintained on the same line. This seems to only affect the print edition. In the PDF version, "d3.simplify" appears on page 228 and is in the middle of a line.

Scott Murray
Scott Murray
 
Apr 11, 2013  Apr 12, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 545
9th chapter anchor #_interaction_via_event_listeners

In chapter 9, anchor #_interaction_via_event_listeners, it is said: "D3�s method selection.on() provides a nice shorthand for adding event listeners.". However, code samples above and below use select.on(), for example d3.select("p").on(... I found it confusing. Please doublecheck. Should it be "selection.on" or "select.on". cheers, Roy. Regards from London.

Note from the Author or Editor:
Fixed for 2nd ed.

Roy Reveltas  Nov 19, 2013