Usage

`IDMC_API` env variable not set, so code chunks will not be evaluated.
library(idmc)

The simple use for the idmc package is to retrieve the data from the API directly into R.

df <- idmc_get_data()
df

This data frame, with variables described in the API documentation, includes 1 row per event. We can normalize this to daily displacement, assuming uniform distribution of displacement between start and end date, for all countries and type of displacement. idmc_transform_daily().

idmc_transform_daily(df)

While there are a few other parameters you can play around with in these functions, this is the primary purpose of this simple package.