Getting Started with ausOpenData

knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(ausOpenData)
library(ggplot2)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

Introduction

Welcome 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:

The aus_pull_dataset() function

The 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 description publication_stage audience type 
#>   <chr>         <chr> <chr> <chr>   <chr>       <chr>             <chr>    <chr>
#> 1 section_2_ca… tpp3… sect… https:… This asset… published         public   data…
#> 2 x2023_overal… nx3c… 2023… https:… Building S… published         public   data…
#> 3 arc_far_west… fvq2… ARC … https:… A record o… published         public   data…
#> 4 ems_fy2016_a… xk4x… EMS … https:… This table… published         public   data…
#> 5 preservation… 4enu… Pres… https:… This inter… published         public   data…
#> 6 x9334_annual… 98d2… 9334… https:… The Econom… published         public   data…
#> # ℹ 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>,
#> #   category <chr>, strategicpriority <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!

The aus_any_dataset() function

The 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:

  1. On the Austin Open Data Portal, go to the dataset you want to work with.
  2. Click on “Export” (next to the actions button on the right hand side).
  3. Click on “API Endpoint”.
  4. Click on “SODA2” for “Version”.
  5. Copy the API Endpoint.

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)

Rule of Thumb

While both functions provide access to Austin Open Data, they serve slightly different purposes.

In general:

  • Use aus_pull_dataset() when the dataset is available in aus_list_datasets()
  • Use aus_any_dataset() when working with datasets outside the catalog

Together, these functions allow users to either quickly access the datasets or flexibly query any dataset available on the Austin Open Data portal.

Real World Example

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 × 9
#>   restaurant_name zip_code   inspection_date     score address       facility_id
#>   <chr>           <chr>      <dttm>              <dbl> <chr>               <dbl>
#> 1 Hotel Viata     78746-0032 2026-08-24 00:00:00    96 320 S Capita…    12393953
#> 2 Drury Inn       78752-4307 2026-08-19 00:00:00   100 6711 N Inter…     2800251
#> 3 Georgian Market 78753-6435 2026-07-13 00:00:00    84 8100 N Inter…    12400612
#> # ℹ 3 more variables: process_description <chr>, inspectionid <dbl>,
#> #   inspectionscorecategory <chr>

# Checking to see the filtering worked
aus_routine_results |>
  distinct(process_description)
#> # A tibble: 1 × 1
#>   process_description
#>   <chr>              
#> 1 Routine Inspection

Success! 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 × 13
#>   restaurant_name         zip_code inspection_date     score address facility_id
#>   <chr>                   <chr>    <dttm>              <dbl> <chr>         <dbl>
#> 1 Drury Inn               78752-4… 2026-08-19 00:00:00   100 6711 N…     2800251
#> 2 Aramark @ Capital Reyes 78653    2026-05-28 00:00:00   100 10095 …    12397320
#> 3 Fujisan Sushi           78748-3… 2024-08-15 00:00:00   100 9900 S…    12398611
#> 4 Drury Inn               78752-4… 2024-03-12 00:00:00   100 6711 N…     2800251
#> 5 Walgreens #03092        78759-8… 2023-10-18 00:00:00   100 8104 M…     2803490
#> 6 Blake Manor Elementary… 78653-5… 2023-11-30 00:00:00   100 18010 …    10002545
#> # ℹ 7 more variables: process_description <chr>, inspectionid <dbl>,
#> #   inspectionscorecategory <chr>, lat <dbl>, lng <dbl>,
#> #   georeferenct_type <chr>, georeferenct_coordinates <list>

# 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   100

We successfully created our dataset that contains 50 requests regarding the scores of 100 routine food inspections in Austin Texas.

Summary

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.

How to Cite

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/.