View source: R/ipc_get_analyses.R
ipc_get_analyses | R Documentation |
Accesses the areas resources on the IPC API. Contains detailed analysis
information. If country
, year
and/or type
parameters are passed,
accesses the analyses simplified API endpoint and pulls in all analyses or
filtered to those parameters. To get the details for a specific analysis
available on the analyses/{id}/{period} advanced API endpoint,
pass in id
. You cannot pass in both sets of parameters.
ipc_get_analyses(
country = NULL,
year = NULL,
type = NULL,
id = NULL,
api_key = NULL,
tidy_df = TRUE
)
country |
ISO2 country code. |
year |
Single numeric year to filter analysis, calculated from the
maximum year of current period dates. If |
type |
Single string value of 'A' or 'C', corresponding to food security
conditions, either acute or chronic. If |
id |
Analysis ID. |
api_key |
IPC API key. If |
tidy_df |
If |
Analyses data is metadata related to specific analyses conducted by the IPC, including title of the analysis, link to its release page on the IPC website, and creation/modification dates.
Data frame of analysis metadata. Refer to the IPC-CH Public API documentation for details on the returned values, with variables described in full in the extended documentation.
When tidy_df
is TRUE
, the following changes are made to the initial
output to ensure each row represents a single analysis:
The data is arranged by country
, year
, and created
.
id
column is renamed to be analysis_id
.
# get all analyses details from the simplified API
ipc_get_analyses()
# get analysis details for a specific analysis ID
ipc_get_analyses(id = 12856213)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.