From the course: Data Analytics with Observable
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Solution: Adding data to your notebook - Observable Tutorial
From the course: Data Analytics with Observable
Solution: Adding data to your notebook
(energetic music playing) - [Instructor] All right, so here's my solution and actually solutions to the challenge, I did it once with a standard JavaScript and once with SQL. So first of all, I have a JavaScript cell where I create a named cell called squirrels, and I use this code file attachment, and then I name the file and I call dot csv. And this brings up an interesting point. Remember how we had a file attachment up here and I added it manually. And remember it was under Unused, which you don't see here, and I inserted it. And that created a table. If you want to just skip that step and just load the file without having a table, this is how you do it. You can add a file attachment and then call this code. So just so you know, now the data's here as an array and it's available to me to do stuff with. Then I have a name cell called filteredSquirrels, where I call squirrels.filter. You saw this before. Pass in a…
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
-
-
-
-
-
(Locked)
Getting data into your notebook6m 7s
-
(Locked)
Data tables6m 6s
-
(Locked)
Manipulating data (JavaScript)3m 28s
-
(Locked)
Manipulating data (SQL with DuckDB)5m 12s
-
(Locked)
Manipulating data (SQL query)2m 39s
-
(Locked)
Challenge: Adding data to your notebook1m 47s
-
(Locked)
Solution: Adding data to your notebook3m 14s
-
(Locked)
-
-
-
-