UNHCR Raw Internal Data Library (RIDL)
The UNHCR RIDL platform is UNHCR
internal platform to easily store, find and analyze raw data. This
package is not on yet on CRAN and to install it, you will need the remotes
package. You can get ridl
from Gitlab or Github
(mirror)
## install.packages("remotes")
remotes::install_gitlab("dickoa/ridl")
Setup the R package ridl
The ridl
package requires you to add your API key and
store it for further use. The easiest way to do that is to store your
API key in your .Renviron
file which is automatically read
by R on startup.
You can retrieve your API key
in your user page.
RIDL concepts
In order to easily use the ridl
package, it’s important
to understand some key concepts of this platform. RIDL documentation is
available here for more
details.
Container
A container
is a placeholder where we can share data on
RIDL
. A container
is represented in the
ridl
package as a RIDLContainer
object and can
hold zero or multiple datasets
.
Most functions are prefixed by ridl_container
or
rc
- Get metadata of a resource:
ridl_container_show
orrc_show
- Get the list of the names of all containers in the server:
ridl_container_list
orrc_list
Dataset
A dataset
is a placeholder where we can share data files
(resources
). In a dataset page there’s some metadata that
give you enough context and information to properly store the data files
and use them. A data file e.g an Excel file is called a
resource
and many of them can be shared in
dataset
page. In the ridl
package, a
RIDLDataset
object is used to represent a
dataset
.
Most functions are prefixed by ridl_dataset
or
rd
:
- Get metadata of a dataset and its resources:
ridl_dataset_show
orrd_show
- Get the list of the names of all datasets in the server:
ridl_dataset_list
orrd_list
- Check whether a dataset exists or not:
ridl_dataset_exist
orrd_exist
- Searches for datasets satisfying a given search criteria:
ridl_datasets_search
orrd_search
Resource
A resource
is a file shared in dataset
page, it includes microdata
and supporting documents like
reports or survey forms. A RIDLResource
class is used to
implement all the logic needed to manipulate RIDL
resource
.
Most functions are prefixed by ridl_resource
or
rr
- Get metadata of a resource:
ridl_resource_show
orrr_show