get_smarter_countries | R Documentation |
Fetch SMARTER REST API countries endpoint and returns results in a dataframe.
get_smarter_countries(query = list())
query |
a |
Returns a dataframe with selected countries
Contries endpoint supports additional parameters when making queries.
Additional parameters need to be passed as list
using the query
parameter. For example, to get all the countries where there are "Sheeps"
you need to provide list(species="Sheep")
as query
parameter.
Endpoint supports searches with two or tree ISO codes using
alpha_2
and alpha3
parameters respectively. In addition,
you can search using a pattern through the search
parameter.
See
Swagger Countries endpoint for more information about the breeds endpoint
italy <- get_smarter_countries(query = list(name = "Italy"))
france <- get_smarter_countries(query = list(alpha_2 = "FR"))
## Not run:
# get countries where there are sheeps
sheep_countries <- get_smarter_countries(query = list(species = "Sheep"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.