Introduction

library(rgho)
library(dplyr)

rgho is an R package to access WHO GHO data from R via the GHO OData API, providing a simple query interface to the World Health Organization's data and statistics content.

The Global Health Observatory

As stated by the WHO website: The GHO data repository contains an extensive list of indicators, which can be selected by theme or through a multi-dimension query functionality. It is the World Health Organization's main health statistics repository.

Data structure

GHO data is composed of indicators structured in dimensions. The list of dimensions is available in vignette("b-dimensions", "rgho"), the list of indicators for the GHO dimension (the main dimension) in vignette("c-values-gho", "rgho")).

It is possible to access dimensions with get_gho_dimensions():

get_gho_dimensions()

And codes for a given dimension with get_gho_values():

get_gho_values(dimension = "COUNTRY")
get_gho_values(dimension = "GHO")

Search

The function search_dimensions() and search_values() research a term in dimension or codes labels, respectively.

search_dimensions("region")
search_values("neonatal", dimension = "GHO")

It is also possible to search results from an existing object.

result <- get_gho_values(dimension = "REGION")
search_gho(result, "asia")

Data download

An indicator can be downloaded as a data_frame with get_gho_data(). Here we use MDG_0000000001, Infant mortality rate (probability of dying between birth and age 1 per 1000 live births):

result <- get_gho_data(
  code = "MDG_0000000001"
)

print(result)

Filter requests

The filter argument in get_gho_data() allows request filtering:

result <- get_gho_data(
  code = "MDG_0000000001",
  filter = list(
    REGION = "EUR",
    YEAR = 2015
  )
)

print(result)

Other parameters

For details about how the requests are performed and the options available (especially proxy settings) see vignette("e-details", "rgho").



Try the rgho package in your browser

Any scripts or data that you put into this service are public.

rgho documentation built on May 29, 2024, 1:42 a.m.