epidata_call
objects are generated internally by endpoint functions like pub_covidcast
; by default, they are piped directly into the fetch
function to fetch and format the data. For most endpoints this will return a tibble, but a few non-COVIDCAST endpoints will return a JSON-like list instead.
create_epidata_call(
endpoint,
params,
meta = NULL,
only_supports_classic = FALSE
)
fetch(epidata_call, fetch_args = fetch_args_list())
Arguments
the epidata endpoint to call
the parameters to pass to the epidata endpoint
meta data to attach to the epidata call
if true only classic format is supported
an instance of epidata_call
a fetch_args
object
For create_epidata_call
: an epidata_call
object
For fetch
: a tibble or a JSON-like list
create_epidata_call
is the constructor for epidata_call
objects, but you should not need to use it directly; instead, use an endpoint function, e.g., pub_covidcast
, to generate an epidata_call
for the data of interest.
There are some other functions available for debugging and advanced usage: - request_url
(for debugging): outputs the request URL from which data would be fetched (note additional parameters below)
fetch
usually returns the data in tibble format, but a few of the endpoints only support the JSON classic format (pub_delphi
, pvt_meta_norostat
, and pub_meta
). In that case a JSON-like nested list structure is returned instead.
if (FALSE) { # \dontrun{
call <- pub_covidcast(
source = "jhu-csse",
signals = "confirmed_7dav_incidence_prop",
time_type = "day",
geo_type = "state",
time_values = epirange(20200601, 20200801),
geo_values = c("ca", "fl"),
fetch_args = fetch_args_list(dry_run = TRUE)
)
call %>% fetch()
} # }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4