Now you know how to make calls! The general template for making a call (after making sure authentication is set up) is as follows.
get
function for the service.result <- get_state_fips()
result <- get_counties_in_state(state.fips = 'value')
result <- get_annual_summary_in_state(bdate = "value.one", edate = "value.two", state.fips = "value.three", param = "value.four")
services
object).endpoint <- 'APIEndpoint'
perform.call()
.result <- perform.call(endpoint)
perform.call()
.variable <- "value" result <- perform.call(endpoint, variable)
Or, specify the name of the API variable in the third argument.
variable.code <- "value" result <- perform.call(endpoint, variable.code, name = "API variable name")
perform.call()
.variables <- list(variable.one = "value.one", variable.two = "value.two", variable.three = "value.three") result <- perform.call(endpoint, variables)
Or, specify the names of parameter codes in the second argument.
variables <- list("value.one", "value.two", "value.three") result <- perform.call(endpoint, variables, name = list("variable.one", "variable.two", "variable.three"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.