Download data from the Wittgenstein Centre for Demography and Human Capital Data Explorer into R
See the pkgdown site for full details.
You can install the released version of wcde
from CRAN with:
install.packages("wcde")
Install the developmental version with:
library(devtools)
install_github("guyabel/wcde", ref = "main")
Download data based on a indicator, scenario and country code:
library(wcde)
#> Suggested citation for data:
#> Wittgenstein Centre for Demography and Global Human Capital (WIC) Wittgenstein Centre Data Explorer. Version 2.0, 2018
# SSP2 education specific tfr for Austria
get_wcde(indicator = "etfr", country_name = "Austria")
#> # A tibble: 102 × 6
#> scenario name country_code education period etfr
#> <dbl> <chr> <dbl> <chr> <chr> <dbl>
#> 1 2 Austria 40 No Education 2015-2020 1.64
#> 2 2 Austria 40 Incomplete Primary 2015-2020 1.64
#> 3 2 Austria 40 Primary 2015-2020 1.64
#> 4 2 Austria 40 Lower Secondary 2015-2020 1.66
#> 5 2 Austria 40 Upper Secondary 2015-2020 1.46
#> 6 2 Austria 40 Post Secondary 2015-2020 1.36
#> 7 2 Austria 40 No Education 2020-2025 1.68
#> 8 2 Austria 40 Incomplete Primary 2020-2025 1.68
#> 9 2 Austria 40 Primary 2020-2025 1.68
#> 10 2 Austria 40 Lower Secondary 2020-2025 1.67
#> # … with 92 more rows
# SSP2 education specific population sizes for Iran and Kenya
get_wcde(indicator = "pop", country_code = c(364, 404), pop_edu = "four")
#> # A tibble: 310 × 6
#> scenario name country_code year education pop
#> <dbl> <fct> <dbl> <dbl> <fct> <dbl>
#> 1 2 Iran (Islamic Republic of) 364 1950 Under 15 6210
#> 2 2 Iran (Islamic Republic of) 364 1950 No Education 9648.
#> 3 2 Iran (Islamic Republic of) 364 1950 Primary 1009.
#> 4 2 Iran (Islamic Republic of) 364 1950 Secondary 231.
#> 5 2 Iran (Islamic Republic of) 364 1950 Post Secondary 20.8
#> 6 2 Iran (Islamic Republic of) 364 1955 Under 15 7559.
#> 7 2 Iran (Islamic Republic of) 364 1955 No Education 9983.
#> 8 2 Iran (Islamic Republic of) 364 1955 Primary 1343.
#> 9 2 Iran (Islamic Republic of) 364 1955 Secondary 375.
#> 10 2 Iran (Islamic Republic of) 364 1955 Post Secondary 33.8
#> # … with 300 more rows
# SSP1, 2 and 3 gender gaps in educational attainment (15+) for all countries
get_wcde(indicator = "ggapedu15", scenario = 1:3)
#> # A tibble: 124,038 × 6
#> scenario name country_code year education ggapedu15
#> <int> <chr> <dbl> <dbl> <chr> <dbl>
#> 1 1 Bulgaria 100 1950 No Education -16
#> 2 1 Myanmar 104 1950 No Education -13
#> 3 1 Burundi 108 1950 No Education -11
#> 4 1 Belarus 112 1950 No Education -10
#> 5 1 Cambodia 116 1950 No Education -28
#> 6 1 Algeria 12 1950 No Education -6
#> 7 1 Cameroon 120 1950 No Education -16
#> 8 1 Canada 124 1950 No Education -1
#> 9 1 Cape Verde 132 1950 No Education -14
#> 10 1 Central African Republic 140 1950 No Education -4
#> # … with 124,028 more rows
The vignette provides many more examples on how to use the package to download data and produce plots from the Wittgenstein Centre Human Capital Data Explorer.