Learn how to display a table of aggregate weather statistics.
- View Offline
- Exercise Files
- [Instructor] In this video, we'll retrieve…the aggregate data from the database…and display it in a table.…First, I'll define a function that I'll call submit-query!,…and it will take a start date and end date…in a human-friendly calendar format.…For the body of this function,…I'll leverage the find-data-in-range function…that we've defined in the database namespace,…and I'll provide it the start date…and end date arguments provided to this function…by using the cal->ms to convert them to milliseconds.…
Now we can query the database using submit-query!…and human-friendly calendar format strings.…Next I'll write our display function…that prints out a table, and leverages this function.…Let's call this display-query-result.…This'll also take a start date and end date.…First I'll create a let binding…and I'll bind result to a call to submit-query!…with the start date and end date provided.…This will return a map with keys for the average…and median values of our three weather metrics.…
I'd like to destructure this using keys,…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.