tidy_data: Transform table according to tidy philosophy

Description Usage Arguments Details Value

View source: R/load_indicators.R

Description

All data tables requested by the WHO API contain a SpatialDim, TimeDim, Dim1, Dim2, Dim3 and DataSourceDim dimension. These dimensions have corresponding units, e.g. the type of the TimeDim column is typically a year.

Usage

1

Arguments

data

A raw WHO API dataset

Details

We can transform the dimension and its corresponding dimension type to one column by setting the values of DimType to the column name and letting Dim be the values. Note that this sometimes results into multiple columns if if the DimType reports multiple units like years and months.

Value

A tidy-transformed WHO dataset


markkvdb/ghoR documentation built on March 2, 2020, 4:52 p.m.