| Title: | Download Data from the Wittgenstein Centre Human Capital Data Explorer |
|---|---|
| Description: | Download and plot education specific demographic data from the Wittgenstein Centre for Demography and Human Capital Data Explorer <https://dataexplorer.wittgensteincentre.org/>. |
| Authors: | Guy J. Abel [aut, cre, ctb] (ORCID: <https://orcid.org/0000-0002-4893-5687>), Samir K.C. [ctb] (ORCID: <https://orcid.org/0000-0002-5213-9181>), Michaela Potancokova [ctb], Claudia Reiter [ctb] (ORCID: <https://orcid.org/0000-0002-1485-3851>), Andrea Tamburini [ctb], Dilek Yildiz [ctb] (ORCID: <https://orcid.org/0000-0001-6192-0634>) |
| Maintainer: | Guy J. Abel <[email protected]> |
| License: | GPL-3 |
| Version: | 0.0.8 |
| Built: | 2026-05-27 09:27:18 UTC |
| Source: | https://github.com/guyabel/wcde |
Cleans epop data, downloaded using the wcde() function, for summations of population by 4, 6 or 8 education groups.
edu_group_sum( d = NULL, n = 4, strip_totals = TRUE, factor_convert = TRUE, year_edu_start = 2020 )edu_group_sum( d = NULL, n = 4, strip_totals = TRUE, factor_convert = TRUE, year_edu_start = 2020 )
d |
Data frame downloaded from the |
n |
Number of education groups (from 4, 6 or 8) |
strip_totals |
Remove total sums in |
factor_convert |
Convert columns that are character strings to factors, with levels based on order of appearance. |
year_edu_start |
Year in which education splits are available for given groupings - in some versions past data is not available for some education groupings. Set to 2020 by default. |
Strips the epop data set to relevant rows for the n education groups.
A tibble with the data selected.
library(tidyverse) past_epop %>% filter(year == 2020) %>% edu_group_sum()library(tidyverse) past_epop %>% filter(year == 2020) %>% edu_group_sum()
Select every other (nth) element from a vector
every_other(x, n = 2, start = 1, fill = NULL)every_other(x, n = 2, start = 1, fill = NULL)
x |
Vector to select (remove) elements from |
n |
Numeric value for the number of elements to skip. Default is 2, i.e. skips every second element |
start |
Numeric value to indicate which element of the vector to commence from. |
fill |
Character string to be used in place of skipped element. By default is |
Vector with elements removed
every_other(x = letters) every_other(LETTERS, n = 3, start = 6) every_other(x = letters, fill = "")every_other(x = letters) every_other(LETTERS, n = 3, start = 6) every_other(x = letters, fill = "")
Find available indicator code names in the Wittgenstein Centre Human Capital Data Explorer
find_indicator(x)find_indicator(x)
x |
Character string on key word or name related to indicator of potential interest. |
A subset of the wic_indicators data frame with one or more of the indicator, description or definition columns matching the keyword given to x. Use the result in the indicator column to input to the get_wcde function for downloading data.
find_indicator("education") find_indicator("migr") find_indicator("fert")find_indicator("education") find_indicator("migr") find_indicator("fert")
Downloads data from the Wittgenstein Centre Human Capital Data Explorer. Requires a working internet connection.
get_wcde( indicator = "pop", scenario = 2, country_code = NULL, country_name = NULL, pop_age = c("total", "all"), pop_sex = c("total", "both", "all"), pop_edu = c("total", "four", "six", "eight"), include_scenario_names = FALSE, server = c("iiasa", "github", "1&1", "search-available", "iiasa-local"), version = c("wcde-v3", "wcde-v2", "wcde-v1") )get_wcde( indicator = "pop", scenario = 2, country_code = NULL, country_name = NULL, pop_age = c("total", "all"), pop_sex = c("total", "both", "all"), pop_edu = c("total", "four", "six", "eight"), include_scenario_names = FALSE, server = c("iiasa", "github", "1&1", "search-available", "iiasa-local"), version = c("wcde-v3", "wcde-v2", "wcde-v1") )
indicator |
One character string based on the |
scenario |
Vector of length one or more with numbers corresponding the scenarios. See details for more information. Defaults to 2 for the SSP2 Medium scenario. |
country_code |
Vector of length one or more of country numeric codes based on ISO 3 digit numeric values. |
country_name |
Vector of length one or more of country names. The corresponding country code will be guessed using the countrycodes package. |
pop_age |
Character string for population age groups if |
pop_sex |
Character string for population sexes if |
pop_edu |
Character string for population educational attainment if |
include_scenario_names |
Logical vector of length one to indicate if to include additional columns for scenario names and short names. |
server |
Character string for server to download from. Defaults to |
version |
Character string for version of projections to obtain. Defaults to |
If no country_name or country_code is provided data for all countries and regions are downloaded. A full list of available countries and regions can be found in the wic_locations data frame.
indicator must be set to a value in the first column in the table below of available demographic indicators:
indicator |
Indicator Description |
pop |
Population Size (000's) |
bpop |
Population Size by Broad Age (000's) |
epop |
Population Size by Education (000's) |
prop |
Educational Attainment Distribution |
bprop |
Educational Attainment Distribution by Broad Age |
growth |
Average Annual Growth Rate |
nirate |
Average Annual Rate of Natural Increase |
sexratio |
Sex Ratio |
mage |
Population Median Age |
tdr |
Total Dependency Ratio |
ydr |
Youth Dependency Ratio |
odr |
Old-age Dependency Ratio |
ryl15 |
Age When Remaining Life Expectancy is Below 15 years |
pryl15 |
Proportion of Population with a Remaining Life Expectancy below 15 Years |
mys |
Mean Years of Schooling by Age |
bmys |
Mean Years of Schooling by Broad Age |
ggapmys15 |
Gender Gap in Mean Years Schooling (15+) |
ggapmys25 |
Gender Gap in Mean Years Schooling (25+) |
ggapedu15 |
Gender Gap in Educational Attainment (15+) |
ggapedu25 |
Gender Gap in Educational Attainment (25+) |
tfr |
Total Fertility Rate |
etfr |
Total Fertility Rate by Education |
asfr |
Age-Specific Fertility Rate |
easfr |
Age-Specific Fertility Rate by Education |
cbr |
Crude Birth Rate |
macb |
Mean Age at Childbearing |
emacb |
Mean Age at Childbearing by Education |
e0 |
Life Expectancy at Birth |
cdr |
Crude Death Rate |
assr |
Age-Specific Survival Ratio |
eassr |
Age-Specific Survival Ratio by Education |
net |
Net Migration |
netedu |
Net Migration Flows by Education |
emi |
Emigration Flows |
imm |
Immigration Flows |
See wic_indicators data frame for more details.
scenario must be set to one or values in the first column table below of the available future scenarios:
scenario |
description | version |
1 |
Rapid Development (SSP1) | V1, V2, V3 |
2 |
Medium (SSP2) | V1, V2, V3 |
3 |
Stalled Development (SSP3) | V1, V2, V3 |
4 |
Inequality (SSP4) | V1, V3 |
5 |
Conventional Development (SSP5) | V1, V3 |
20 |
Medium - Constant Enrollment Rate (SSP2-CER) | V1 |
21 |
Medium - Fast Track Education (SSP2-FT) | V1 |
22 |
Medium - Zero Migration (SSP2-ZM) | V2, V3 |
23 |
Medium - Double Migration (SSP2-DM) | V2, V3 |
See wic_scenarios data frame for more details.
A tibble with the data selected.
# SSP2 tfr for Austria and Bulgaria get_wcde(indicator = "tfr", country_code = c(40, 100)) # SSP1 and SSP2 life expectancy for Vietnam and United Kingdom (guessing the country codes) get_wcde(scenario = c(1, 2), indicator = "e0", country_name = c("Vietnam", "UK")) # SSP1 and SSP3 population by education for all countries get_wcde(scenario = c(1, 3), indicator = "tfr") # population totals (aggregated over age, sex and education) get_wcde(indicator = "pop", country_name = "Austria") # population totals by education group get_wcde(indicator = "pop", country_name = "Austria", pop_edu = "four") # population totals by age-sex group get_wcde(indicator = "pop", country_name = "Austria", pop_age = "all", pop_sex = "both")# SSP2 tfr for Austria and Bulgaria get_wcde(indicator = "tfr", country_code = c(40, 100)) # SSP1 and SSP2 life expectancy for Vietnam and United Kingdom (guessing the country codes) get_wcde(scenario = c(1, 2), indicator = "e0", country_name = c("Vietnam", "UK")) # SSP1 and SSP3 population by education for all countries get_wcde(scenario = c(1, 3), indicator = "tfr") # population totals (aggregated over age, sex and education) get_wcde(indicator = "pop", country_name = "Austria") # population totals by education group get_wcde(indicator = "pop", country_name = "Austria", pop_edu = "four") # population totals by age-sex group get_wcde(indicator = "pop", country_name = "Austria", pop_age = "all", pop_sex = "both")
A data set containing population sizes for all countries by education between 1950 and 2020 from Version 3.
past_epoppast_epop
A data frame with 574,968 rows and 7 variables, including:
Area name
ISO 3 digit country code
Year of observation from 1950 to 2020 in five-year steps
Five-year age groups
Education group
Sex
Population size in thousands for each age, sex and education group
https://dataexplorer.wittgensteincentre.org/
Three sets of colours used for filling education based plots based on the different availability of detailed education categories (four, six or eight groups)
wic_col4wic_col4
A named vector
Three sets of colours used for filling education based plots based on the different availability of detailed education categories (four, six or eight groups)
wic_col6wic_col6
A named vector
Three sets of colours used for filling education based plots based on the different availability of detailed education categories (four, six or eight groups)
wic_col8wic_col8
A named vector
A data set containing the indicator codes, names and further details used in the Wittgenstein Centre Human Capital Data Explorer
wic_indicatorswic_indicators
A data frame with 37 rows and 11 variables, including:
Short name of indicator to be used in the indicator argument of the get_wcde() function
Brief description of indicator
Availability in wcde-v3 of projection-only or past-available (in addition to projections) of indicator. If value is NA then indicator not available in version.
Availability in wcde-v2 of projection-only or past-available (in addition to projections) of indicator. If value is NA then indicator not available in version.
Availability in wcde-v1 of projection-only or past-available (in addition to projections) of indicator. If value is NA then indicator not available in version.
Availability of indicator by five-year age groups
Availability of indicator by broad age groups
Availability of indicator with a new born age group
Availability of indicator by sex
Availability of indicator by education
Indicator is a period (flow)
Full definition for indicator based on latest available version
https://dataexplorer.wittgensteincentre.org/
A dataset containing the location codes, names and further details used in the Wittgenstein Centre Human Capital Data Explorer
wic_locationswic_locations
A data frame with 232 rows and 8 variables, including:
Area name
ISO 3 digit country code
Continent of country
UN region of country
Category or country/region/area
Availability of area in Version 3
Availability of area in Version 2
Availability of area in Version 1
https://dataexplorer.wittgensteincentre.org/
A data set containing the scenario codes, names short names used in the Wittgenstein Centre Human Capital Data Explorer
wic_scenarioswic_scenarios
A data frame with 9 rows and 6 variables, including:
Full scenario name
Code to match help file of get_wcde function
Short scenario name
Availability of area in Version 3
Availability of area in Version 2
Availability of area in Version 1
https://dataexplorer.wittgensteincentre.org/