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

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…

Contents