filter-syntax | R Documentation |
Fiscal Data API allows for the filtering of results on the server side, leading to a smaller payload. The combinations of fields and operators supported are not currently defined, so it is suggested you test the desired combinations before relying on them.
A filter should be a named list of key-value pairs where the name corresponds to the field that should be filtered and the value is a character vector or a list where the name of an item corresponds to the operator and the value corresponds to the operand. One field may have more than one filter.
>
, <
Greater-than and lesser-than
>=
, <=
Greater-/lesser-than or equal-to
=
Equal to
in
Subset-of
## Not run:
#records with a record_date no older than 10 days ago
list(record_date = c('>=' = lubridate::today()-10))
#records with a record_date between two dates
list(
record_date = c('>=' = '2022-01-01'),
record_date = c('<=' = '2022-12-31')
)
#records with a specific record_date
list(record_date = c('=' = lubridate::today()-2))
#records where record_date is any of a set of specific dates
list(
record_date = list('in' = c('2022-06-13','2022-06-15','2022-06-17')
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.