From the course: D3.js Essential Training for Data Scientists
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Parsing JSON - D3.js Tutorial
From the course: D3.js Essential Training for Data Scientists
Parsing JSON
- [Instructor] Now we're going to look at how to gt JSON data into our D3. JSON stands for Javascript Object Notation. It's a way to store and exchange data. It's a bit like XML, but people find it lighter, faster, and easier to use. JSON is not peculiar to D3, but because it's Javascript-based, they work very well together. And this is what JSON looks like. If you don't have access to these files, you can copy what's on your screen now. Bear in mind that all of the JSON data comes within a square bracket to the top and the bottom, meaning that it's an array. And then within that array, we have curly brackets or objects. So here we have a top level entity which doesn't have any parents. Below that we have two children, A, which is at level two, and B, which is at level two. And then each of those children have some children, one or two. The children are also contained within an array, and each child takes exactly the same format as the parents. So now go to DataHandlers, and we're…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
Introducing external data58s
-
(Locked)
Parsing a CSV file5m 10s
-
(Locked)
Drawing a line chart from CSV data6m 46s
-
(Locked)
Using TSV and DSV5m 51s
-
(Locked)
Parsing JSON3m 29s
-
(Locked)
Parsing and mapping XML4m 23s
-
(Locked)
Parsing a TXT file5m 2s
-
(Locked)
Parsing HTML2m 55s
-
(Locked)
Introducing other data methods3m 30s
-
-
-
-
-
-