wrp_get: Get aggregated data for a question in the World Risk Poll

View source: R/12-wrp_get.R

wrp_getR Documentation

Get aggregated data for a question in the World Risk Poll

Description

Allows you to access aggregated data for a World Risk Poll question.

Usage

wrp_get(geography = "country", wrp_question_uid = "Q1", disaggregation = 0)

Arguments

geography

string, a demographic category by which to aggregate

wrp_question_uid

string, the code for the survey question to focus on

disaggregation

integer within 0 to 9 (see details)

Details

The scope of the parameters for this function are defined by the World Risk Poll data set.

Entering parameters outside of the following will return an error message.

  • geography: Needs to be on of the following: "country", "region", "income", or "world".

  • wrp_question_uid: The code for the survey question to focus on, see wrp_search

  • disaggregation: The desired disaggregation is an integer between 0 and 9 to represent:

    • 0: No disaggregation: aggregates to the selected geography;

    • 1: Age group: respondent's age group;

    • 2: Sex: respondent's sex;

    • 3: Education: respondent's highest level of education;

    • 4: Income Feelings: respondent's feelings about their household income;

    • 5: Income Quintiles: respondent's per capita income quintile;

    • 6: Employment: respondent's employment Status

    • 7: Residence: respondent's residence: urban or rural;

    • 8: Household Size: total number of people in the respondent's household;

    • 9: Children in Household: total number of children under 15 in the respondent's household.

Value

A data frame with aggregated World Risk Poll question data.

See Also

wrp_search

Examples

wrp_get(geography = "country", wrp_question_uid = "Q1", disaggregation = 0)

worldriskpollr documentation built on April 3, 2023, 5:41 p.m.