ipc_get_icons {ripc} | R Documentation |
Get icons resources from the IPC API
Description
Accesses the icons resources on the IPC API. Contains links from analysis and
area IDs to the icon resource the IPC uses in maps and publications. This
is likely not useful for the general user. If year
and/or type
parameters are passed, accesses the icons simplified API endpoint, pulls in
data filtered to those parameters. To get all icons for a specific analysis
and period, available on the types/{id}/{period} advanced API endpoint,
pass in id
and period
. You cannot pass in both sets of parameters.
Usage
ipc_get_icons(
year = NULL,
type = NULL,
id = NULL,
period = NULL,
api_key = NULL,
tidy_df = TRUE
)
Arguments
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. |
period |
Period code, either 'C', 'P', or 'A' for current, projection, and second projection. |
api_key |
IPC API key. If |
tidy_df |
If |
Details
Icons data is used internally by the IPC to link up analyses for areas and a relevant icon for display on maps and in publications. The icons are stored in an Amazon S3 bucket that is not publicly accessible and therefore not useful for general users. Provided here for convenience.
See the IPC website and API documentation for more information.
Value
Data from of icons for analysis publications. Refer to the IPC-CH Public API documentation for details on the returned values, with variables described in full in the extended documentation.
Tidy
When tidy_df
is TRUE
, aar_id
is renamed to area_id
and area
to
area_name
.
Examples
# get all icons from the simplified API
ipc_get_icons()
# get icons for specific analysis ID and period from advanced API
ipc_get_icons(id = 12135625, period = "C")