Construct a Socrata open data API (SODA) query for the NSHN dataset
Source:R/forecasttools.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,
states = NULL,
limit = 1e+05,
order_by = c("state", "date"),
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
date
andstate
, which are always retrieved. IfNULL
, retrieve all columns. DefaultNULL
.- states
Vector of states or territories 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("state", "date")
- desc
whether to order descending instead of ascending. Default
FALSE
(order ascending).- ...
additional arguments (ignored for now)
Value
the query as soql::soql()
output