rgho
is an R
package to access WHO GHO data from R via the Athena web service, an API providing a simple query interface to the World Health Organization’s data and statistics content.
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.
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-codes-gho", "rgho")
).
It is possible to access dimensions with get_gho_dimensions()
:
## A 'GHO' object of 143 elements.
##
## Label ID
## 1 SUBSTANCE_ABUSE_ADVERTISING_TYPES ADVERTISINGTYPE
## 2 Age Group AGEGROUP
## 3 Action area ALCACTIONAREA
## 4 SUBSTANCE_ABUSE_ALCOHOL_POLICY_YEARS ALCOHOLPOLICYYEAR
## 5 Beverage Types ALCOHOLTYPE
## 6 AMR GLASS Category AMRGLASSCATEGORY
## ...
##
## (Printing 6 first elements.)
And codes for a given dimension with get_gho_codes()
:
## A 'GHO' object of 247 elements.
##
## Label ID
## 1 Aruba ABW
## 2 Afghanistan AFG
## 3 Angola AGO
## 4 Anguilla AIA
## 5 Albania ALB
## 6 Andorra AND
## ...
##
## (Printing 6 first elements.)
##
## Attributes:
##
## DS
## FIPS
## GEOMETRY
## IOC
## ISO
## ISO2
## ITU
## LAND_AREA_KMSQ_2012
## LANGUAGES_EN_2012
## MARC
## MORT
## SHORTNAMEES
## SHORTNAMEFR
## WHO
## WHOLEGALSTATUS
## WHO_REGION
## WHO_REGION_CODE
## WMO
## WORLD_BANK_INCOME_GROUP
## WORLD_BANK_INCOME_GROUP_CODE
## WORLD_BANK_INCOME_GROUP_GNI_REFERENCE_YEAR
## WORLD_BANK_INCOME_GROUP_RELEASE_DATE
## A 'GHO' object of 3308 elements.
##
## Label
## 1 Ambient air pollution attributable deaths
## 2 Ambient air pollution attributable DALYs per 100'000 children under 5 years
## 3 Household air pollution attributable deaths
## 4 Household air pollution attributable deaths in children under 5 years
## 5 Household air pollution attributable deaths per 100'000 capita
## 6 Household air pollution attributable deaths per 100'000 children under 5 years
## ID
## 1 AIR_1
## 2 AIR_10
## 3 AIR_11
## 4 AIR_12
## 5 AIR_13
## 6 AIR_14
## ...
##
## (Printing 6 first elements.)
##
## Attributes:
##
## CATEGORY
## DEFINITION_XML
## DISPLAY_ES
## DISPLAY_FR
## IMR_ID
## RENDERER_ID
The number of printed items can be changed by the option rgho.n
.
The function search_dimensions()
and search_codes()
research a term in dimension or codes labels, respectively.
## A 'GHO' object of 12 elements.
##
## Label ID
## 1 Subnational region DHSMICSGEOREGION
## 2 GBD Region GBDREGION
## 3 Region MGHEREG
## 4 OECD Region OECDREGION
## 5 WHO region REGION
## 6 SDG indicators regional groupings SDGREGION
## ...
##
## (Printing 6 first elements.)
## A 'GHO' object of 7 elements.
##
## Label
## 1 Number of neonatal deaths (thousands)
## 2 Neonatal mortality rate (per 1000 live births)
## 3 Distribution of causes of death among children aged <5 years (%) - Neonatal sepsis
## 4 Neonatal tetanus - number of reported cases
## 5 Neonates protected at birth against neonatal tetanus (PAB) (%)
## 6 Neonatal mortality rate (deaths per 1000 live births)
## ID
## 1 CM_03
## 2 WHOSIS_000003
## 3 WHS2_515
## 4 WHS3_56
## 5 WHS4_128
## 6 nmr
## ...
##
## (Printing 6 first elements.)
##
## Attributes:
##
## CATEGORY
## DEFINITION_XML
## DISPLAY_ES
## DISPLAY_FR
## IMR_ID
## RENDERER_ID
It is also possible to search results from an existing object.
## A 'GHO' object of 7 elements.
##
## Label
## 1 South East Asia region, stratum B (SEAR B)
## 2 South East Asia region, stratum D (SEAR D)
## 3 South-East Asia
## 4 South-East Asia
## 5 High income countries of the South-East Asia Region
## 6 Low-and-middle-income countries of the South-East Asia Region
## ID
## 1 GBD_REG14_SEARB
## 2 GBD_REG14_SEARD
## 3 OECD_NON_SEAR
## 4 SEAR
## 5 WHO_HI_SEAR
## 6 WHO_LMI_SEAR
## ...
##
## (Printing 6 first elements.)
Dimension codes can be filtered according to their attributes.
## A 'GHO' object of 53 elements.
##
## Label ID
## 1 Albania ALB
## 2 Andorra AND
## 3 Armenia ARM
## 4 Austria AUT
## 5 Azerbaijan AZE
## 6 Belgium BEL
## ...
##
## (Printing 6 first elements.)
##
## Attributes:
##
## DS
## FIPS
## GEOMETRY
## IOC
## ISO
## ISO2
## ITU
## LAND_AREA_KMSQ_2012
## LANGUAGES_EN_2012
## MARC
## MORT
## SHORTNAMEES
## SHORTNAMEFR
## WHO
## WHOLEGALSTATUS
## WHO_REGION
## WHO_REGION_CODE
## WMO
## WORLD_BANK_INCOME_GROUP
## WORLD_BANK_INCOME_GROUP_CODE
## WORLD_BANK_INCOME_GROUP_GNI_REFERENCE_YEAR
## WORLD_BANK_INCOME_GROUP_RELEASE_DATE
Attribute names and values can be displayed.
## [1] "code"
## [2] "DS"
## [3] "FIPS"
## [4] "GEOMETRY"
## [5] "IOC"
## [6] "ISO"
## [7] "ISO2"
## [8] "ITU"
## [9] "LAND_AREA_KMSQ_2012"
## [10] "LANGUAGES_EN_2012"
## [11] "MARC"
## [12] "MORT"
## [13] "SHORTNAMEES"
## [14] "SHORTNAMEFR"
## [15] "WHO"
## [16] "WHOLEGALSTATUS"
## [17] "WHO_REGION"
## [18] "WHO_REGION_CODE"
## [19] "WMO"
## [20] "WORLD_BANK_INCOME_GROUP"
## [21] "WORLD_BANK_INCOME_GROUP_CODE"
## [22] "WORLD_BANK_INCOME_GROUP_GNI_REFERENCE_YEAR"
## [23] "WORLD_BANK_INCOME_GROUP_RELEASE_DATE"
## [1] "AFR" "AMR" "EMR" "EUR" "SEAR" "WPR"
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):
## # A tibble: 33,066 x 11
## GHO PUBLISHSTATE YEAR REGION COUNTRY SEX `Display Value`
## <chr> <chr> <dbl> <chr> <chr> <chr> <dbl>
## 1 MDG_0000000001 PUBLISHED 2018 EMR AFG FMLE 44.5
## 2 MDG_0000000001 PUBLISHED 2017 EMR AFG BTSX 49.5
## 3 MDG_0000000001 PUBLISHED 2015 EMR AFG FMLE 49.6
## 4 MDG_0000000001 PUBLISHED 2014 EMR AFG BTSX 55.1
## 5 MDG_0000000001 PUBLISHED 2012 EMR AFG FMLE 55.8
## 6 MDG_0000000001 PUBLISHED 2011 EMR AFG BTSX 61.9
## 7 MDG_0000000001 PUBLISHED 2010 EMR AFG MLE 68
## 8 MDG_0000000001 PUBLISHED 2009 EMR AFG FMLE 62.7
## 9 MDG_0000000001 PUBLISHED 2007 EMR AFG MLE 76.1
## 10 MDG_0000000001 PUBLISHED 2006 EMR AFG FMLE 70.3
## Numeric Low High Comments
## <dbl> <lgl> <lgl> <lgl>
## 1 44.5 NA NA NA
## 2 49.5 NA NA NA
## 3 49.6 NA NA NA
## 4 55.1 NA NA NA
## 5 55.8 NA NA NA
## 6 61.9 NA NA NA
## 7 68.0 NA NA NA
## 8 62.7 NA NA NA
## 9 76.1 NA NA NA
## 10 70.3 NA NA NA
## # … with 33,056 more rows
The filter
argument in get_gho_data()
allows request filtering:
result <- get_gho_data(
dimension = "GHO",
code = "MDG_0000000001",
filter = list(
REGION = "EUR",
YEAR = "2015"
)
)
print(result, width = Inf)
## # A tibble: 162 x 11
## GHO PUBLISHSTATE YEAR REGION COUNTRY SEX `Display Value`
## <chr> <chr> <dbl> <chr> <chr> <chr> <dbl>
## 1 MDG_0000000001 PUBLISHED 2015 EUR ALB BTSX 8.5
## 2 MDG_0000000001 PUBLISHED 2015 EUR ALB FMLE 7.8
## 3 MDG_0000000001 PUBLISHED 2015 EUR ALB MLE 9.2
## 4 MDG_0000000001 PUBLISHED 2015 EUR AND BTSX 3.1
## 5 MDG_0000000001 PUBLISHED 2015 EUR AND FMLE 2.8
## 6 MDG_0000000001 PUBLISHED 2015 EUR AND MLE 3.3
## 7 MDG_0000000001 PUBLISHED 2015 EUR ARM BTSX 12.8
## 8 MDG_0000000001 PUBLISHED 2015 EUR ARM FMLE 11.3
## 9 MDG_0000000001 PUBLISHED 2015 EUR ARM MLE 14.2
## 10 MDG_0000000001 PUBLISHED 2015 EUR AUT BTSX 3
## Numeric Low High Comments
## <dbl> <lgl> <lgl> <lgl>
## 1 8.54 NA NA NA
## 2 7.83 NA NA NA
## 3 9.20 NA NA NA
## 4 3.09 NA NA NA
## 5 2.81 NA NA NA
## 6 3.35 NA NA NA
## 7 12.8 NA NA NA
## 8 11.3 NA NA NA
## 9 14.2 NA NA NA
## 10 3.05 NA NA NA
## # … with 152 more rows
Other parameters than format
can be specified to get_gho_data()
(such as apikey
, asof
…). Parameters are listed on this page. Note that most parameters are not available to general users.
For details about how the requests are performed and the option availables (especially proxy settings) see vignette("e-details", "rgho")
.