From the course: Data Analytics with Observable
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Solution: Adding interactivity to your notebook - Observable Tutorial
From the course: Data Analytics with Observable
Solution: Adding interactivity to your notebook
(upbeat music) - [Instructor] Okay, so here's how I addressed the challenge. I, again, took a notebook, forked it, and I just started off with my "Squirrels" data set. So I have my SQL statement, which is just directly querying the CSV file. And you'll notice I'm just saying where age doesn't equal blank string and age doesn't equal question mark 'cause there were some weird entries in the dataset. And then what I did is I added a couple of inputs. I added check boxes, just a regular checkbox where it lets my user select age. And I'm using squirrels.map D D.age. And what this is saying is find any unique values in the dataset. So no matter what options there are in the dataset for age, it'll bring 'em up here. So I don't have to hard code adult and juvenile. In fact, I can prove this by the way. What if I remove this where clause from my SQL statement and I shift enter? And you'll see the blank string is now an option.…
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.