## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup-------------------------------------------------------------------- knitr::opts_chunk$set(warning = FALSE, message = FALSE) library(ausOpenData) library(ggplot2) library(dplyr) ## ----aus-list-datasets-------------------------------------------------------- aus_list_datasets() |> head() ## ----aus-vacant-pull---------------------------------------------------------- aus_golf_courses <- aus_pull_dataset( dataset = "dtkn-v97q", limit = 2, timeout_sec = 90) aus_golf_courses <- aus_pull_dataset( dataset = "golf_courses_in_austin", limit = 2, timeout_sec = 90) ## ----filter-routine----------------------------------------------------------- aus_routine_results <- aus_pull_dataset(dataset = "ecmv-9xxi",limit = 3, timeout_sec = 90, filters = list(process_description = "Routine Inspection")) aus_routine_results # Checking to see the filtering worked aus_routine_results |> distinct(process_description) ## ----filter-aus-hundreds------------------------------------------------------ # Creating the dataset aus_routine_100 <- aus_pull_dataset(dataset = "ecmv-9xxi", limit = 50, timeout_sec = 90, filters = list(process_description = "Routine Inspection", score = 100)) # Calling head of our new dataset aus_routine_100 |> slice_head(n = 6) # Quick check to make sure our filtering worked aus_routine_100 |> summarize(rows = n()) aus_routine_100 |> distinct(process_description) aus_routine_100 |> distinct(score)