Construct a Socrata open data API (SODA) query for the NSHN dataset
Source:R/pull_nhsn.R
nhsn_soda_query.Rd
Construct a Socrata open data API (SODA) query for the NSHN dataset
Usage
nhsn_soda_query(
api_endpoint,
start_date = NULL,
end_date = NULL,
columns = NULL,
jurisdictions = NULL,
limit = 1e+05,
order_by = c("jurisdiction", "weekendingdate"),
desc = FALSE,
...
)
Arguments
- api_endpoint
Base API endpoint URL to use when constructing the query.
- start_date
Pull only rows with dates greater than or equal to this date. If
NULL
, no minimum date. DefaultNULL
.- end_date
Pull only rows with dates less than or equal to this date. If
NULL
, no maximum date. DefaultNULL
.- columns
Vector of columns to retrieve, in addition to
weekendingdate
andjurisdiction
, which are always retrieved. IfNULL
, retrieve all columns. DefaultNULL
.- jurisdictions
Vector of jurisdictions to retrieve, by two letter US postal service code. If
NULL
, retrieve all. DefaultNULL
.- limit
limit to the number of rows to retrieve. Default 1e5.
- order_by
Vector of columns by which to order the results. Default
c("jurisdiction", "weekendingdate")
- desc
whether to order descending instead of ascending. Default
FALSE
(order ascending).- ...
additional arguments (ignored for now)
Value
the query as soql::soql()
output