knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(ausOpenData)
library(ggplot2)
library(dplyr)
#> Warning: package 'dplyr' was built under R version 4.5.2
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, unionWelcome to the ausOpenData package, an R package
dedicated to helping R users connect to the Austin Open Data Portal!
The ausOpenData package provides a streamlined interface
for accessing Austin’ vast open data resources. It connects directly to
official City of Austin open data portals, including datasets hosted
across Socrata-powered city domains, helping users bridge the gap
between raw city APIs and tidy data analysis. This package is part of a
broader ecosystem of open data tools designed to provide a consistent
interface across cities. It does this in two ways:
aus_pull_dataset() functionThe primary way to pull data in this package is the
aus_pull_dataset() function, which works in tandem with
aus_list_datasets(). You do not need to know anything about
API keys or authentication.
The first step would be to call the aus_list_datasets()
to see what datasets are in the list and available to use in the
aus_pull_dataset() function. This provides information for
thousands of datasets found on the portal.
aus_list_datasets() |> head()
#> # A tibble: 6 × 19
#> key uid name odp_url publication_stage audience type category
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 discount_total_… qcfg… Disc… https:… published public data… Utiliti…
#> 2 ct_ctal_demo_et… mbue… CT_C… https:… published public data… City Go…
#> 3 firms_maintaini… uxwx… Firm… https:… published public data… Budget …
#> 4 ems_quarterly_o… 2cxe… EMS … https:… published public data… Public …
#> 5 plan_review_cas… n8ck… Plan… https:… published public data… Buildin…
#> 6 austin_water_di… 8ih9… Aust… https:… published public data… Utiliti…
#> # ℹ 11 more variables: ownership_departmentname <chr>, creation_date <chr>,
#> # last_metadata_updated_date <chr>, last_data_updated_date <chr>,
#> # visits <chr>, downloads <chr>, publishinginformation_updatefrequency <chr>,
#> # publishinginformation_automationmethodifother <chr>,
#> # publishinginformation_automationmethod <chr>, row_count <chr>,
#> # column_count <chr>The output includes columns such as the dataset title, description,
and link to the source. The most important fields are the dataset
key and id. You need either
in order to use the aus_pull_dataset() function. You can
put either the key value or id value into the
dataset = filter inside of
aus_pull_dataset().
For instance, if we want to pull the dataset
Golf Courses in Austin, we can use either of the methods
below:
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)No matter if we put the uid or the key as
the value for dataset =, we successfully get the data!
aus_any_dataset() functionThe easiest workflow is to use aus_list_datasets()
together with aus_pull_dataset().
In the event that you have a particular dataset you want to use in R
that is not in the list, you can use the aus_any_dataset().
The only requirement is the dataset’s API endpoint (a URL provided by
the Austin Open Data portal). Here are the steps to get it:
Below is an example of how to use the aus_any_dataset()
once the API endpoint has been discovered, that will pull the same data
as the aus_pull_dataset() example:
aus_golf_courses <- aus_any_dataset(json_link = "https://data.austintexas.gov/resource/dtkn-v97q.json", limit = 2)
While both functions provide access to Austin Open Data, they serve slightly different purposes.
In general:
aus_pull_dataset() when the dataset is available in
aus_list_datasets()aus_any_dataset() when working with datasets
outside the catalogTogether, these functions allow users to either quickly access the datasets or flexibly query any dataset available on the Austin Open Data portal.
Each food establishment in Austin has to be properly inspected, and
the dataset with the inspection results is found
here. In R, the ausOpenData package can be used to pull
this data directly.
By using the aus_pull_dataset() function, we can gather
information on these food inspection results, and filter based upon any
of the columns inside the dataset.
Let’s take an example of 3 requests that are routine inspections. The
aus_pull_dataset() function can filter based off any of the
columns in the dataset. To filter, we add filters = list()
and put whatever filters we would like inside. From our
colnames call before, we know that there is a column called
“city” which we can use to accomplish this.
aus_routine_results <- aus_pull_dataset(dataset = "ecmv-9xxi",limit = 3, timeout_sec = 90, filters = list(process_description = "Routine Inspection"))
aus_routine_results
#> # A tibble: 3 × 7
#> restaurant_name zip_code inspection_date score address facility_id
#> <chr> <chr> <dttm> <dbl> <chr> <dbl>
#> 1 PF - Pflugerville Nurs… 78660-2… 2026-05-22 00:00:00 97 104 Re… 12392891
#> 2 Blenders and Bowls 78702-3… 2026-05-22 00:00:00 91 1625 E… 11687295
#> 3 Jersey Mike's Subs 78751-4… 2026-05-22 00:00:00 96 1000 E… 11250082
#> # ℹ 1 more variable: process_description <chr>
# Checking to see the filtering worked
aus_routine_results |>
distinct(process_description)
#> # A tibble: 1 × 1
#> process_description
#> <chr>
#> 1 Routine InspectionSuccess! From calling the aus_routine_results dataset we
see there are only 3 rows of data, and from the distinct()
call we see the only proccess featured in our dataset is “Routine
Inspection”.
One of the strongest qualities this function has is its ability to filter based off of multiple columns. Let’s put everything together and get a dataset of 50 businesses that occur in Austin in council district 8.
# 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)
#> # A tibble: 6 × 7
#> restaurant_name zip_code inspection_date score address facility_id
#> <chr> <chr> <dttm> <dbl> <chr> <dbl>
#> 1 Campsite at Shield Ran… 78738-6… 2026-05-22 00:00:00 100 10417 … 12396989
#> 2 LW - Baylor Scott & Wh… 78734-4… 2026-05-22 00:00:00 100 2000 M… 11984070
#> 3 Starbucks Coffee #6227 78703-1… 2026-05-21 00:00:00 100 2727 E… 2801131
#> 4 BC - Jules Design Bar 78738-6… 2026-05-21 00:00:00 100 12700 … 12185805
#> 5 Canteen @ Amazon UTX 9 78728-6… 2026-05-21 00:00:00 100 4616 W… 12395183
#> 6 Ashford Montessori 78660-7… 2026-05-21 00:00:00 100 20301 … 10339477
#> # ℹ 1 more variable: process_description <chr>
# Quick check to make sure our filtering worked
aus_routine_100 |>
summarize(rows = n())
#> # A tibble: 1 × 1
#> rows
#> <int>
#> 1 50
aus_routine_100 |>
distinct(process_description)
#> # A tibble: 1 × 1
#> process_description
#> <chr>
#> 1 Routine Inspection
aus_routine_100 |>
distinct(score)
#> # A tibble: 1 × 1
#> score
#> <dbl>
#> 1 100We successfully created our dataset that contains 50 requests regarding the scores of 100 routine food inspections in Austin Texas.
The ausOpenData package serves as a robust interface for
the Austin Open Data portal, streamlining the path from raw city APIs to
actionable insights. By abstracting the complexities of data
acquisition—such as pagination, type-casting, and complex filtering—it
allows users to focus on analysis rather than data engineering.
As demonstrated in this vignette, the package provides a seamless workflow for targeted data retrieval, automated filtering, and rapid visualization.
If you use this package for research or educational purposes, please cite it as follows:
Martinez C (2026). ausOpenData: Convenient Access to Austin Open Data API Endpoints. R package version 0.1.0, https://martinezc1.github.io/ausOpenData/.