question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data Visualization with D3 - Array described as 3d has only 2 dimensions

See original GitHub issue

Describe your problem and how to reproduce it:

I’d like to submit a suggestion for a clarification in the explanation used in the following lesson:

Data Visualization with D3: Use the d3.max and d3.min Functions to Find Minimum and Maximum Values in a Dataset

The instructions in this lesson refer to variable positionData which is defined as:

const positionData = [[1, 7, -4],[6, 3, 8],[2, 9, 3]]

The lesson describes this as being a 3d array:

The positionData variable holds a 3-dimensional (3D) array.

This is misleading as positionData is not a 3-dimensional array but a 2d array. A 3d array could not be mapped to a 2d representation like a table:

1 7 -4
6 3 8
2 9 3

A 3d array would have a structure like:

[
    [
        ["foo", "bar"],
        ["fizz, "buzz]
    ],
    [
        ["foo", "bar"],
        ["fizz, "buzz]
    ]
]

I think this should be considered for rewording less it lead to a misunderstanding.

Add a Link to the page with the problem: https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/use-the-d3.max-and-d3.min-functions-to-find-minimum-and-maximum-values-in-a-dataset

Tell us about your browser and operating system:

  • Browser Name: Firefox
  • Browser Version: 73.0.1 (64-bit)
  • Operating System: Windows 10

If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): Capture

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
AshNaz87commented, Feb 26, 2020

I’d like to take this issue

2reactions
moT01commented, Feb 25, 2020

How about this…

The positionData array holds sub arrays of x, y, and z coordinates. Use a D3 
method to find the maximum value of the z coordinate (the third value) from 
the arrays and save it in the output variable.

I would also get rid of the Note and Fun fact sentence.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FCC-Projects/DataVisualizationWithD3.md at master
Have D3 create and append an h2 tag for each item in the dataset array. ... The Lesson: D3 is about visualization and...
Read more >
D3.js Tutorial – Data Visualization for Beginners
In this article, I'm going to walk you through how to use D3.js in a step by step and beginner-friendly way. We'll talk...
Read more >
The Art of Effective Visualization of Multi-dimensional Data
Visualizing data in Three Dimensions (3-D)​​ Let's look at strategies for visualizing three continuous, numeric attributes. One way would be to  ...
Read more >
D3.js - Data-Driven Documents
D3 is a JavaScript library for visualizing data with HTML, SVG, and CSS. ... For example, you can use D3 to generate an...
Read more >
Chapter 1. An introduction to D3.js
D3 is behind nearly all the most innovative and exciting information visualization on the web today. D3 stands for data-driven documents. It's a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found