economiccomplexity (version 0.1.2)

productivity_levels: Productivity Levels

Description

Productivity Levels

Usage

productivity_levels(trade_data = NULL, country1 = "country",
  product1 = "product", value1 = "value", gdp_data = NULL,
  country2 = "country", value2 = "value", tbl_output = FALSE)

Arguments

trade_data

matrix or tibble/data.frame (e.g. world_trade_2017). If the input is a matrix it must be a zero/one matrix with countries in rows and products in columns. If the input is a tibble/data.frame it must contain at least three columns with countries, products and values.

country1

string to indicate the column that contains exporting countries in revealed_comparative_advantage (set to "country" by default)

product1

string to indicate the column that contains exported products in revealed_comparative_advantage (set to "product" by default)

value1

string to indicate the column that contains traded values in revealed_comparative_advantage (set to "value" by default)

gdp_data

vector or tibble/data.frame (e.g. world_gdp_and_population_2017). If the input is a vector it must be a numeric vector with optional names. If the input is a tibble/data.frame it must contain at least two columns with countries and values.

country2

string to indicate the column that contains exporting countries in revealed_comparative_advantage (set to "country" by default)

value2

string to indicate the column that contains traded values in revealed_comparative_advantage (set to "value" by default)

tbl_output

when set to TRUE the output will be a tibble instead of a matrix (default set to FALSE)

References

For more information on prody and its applications see:

atlas2014economiccomplexity

exportmatters2005economiccomplexity

Examples

Run this code
# NOT RUN {
productivity_levels(
 trade_data = services_trade_2016$services_trade_2016_matrix,
 country1 = "country",
 product1 = "product",
 value1 = "value",
 gdp_data = gdp_pc_2016$gdp_pc_2016_numeric,
 country2 = "country",
 value2 = "value",
 tbl_output = TRUE
)
# }

Run the code above in your browser using DataCamp Workspace