gideon: gideon: A package for accessing the GIDEON API

gideonR Documentation

gideon: A package for accessing the GIDEON API

Description

The gideon package provides functions to access the GIDEON API without the need of writing your own REST API queries.

Authentication

All calls to the GIDEON API require an API key to work. Provide your GIDEON API key as an R environment variable by appending the following line to your .Renviron file: GIDEON_API_KEY=<YOUR API KEY>. The .Renviron file can be edited. by running the command usethis::edit_r_environ() in the R console.

GIDEON ID codes

Many of the items in the GIDEON database use an id code, such as diseases, bacteria, drugs, etc. Use lookup_gideon_id to know what specific code to use when calling the GIDEON API.

Outbreak functions

The functions to query outbreaks are:

  • outbreaks_by_year,

  • outbreaks_by_country_year,

  • latest_outbreaks_by_country,

  • outbreaks_by_disease,

  • endemic_countries_by_disease,

  • endemic_diseases_by_country,

GIDEON access functions

Functions to access the GIDEON API directly

  • query_gideon_api

See Also

Useful links:

Examples

cholera_code <- lookup_gideon_id("diseases", "Cholera")
cholera_outbreaks <- outbreaks_by_disease(cholera_code)

us_country_code <- lookup_gideon_id("countries", "United States")
outbreaks_us_2007 <- outbreaks_by_country_year(us_country_code, 2007)

mosquito_vector_code <- lookup_gideon_id("vectors", "Mosquito")
horse_reservoir_code <- lookup_gideon_id("reservoirs", "Horse")
diseases_from_horses_via_mosquitos <- filter_diseases(
    vector = mosquito_vector_code,
    reservoir = horse_reservoir_code
)


gideononline/gideon-api-r documentation built on March 19, 2022, 5:07 p.m.