Type: Package
Title: Product Concordance
Version: 2.0.0
Date: 2020-04-23
Description: A set of utilities for matching products in different classification codes used in international trade research. It supports concordance between the Harmonized System (HS0, HS1, HS2, HS3, HS4, HS5, HS combined), the Standard International Trade Classification (SITC1, SITC2, SITC3, SITC4), the North American Industry Classification System (NAICS combined), as well as the Broad Economic Categories (BEC), the International Standard of Industrial Classification (ISIC), and the Standard Industrial Classification (SIC). It also provides code nomenclature/descriptions look-up, Rauch classification look-up (via concordance to SITC2), and trade elasticity look-up (via concordance to HS0 or SITC3 codes).
License: GPL-2
Depends: R (≥ 3.6.0)
Imports: dplyr (≥ 0.8.5), purrr (≥ 0.3.3), rlang (≥ 0.4.5), stringr (≥ 1.4.0), tibble (≥ 3.0.0), tidyr (≥ 1.0.2)
LazyData: true
BugReports: https://github.com/insongkim/concordance/issues
RoxygenNote: 7.1.0
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2020-04-23 22:53:15 UTC; stevenliao-ucr
Author: Steven Liao [aut, cre], In Song Kim [aut], Sayumi Miyano [aut], Feng Zhu [aut]
Maintainer: Steven Liao <steven.liao@ucr.edu>
Repository: CRAN
Date/Publication: 2020-04-24 16:10:08 UTC

BEC Description

Description

A dataset containing the description of products under the BEC classification.

Usage

bec_desc

Format

A data frame with 29 rows and 2 variables:

code

BEC Code

desc

BEC Description

Source

https://comtrade.un.org/data/cache/classificationBEC.json


Concording Different Classification Codes

Description

Concords different classification codes used in international trade.

Usage

concord(sourcevar, origin, destination, dest.digit = 4, all = FALSE)

Arguments

sourcevar

An input character vector of industry/product codes to be converted.

origin

A string setting the input coding scheme. Currently supports: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS" (combined).

destination

A string setting the output coding scheme. Currently supports: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS" (combined).

dest.digit

An integer indicating the preferred number of digits for outputs. The default is 4 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Data consolidated from

Examples

# HS to NAICS
concord(sourcevar = c("120600", "854690"),
        origin = "HS", destination = "NAICS",
        dest.digit = 6, all = TRUE)
concord(sourcevar = c("120600", "854690"),
        origin = "HS", destination = "NAICS",
        dest.digit = 6, all = FALSE)

# NAICS to HS
concord(sourcevar = c("111120", "326199"),
        origin = "NAICS", destination = "HS",
        dest.digit = 6, all = TRUE)

# HS to SITC4
concord(sourcevar = c("120600", "854690"),
        origin = "HS", destination = "SITC4",
        dest.digit = 5, all = TRUE)

# SITC4 to HS
concord(sourcevar = c("22240", "77324"),
        origin = "SITC4", destination = "HS",
        dest.digit = 6, all = TRUE)

# SITC4 to NAICS
concord(sourcevar = c("22240", "77324"),
        origin = "SITC4", destination = "NAICS",
        dest.digit = 6, all = TRUE)

# NAICS to SITC4
concord(sourcevar = c("111120", "326199"),
        origin = "NAICS", destination = "SITC4",
        dest.digit = 5, all = TRUE)

Concord Within HS Codes

Description

Concords codes within the Harmonized System classification (HS0, HS1, HS2, HS3, HS4, HS5).

Usage

concord_hs(sourcevar, origin, destination, dest.digit = 4, all = FALSE)

Arguments

sourcevar

An input character vector of HS codes. The function accepts 2, 4, 6-digit HS codes.

origin

A string setting the input industry classification: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), and "HS5" (2017).

destination

A string setting the output industry classification: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), and "HS5" (2017).

dest.digit

An integer indicating the preferred number of digits for output codes. Allows 2, 4, or 6-digit HS codes. The default is 4 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Concordance tables provided by:

Examples

# HS5 to HS4
concord(sourcevar = c("1206", "8546"),
        origin = "HS5", destination = "HS4",
        dest.digit = 4, all = TRUE)

# HS0 to HS5
concord(sourcevar = c("010111", "382390"),
        origin = "HS0", destination = "HS5",
        dest.digit = 6, all = TRUE)

Converting HS and NAICS Codes

Description

Concords Harmonized System codes (HS0, HS1, HS2, HS3, HS4, HS5, HS combined) to and from North American Industry Classification System codes (NAICS combined).

Usage

concord_hs_naics(sourcevar, origin, destination, dest.digit = 6, all = FALSE)

Arguments

sourcevar

An input character vector of HS or NAICS codes. The function accepts 2, 4, 6-digit codes for HS and NAICS.

origin

A string setting the input industry classification: "HS" (combined), "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "NAICS" (combined).

destination

A string setting the output industry classification: "HS" (combined), "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "NAICS" (combined).

dest.digit

An integer indicating the preferred number of digits for output codes. Allows 2, 4, or 6 digits for HS and NAICS. The default is 6 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

HS-NAICS concordance tables between 1989 and 2017 from Pierce and Schott (2009, 2018) <https://faculty.som.yale.edu/peterschott/international-trade-data/>.

Examples

## HS combined to NAICS
# one input: one-to-one match
concord_hs_naics(sourcevar = "120600",
                 origin = "HS", destination = "NAICS",
                 all = FALSE)
concord_hs_naics(sourcevar = "120600",
                 origin = "HS", destination = "NAICS",
                 all = TRUE)

# two inputs: multiple-to-one match
concord_hs_naics(sourcevar = c("120600", "120400"),
                 origin = "HS", destination = "NAICS",
                 all = FALSE)
concord_hs_naics(sourcevar = c("120600", "120400"),
                 origin = "HS", destination = "NAICS",
                 all = TRUE)

# two inputs: repeated
concord_hs_naics(sourcevar = c("120600", "120600"),
                 origin = "HS", destination = "NAICS",
                 all = FALSE)

# one to multiple matches
concord_hs_naics(sourcevar = c("120600", "854690"),
                 origin = "HS", destination = "NAICS",
                 all = TRUE)

# if no match, will return NA and give warning message
concord_hs_naics(sourcevar = c("120600", "120800"),
                 origin = "HS", destination = "NAICS",
                 all = FALSE)

# 4-digit inputs
concord_hs_naics(sourcevar = c("1206", "8546"),
                 origin = "HS", destination = "NAICS",
                 all = TRUE)

# 4-digit outputs
concord_hs_naics(sourcevar = c("120600", "854690"),
                 origin = "HS", destination = "NAICS",
                 dest.digit = 4, all = TRUE)

## HS5 to NAICS
concord_hs_naics(sourcevar = c("1206", "8546"),
                 origin = "HS5", destination = "NAICS",
                 all = TRUE)

concord_hs_naics(sourcevar = c("120600", "854690"),
                 origin = "HS5", destination = "NAICS",
                 dest.digit = 4, all = TRUE)

## NAICS to HS
concord_hs_naics(sourcevar = c("1111", "3271"),
                 origin = "NAICS", destination = "HS",
                 all = TRUE)

concord_hs_naics(sourcevar = c("111120", "326199"),
                 origin = "NAICS", destination = "HS",
                 dest.digit = 4, all = TRUE)

Converting HS and SITC Codes

Description

Concords Harmonized System codes (HS0, HS1, HS2, HS3, HS4, HS5, HS combined) to and from Standard International Trade Classification codes (SITC Revision 1, 2, 3, 4).

Usage

concord_hs_sitc(sourcevar, origin, destination, dest.digit = 4, all = FALSE)

Arguments

sourcevar

An input character vector of HS or SITC codes. The function accepts 2, 4, 6-digit codes for HS and 1 to 5-digit codes for SITC.

origin

A string setting the input industry classification: "HS" (combined), "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), and "SITC4" (2006).

destination

A string setting the output industry classification: "HS" (combined), "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006).

dest.digit

An integer indicating the preferred number of digits for output codes. Allows 2, 4, or 6 digits for HS codes and 1 to 5 digits for SITC codes. The default is 4 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Concordance tables provided by:

Examples

## HS combined to SITC4
# one input: one-to-one match
concord_hs_sitc(sourcevar = "120600",
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = FALSE)

concord_hs_sitc(sourcevar = "120600",
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = TRUE)

# two inputs: multiple-to-one match
concord_hs_sitc(sourcevar = c("010110", "010119"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = FALSE)

concord_hs_sitc(sourcevar = c("010110", "010119"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = TRUE)

# two inputs: repeated
concord_hs_sitc(sourcevar = c("120600", "120600"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = FALSE)

# one to multiple matches
concord_hs_sitc(sourcevar = c("1206", "1001"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = TRUE)

# if no match, will return NA and give warning message
concord_hs_sitc(sourcevar = c("120600", "120610"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = FALSE)

# 4-digit inputs, 5-digit outputs
concord_hs_sitc(sourcevar = c("1206", "8546"),
                origin = "HS", destination = "SITC4",
                dest.digit = 5, all = TRUE)

# 6-digit inputs, 3-digit outputs
concord_hs_sitc(sourcevar = c("120600", "854610"),
                origin = "HS", destination = "SITC4",
                dest.digit = 3, all = TRUE)

## SITC4 to HS combined
concord_hs_sitc(sourcevar = c("22240", "77322"),
                origin = "SITC4", destination = "HS",
                dest.digit = 6, all = FALSE)

Concord Within SITC Codes

Description

Concords codes within the Standard International Trade Classification classification (SITC Revision 1, 2, 3, 4).

Usage

concord_sitc(sourcevar, origin, destination, dest.digit = 4, all = FALSE)

Arguments

sourcevar

An input character vector of SITC codes. The function accepts 1 to 5-digit SITC codes.

origin

A string setting the input industry classification: "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006).

destination

A string setting the output industry classification: "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006).

dest.digit

An integer indicating the preferred number of digits for output codes. Allows 1 to 5-digit SITC codes. The default is 4 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use SITC code 01211 instead of 1211)—results may be buggy otherwise.

Source

Concordance tables provided by:

Examples

# SITC4 to SITC3
concord_sitc(sourcevar = c("22240", "04110"), origin = "SITC4",
             destination = "SITC3", dest.digit = 5, all = TRUE)

# SITC1 to SITC4
concord_sitc(sourcevar = c("22180", "04100"), origin = "SITC1",
             destination = "SITC4", dest.digit = 5, all = TRUE)

Converting SITC and NAICS Codes

Description

Concords Standard International Trade Classification classification codes (SITC Revision 1, 2, 3, 4) to and from North American Industry Classification System codes (NAICS combined).

Usage

concord_sitc_naics(sourcevar, origin, destination, dest.digit = 4, all = FALSE)

Arguments

sourcevar

An input character vector of SITC or NAICS codes. The function accepts 1 to 5-digit codes for SITC and 2, 4, 6-digit codes for NAICS.

origin

A string setting the input industry classification: "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS" (combined).

destination

A string setting the output industry classification: "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS" (combined).

dest.digit

An integer indicating the preferred number of digits for output codes. Allows 1 to 5-digit codes for SITC and 2, 4, 6-digit codes for NAICS. The default is 4 digits.

all

Either TRUE or FALSE. If TRUE, the function will return (1) all matched outputs for each input, and (2) the share of occurrences for each matched output among all matched outputs. Users can use the shares as weights for more precise concordances. If FALSE, the function will only return the matched output with the largest share of occurrences (the mode match). If the mode consists of multiple matches, the function will return the first matched output.

Value

The matched output(s) for each element of the input vector. Either a list object when all = TRUE or a character vector when all = FALSE.

Note

Always include leading zeros in codes (e.g. use SITC code 01211 instead of 1211)—results may be buggy otherwise.

Source

SITC-NAICS concordances are mapped through HS (combined):

Examples

## SITC4 to NAICS
# one input: one-to-one match
concord_sitc_naics(sourcevar = "22240",
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = FALSE)
concord_sitc_naics(sourcevar = "22240",
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = TRUE)

# two inputs: multiple-to-one match
concord_sitc_naics(sourcevar = c("22240", "04110"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = FALSE)
concord_sitc_naics(sourcevar = c("22240", "04110"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = TRUE)

# two inputs: repeated
concord_sitc_naics(sourcevar = c("22240", "22240"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = FALSE)

# one to multiple matches
concord_sitc_naics(sourcevar = c("22240", "00190"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = TRUE)

# if no match, will return NA and give warning message
concord_sitc_naics(sourcevar = c("22240", "00160"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = FALSE)

# 4-digit inputs
concord_sitc_naics(sourcevar = c("2224", "0019"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = TRUE)

# 4-digit outputs
concord_sitc_naics(sourcevar = c("22240", "00190"),
                   origin = "SITC4", destination = "NAICS",
                   dest.digit = 6, all = TRUE)

## NAICS to SITC4
concord_sitc_naics(sourcevar = c("111120", "326199"),
                   origin = "NAICS", destination = "SITC4",
                   dest.digit = 4, all = TRUE)

Looking Up Product Description

Description

Returns the description of product codes.

Usage

get_desc(sourcevar, origin)

Arguments

sourcevar

A character vector of input codes.

origin

A string indicating one of the following industry/product classifications: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS2002", "NAICS2007", "NAICS2012", "NAICS2017", "ISIC2" (1968), "ISIC3" (1989), "ISIC4" (2008), "BEC".

Value

A character vector giving the title/description of each element of the input codes.

Note

Always include leading zeroes in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Data consolidated from

Examples

# HS
get_desc(sourcevar = c("120600", "854690"), origin = "HS")

# Returns NA when no concordances exist and gives warning message
get_desc(sourcevar = c("120600", "120601", "854690"), origin = "HS")

# HS0
get_desc(sourcevar = c("120600", "854690"), origin = "HS0")

# HS1
get_desc(sourcevar = c("120600", "854690"), origin = "HS1")

# HS2
get_desc(sourcevar = c("120600", "854690"), origin = "HS2")

# HS3
get_desc(sourcevar = c("120600", "854690"), origin = "HS3")

# HS4
get_desc(sourcevar = c("120600", "854690"), origin = "HS4")

# HS5
get_desc(sourcevar = c("120600", "854690"), origin = "HS5")

# NAICS 2002
get_desc(sourcevar = c("111120", "326199"), origin = "NAICS2002")

# NAICS 2007
get_desc(sourcevar = c("111120", "326199"), origin = "NAICS2007")

# NAICS 2012
get_desc(sourcevar = c("111120", "326199"), origin = "NAICS2012")

# NAICS 2017
get_desc(sourcevar = c("111120", "326199"), origin = "NAICS2017")

# ISIC2
get_desc(sourcevar = c("3114", "3831"), origin = "ISIC2")

# ISIC3
get_desc(sourcevar = c("1512", "3110"), origin = "ISIC3")

# ISIC4
get_desc(sourcevar = c("1512", "3110"), origin = "ISIC4")

# SITC1
get_desc(sourcevar = c("4216", "7232"), origin = "SITC1")

# SITC2
get_desc(sourcevar = c("4236", "7732"), origin = "SITC2")

# SITC3
get_desc(sourcevar = c("4221", "7732"), origin = "SITC3")

# SITC4
get_desc(sourcevar = c("4221", "7732"), origin = "SITC4")

# BEC
get_desc(sourcevar = c("001", "111"), origin = "BEC")

Looking Up Product Differentiation

Description

Returns Rauch's classification of product differentiation. Rauch classifies 4-digit SITC2 codes according to three possible types: differentiated products ("n"), reference priced ("r"), and homogeneous goods traded on an organized exchange ("w").

Usage

get_proddiff(sourcevar, origin, setting = "CON", prop = "")

Arguments

sourcevar

An input character vector of industry/product codes.

origin

A string setting the input coding scheme. Supports the following classifications: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS" (combined).

setting

Choose "CON" (conservative, default) or "LIB" (liberal) classification.

prop

Can be set to "n", "r", or "w", in which case the function will return, respectively, the proportion of type "n", "r", or "w" in the resulting vector of Rauch indices. If prop is not set to any of these, then the function returns, for each input code, a dataframe that summarizes all the frequencies and proportions of type "w", "r", and "n".

Value

Concords each element of the input vector to 4-digit SITC2 codes, then uses the corresponding codes as input to extract Rauch product differentiation indices.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Data from Jon Haveman's International Trade Data page <http://www.macalester.edu/research/economics/PAGE/HAVEMAN/Trade.Resources/TradeData.html#Rauch>.

References

Rauch, James E. 1999. "Networks Versus Markets in International Trade," Journal of International Economics 48(1): 7–35.

Examples

# SITC2 input
get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC2", setting = "CON", prop = "")

get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC2", setting = "CON", prop = "r")

get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC2", setting = "CON", prop = "w")

get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC2", setting = "CON", prop = "n")

get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC2", setting = "LIB", prop = "")

# SITC3 input
get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC3", setting = "CON", prop = "")

# SITC4 input
get_proddiff(sourcevar = c("22240", "04110"), origin = "SITC4", setting = "CON", prop = "")

# HS input
get_proddiff(sourcevar = c("1206", "1001", "8546"), origin = "HS", setting = "CON", prop = "")

# NAICS input
get_proddiff(sourcevar = c("111120", "326199"), origin = "NAICS", setting = "CON", prop = "")

Looking Up Product Elasticity

Description

Returns product-level import demand elasticities based on 3-digit HS0 estimates from Broda and Weinstein (QJE, 2006) for 73 countries.

Usage

get_sigma(
  sourcevar,
  origin,
  country = "USA",
  use_SITC = FALSE,
  give_avg = TRUE
)

Arguments

sourcevar

An input character vector of industry/product codes.

origin

A string setting the input coding scheme. Supports the following classifications: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), and "NAICS" (combined).

country

A string setting the ISO 3-letter country code for which to return import demand elasticities (default = "USA"). For a list of available countries, load the package and type "unique(sigma_hs0_3d$iso3c)".

use_SITC

Set to FALSE by default. Set to TRUE if you wish to look up elasticities via 5-digit SITC3 codes instead. Only available for the United States.

give_avg

Set to FALSE if you wish to obtain the full vector of elasticities for all matching codes of each element in the input vector. When set to TRUE (as by default) each output element will be a simple average of all elasticities (of matched codes) in the corresponding vector.

Value

Concords vector of input codes to 3-digit HS0 codes and then extracts the corresponding product-level import demand elasticities in the country selected by the user. For the United States (only), Broda and Weinstein (2006) have also estimated elasticities based on more fine-grained 5-digit SITC3 codes. Set use_SITC to TRUE to obtain elasticities in the United States via this method.

Note

Always include leading zeros in codes (e.g. use HS code 010110 instead of 10110)—results may be buggy otherwise.

Source

Data from David E. Weinstein's webpage <http://www.columbia.edu/~dew35/TradeElasticities/TradeElasticities.html>.

References

Broda, Christian, and David E. Weinstein. 2006. "Globalization and the Gains from Variety," Quarterly Journal of Economics, 121(2): 541–585.

Examples

# South Korea, SITC4 input
get_sigma(sourcevar = c("21170", "69978", "21170"), origin = "SITC4",
          country = "KOR", use_SITC = FALSE, give_avg = TRUE)

get_sigma(sourcevar = c("21170", "69978", "21170"), origin = "SITC4",
          country = "KOR", use_SITC = FALSE, give_avg = FALSE)

# United States, HS5 input, SITC3 estimates
get_sigma(sourcevar = c("0101", "0207", "0101"), origin = "HS5",
          country = "USA", use_SITC = TRUE, give_avg = FALSE)

get_sigma(sourcevar = c("0101", "0207", "0101"), origin = "HS5",
          country = "USA", use_SITC = TRUE, give_avg = TRUE)

HS0 Description

Description

A dataset containing the description of products under the HS0 classification.

Usage

hs0_desc

Format

A data frame with 6380 rows and 2 variables:

code

HS0 Code

desc

HS0 Description

Source

https://comtrade.un.org/data/cache/classificationH0.json


HS0-NAICS Concordance

Description

A dataset containing concordances between HS0 and NAICS (combined) classification.

Usage

hs0_naics

Format

A data frame with 8058 rows and 6 variables:

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS0-SITC1 Concordance

Description

A dataset containing concordances between HS0 and SITC1 classification.

Usage

hs0_sitc1

Format

A data frame with 5012 rows and 8 variables:

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://wits.worldbank.org/product_concordance.html


HS0-SITC2 Concordance

Description

A dataset containing concordances between HS0 and SITC2 classification.

Usage

hs0_sitc2

Format

A data frame with 5017 rows and 8 variables:

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://wits.worldbank.org/product_concordance.html


HS0-SITC3 Concordance

Description

A dataset containing concordances between HS0 and SITC3 classification.

Usage

hs0_sitc3

Format

A data frame with 5017 rows and 8 variables:

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://wits.worldbank.org/product_concordance.html


HS0-SITC4 Concordance

Description

A dataset containing concordances between HS0 and SITC4 classification.

Usage

hs0_sitc4

Format

A data frame with 5018 rows and 8 variables:

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://wits.worldbank.org/product_concordance.html


HS1 Description

Description

A dataset containing the description of products under the HS1 classification.

Usage

hs1_desc

Format

A data frame with 6473 rows and 2 variables:

code

HS1 Code

desc

HS1 Description

Source

https://comtrade.un.org/data/cache/classificationH1.json


HS1-HS0 Concordance

Description

A dataset containing concordances between HS1 and HS0 classification.

Usage

hs1_hs0

Format

A data frame with 5130 rows and 6 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS1-NAICS Concordance

Description

A dataset containing concordances between HS1 and NAICS (combined) classification.

Usage

hs1_naics

Format

A data frame with 8297 rows and 6 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS1-SITC1 Concordance

Description

A dataset containing concordances between HS1 and SITC1 classification.

Usage

hs1_sitc1

Format

A data frame with 5106 rows and 8 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://wits.worldbank.org/product_concordance.html


HS1-SITC2 Concordance

Description

A dataset containing concordances between HS1 and SITC2 classification.

Usage

hs1_sitc2

Format

A data frame with 5111 rows and 8 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://wits.worldbank.org/product_concordance.html


HS1-SITC3 Concordance

Description

A dataset containing concordances between HS1 and SITC3 classification.

Usage

hs1_sitc3

Format

A data frame with 5111 rows and 8 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://wits.worldbank.org/product_concordance.html


HS1-SITC4 Concordance

Description

A dataset containing concordances between HS1 and SITC4 classification.

Usage

hs1_sitc4

Format

A data frame with 5111 rows and 8 variables:

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://wits.worldbank.org/product_concordance.html


HS2 Description

Description

A dataset containing the description of products under the HS2 classification.

Usage

hs2_desc

Format

A data frame with 6568 rows and 2 variables:

code

HS2 Code

desc

HS2 Description

Source

https://comtrade.un.org/data/cache/classificationH2.json


HS2-HS0 Concordance

Description

A dataset containing concordances between HS2 and HS0 classification.

Usage

hs2_hs0

Format

A data frame with 5223 rows and 6 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS2-HS1 Concordance

Description

A dataset containing concordances between HS2 and HS1 classification.

Usage

hs2_hs1

Format

A data frame with 5223 rows and 6 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS2-NAICS Concordance

Description

A dataset containing concordances between HS2 and NAICS (combined) classification.

Usage

hs2_naics

Format

A data frame with 8609 rows and 6 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS2-SITC1 Concordance

Description

A dataset containing concordances between HS2 and SITC1 classification.

Usage

hs2_sitc1

Format

A data frame with 5217 rows and 8 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://wits.worldbank.org/product_concordance.html


HS2-SITC2 Concordance

Description

A dataset containing concordances between HS2 and SITC2 classification.

Usage

hs2_sitc2

Format

A data frame with 5222 rows and 8 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://wits.worldbank.org/product_concordance.html


HS2-SITC3 Concordance

Description

A dataset containing concordances between HS2 and SITC3 classification.

Usage

hs2_sitc3

Format

A data frame with 5222 rows and 8 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://wits.worldbank.org/product_concordance.html


HS2-SITC4 Concordance

Description

A dataset containing concordances between HS2 and SITC4 classification.

Usage

hs2_sitc4

Format

A data frame with 5220 rows and 8 variables:

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://wits.worldbank.org/product_concordance.html


HS3 Description

Description

A dataset containing the description of products under the HS3 classification.

Usage

hs3_desc

Format

A data frame with 6372 rows and 2 variables:

code

HS3 Code

desc

HS3 Description

Source

https://comtrade.un.org/data/cache/classificationH3.json


HS3-HS0 Concordance

Description

A dataset containing concordances between HS3 and HS0 classification.

Usage

hs3_hs0

Format

A data frame with 5053 rows and 6 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS3-HS1 Concordance

Description

A dataset containing concordances between HS3 and HS1 classification.

Usage

hs3_hs1

Format

A data frame with 5052 rows and 6 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS3-HS2 Concordance

Description

A dataset containing concordances between HS3 and HS2 classification.

Usage

hs3_hs2

Format

A data frame with 5052 rows and 6 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS3-NAICS Concordance

Description

A dataset containing concordances between HS3 and NAICS (combined) classification.

Usage

hs3_naics

Format

A data frame with 8545 rows and 6 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS3-SITC1 Concordance

Description

A dataset containing concordances between HS3 and SITC1 classification.

Usage

hs3_sitc1

Format

A data frame with 5045 rows and 8 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://wits.worldbank.org/product_concordance.html


HS3-SITC2 Concordance

Description

A dataset containing concordances between HS3 and SITC2 classification.

Usage

hs3_sitc2

Format

A data frame with 5050 rows and 8 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://wits.worldbank.org/product_concordance.html


HS3-SITC3 Concordance

Description

A dataset containing concordances between HS3 and SITC3 classification.

Usage

hs3_sitc3

Format

A data frame with 5050 rows and 8 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://wits.worldbank.org/product_concordance.html


HS3-SITC4 Concordance

Description

A dataset containing concordances between HS3 and SITC4 classification.

Usage

hs3_sitc4

Format

A data frame with 5050 rows and 8 variables:

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://wits.worldbank.org/product_concordance.html


HS4 Description

Description

A dataset containing the description of products under the HS4 classification.

Usage

hs4_desc

Format

A data frame with 6528 rows and 2 variables:

code

HS4 Code

desc

HS4 Description

Source

https://comtrade.un.org/data/cache/classificationH4.json


HS4-HS0 Concordance

Description

A dataset containing concordances between HS4 and HS0 classification.

Usage

hs4_hs0

Format

A data frame with 5206 rows and 6 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-HS1 Concordance

Description

A dataset containing concordances between HS4 and HS1 classification.

Usage

hs4_hs1

Format

A data frame with 5206 rows and 6 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-HS2 Concordance

Description

A dataset containing concordances between HS4 and HS2 classification.

Usage

hs4_hs2

Format

A data frame with 5206 rows and 6 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-HS3 Concordance

Description

A dataset containing concordances between HS4 and HS3 classification.

Usage

hs4_hs3

Format

A data frame with 5205 rows and 6 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-NAICS Concordance

Description

A dataset containing concordances between HS4 and NAICS (combined) classification.

Usage

hs4_naics

Format

A data frame with 8790 rows and 6 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS4-SITC1 Concordance

Description

A dataset containing concordances between HS4 and SITC1 classification.

Usage

hs4_sitc1

Format

A data frame with 5199 rows and 8 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-SITC2 Concordance

Description

A dataset containing concordances between HS4 and SITC2 classification.

Usage

hs4_sitc2

Format

A data frame with 5205 rows and 8 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-SITC3 Concordance

Description

A dataset containing concordances between HS4 and SITC3 classification.

Usage

hs4_sitc3

Format

A data frame with 5206 rows and 8 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS4-SITC4 Concordance

Description

A dataset containing concordances between HS4 and SITC4 classification.

Usage

hs4_sitc4

Format

A data frame with 5205 rows and 8 variables:

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5 Description

Description

A dataset containing the description of products under the HS5 classification.

Usage

hs5_desc

Format

A data frame with 6708 rows and 2 variables:

code

HS5 Code

desc

HS5 Description

Source

https://comtrade.un.org/data/cache/classificationH5.json


HS5-HS0 Concordance

Description

A dataset containing concordances between HS5 and HS0 classification.

Usage

hs5_hs0

Format

A data frame with 5388 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

HS0_6d

6-digit HS0 Code

HS0_4d

4-digit HS0 Code

HS0_2d

2-digit HS0 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-HS1 Concordance

Description

A dataset containing concordances between HS5 and HS1 classification.

Usage

hs5_hs1

Format

A data frame with 5388 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

HS1_6d

6-digit HS1 Code

HS1_4d

4-digit HS1 Code

HS1_2d

2-digit HS1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-HS2 Concordance

Description

A dataset containing concordances between HS5 and HS2 classification.

Usage

hs5_hs2

Format

A data frame with 5388 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

HS2_6d

6-digit HS2 Code

HS2_4d

4-digit HS2 Code

HS2_2d

2-digit HS2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-HS3 Concordance

Description

A dataset containing concordances between HS5 and HS3 classification.

Usage

hs5_hs3

Format

A data frame with 5388 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

HS3_6d

6-digit HS3 Code

HS3_4d

4-digit HS3 Code

HS3_2d

2-digit HS3 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-HS4 Concordance

Description

A dataset containing concordances between HS5 and HS4 classification.

Usage

hs5_hs4

Format

A data frame with 5388 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

HS4_6d

6-digit HS4 Code

HS4_4d

4-digit HS4 Code

HS4_2d

2-digit HS4 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-NAICS Concordance

Description

A dataset containing concordances between HS5 and NAICS (combined) classification.

Usage

hs5_naics

Format

A data frame with 8973 rows and 6 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS5-SITC1 Concordance

Description

A dataset containing concordances between HS5 and SITC1 classification.

Usage

hs5_sitc1

Format

A data frame with 5381 rows and 8 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-SITC2 Concordance

Description

A dataset containing concordances between HS5 and SITC2 classification.

Usage

hs5_sitc2

Format

A data frame with 5387 rows and 8 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-SITC3 Concordance

Description

A dataset containing concordances between HS5 and SITC3 classification.

Usage

hs5_sitc3

Format

A data frame with 5387 rows and 8 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS5-SITC4 Concordance

Description

A dataset containing concordances between HS5 and SITC4 classification.

Usage

hs5_sitc4

Format

A data frame with 5387 rows and 8 variables:

HS5_6d

6-digit HS5 Code

HS5_4d

4-digit HS5 Code

HS5_2d

2-digit HS5 Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS (Combined) Description

Description

A dataset containing the description of products under the HS (Combined) classification.

Usage

hs_desc

Format

A data frame with 7911 rows and 2 variables:

code

HS Code

desc

HS Description


HS-NAICS Concordance

Description

A dataset containing concordances between HS (combined) and NAICS (combined) classification.

Usage

hs_naics

Format

A data frame with 10399 rows and 6 variables:

HS_6d

6-digit HS Code

HS_4d

4-digit HS Code

HS_2d

2-digit HS Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


HS-SITC1 Concordance

Description

A dataset containing concordances between HS (combined) and SITC1 classification.

Usage

hs_sitc1

Format

A data frame with 7683 rows and 8 variables:

HS_6d

6-digit HS Code

HS_4d

4-digit HS Code

HS_2d

2-digit HS Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS-SITC2 Concordance

Description

A dataset containing concordances between HS (combined) and SITC2 classification.

Usage

hs_sitc2

Format

A data frame with 8346 rows and 8 variables:

HS_6d

6-digit HS Code

HS_4d

4-digit HS Code

HS_2d

2-digit HS Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS-SITC3 Concordance

Description

A dataset containing concordances between HS (combined) and SITC3 classification.

Usage

hs_sitc3

Format

A data frame with 6826 rows and 8 variables:

HS_6d

6-digit HS Code

HS_4d

4-digit HS Code

HS_2d

2-digit HS Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


HS-SITC4 Concordance

Description

A dataset containing concordances between HS (combined) and SITC4 classification.

Usage

hs_sitc4

Format

A data frame with 6582 rows and 8 variables:

HS_6d

6-digit HS Code

HS_4d

4-digit HS Code

HS_2d

2-digit HS Code

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


ISIC2 Description

Description

A dataset containing the description of products under the ISIC2 classification.

Usage

isic2_desc

Format

A data frame with 276 rows and 2 variables:

code

ISIC2 Code

desc

ISIC2 Description

Source

https://unstats.un.org/unsd/classifications/Econ/ISIC


ISIC3 Description

Description

A dataset containing the description of products under the ISIC3 classification.

Usage

isic3_desc

Format

A data frame with 528 rows and 2 variables:

code

ISIC3 Code

desc

ISIC3 Description

Source

https://unstats.un.org/unsd/classifications/Econ/ISIC


ISIC4 Description

Description

A dataset containing the description of products under the ISIC4 classification.

Usage

isic4_desc

Format

A data frame with 766 rows and 2 variables:

code

ISIC4 Code

desc

ISIC4 Description

Source

https://unstats.un.org/unsd/classifications/Econ/ISIC


NAICS 2002 Description

Description

A dataset containing the description of products under the NAICS 2002 classification.

Usage

naics2002_desc

Format

A data frame with 2341 rows and 2 variables:

code

NAICS 2002 Code

desc

NAICS 2002 Description

Source

https://www.census.gov/eos/www/naics/


NAICS 2007 Description

Description

A dataset containing the description of products under the NAICS 2007 classification.

Usage

naics2007_desc

Format

A data frame with 2328 rows and 2 variables:

code

NAICS 2007 Code

desc

NAICS 2007 Description

Source

https://www.census.gov/eos/www/naics/


NAICS 2012 Description

Description

A dataset containing the description of products under the NAICS 2012 classification.

Usage

naics2012_desc

Format

A data frame with 2229 rows and 2 variables:

code

NAICS 2012 Code

desc

NAICS 2012 Description

Source

https://data.bls.gov/cew/apps/bls_naics/v2/bls_naics_app.htm#tab=download&naics=2012


NAICS 2017 Description

Description

A dataset containing the description of products under the NAICS 2017 classification.

Usage

naics2017_desc

Format

A data frame with 2217 rows and 2 variables:

code

NAICS 2017 Code

desc

NAICS 2017 Description

Source

https://data.bls.gov/cew/apps/bls_naics/v2/bls_naics_app.htm#tab=download&naics=2017


Sigma Table (3-Digit HS0)

Description

A dataset containing import demand elasticities by HS0 3-digit codes from Broda and Weinstein (QJE, 2006) for 73 countries.

Usage

sigma_hs0

Format

A data frame with 11293 rows and 4 variables:

iso3c

ISO 3-letter Country Code

HS0_3d

3-digit HS0 Code

HS0_2d

2-digit HS0 Code

sigma

Import Demand Elasticity

Source

http://www.columbia.edu/~dew35/TradeElasticities/TradeElasticities.html

References

C. Broda and D. Weinstein, "Globalization and the Gains from Variety," Quarterly Journal of Economics, Volume 121, Issue 2 - May 2006.


Sigma Table (5-Digit SITC3)

Description

A dataset containing import demand elasticities for the United States by 5-digit SITC3 codes from Broda and Weinstein (QJE, 2006).

Usage

sigma_sitc3

Format

A data frame with 2716 rows and 7 variables:

iso3c

ISO 3-letter Country Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

sigma

Import Demand Elasticity

Source

http://www.columbia.edu/~dew35/TradeElasticities/TradeElasticities.html

References

C. Broda and D. Weinstein, "Globalization and the Gains from Variety," Quarterly Journal of Economics, Volume 121, Issue 2 - May 2006.


SITC1 Description

Description

A dataset containing the description of products under the SITC1 classification.

Usage

sitc1_desc

Format

A data frame with 3024 rows and 2 variables:

code

SITC1 Code

desc

SITC1 Description

Source

https://comtrade.un.org/data/cache/classificationS1.json


SITC1-NAICS Concordance

Description

A dataset containing concordances between SITC1 and NAICS (combined) classification via HS (combined).

Usage

sitc1_naics

Format

A data frame with 3797 rows and 8 variables:

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp; Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


SITC2 Description

Description

A dataset containing the description of products under the SITC2 classification.

Usage

sitc2_desc

Format

A data frame with 3988 rows and 2 variables:

code

SITC2 Code

desc

SITC2 Description

Source

https://comtrade.un.org/data/cache/classificationS2.json


SITC2-NAICS Concordance

Description

A dataset containing concordances between SITC2 and NAICS (combined) classification via HS (combined).

Usage

sitc2_naics

Format

A data frame with 5065 rows and 8 variables:

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp; Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


SITC2-Rauch Concordance

Description

A dataset containing concordances between SITC2 and Rauch's classification.

Usage

sitc2_rauch

Format

A data frame with 1189 rows and 3 variables:

SITC2

SITC2 Code

CON

Conservative classification

LIB

Liberal classification

Source

Data from Jon Haveman's International Trade Data page: http://www.macalester.edu/research/economics/PAGE/HAVEMAN/Trade.Resources/TradeData.html#Rauch


SITC2-SITC1 Concordance

Description

A dataset containing concordances between SITC2 and SITC1 classification.

Usage

sitc2_sitc1

Format

A data frame with 1833 rows and 10 variables:

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


SITC3 Description

Description

A dataset containing the description of products under the SITC3 classification.

Usage

sitc3_desc

Format

A data frame with 5951 rows and 2 variables:

code

SITC3 Code

desc

SITC3 Description

Source

https://comtrade.un.org/data/cache/classificationS3.json


SITC3-NAICS Concordance

Description

A dataset containing concordances between SITC3 and NAICS (combined) classification via HS (combined).

Usage

sitc3_naics

Format

A data frame with 6024 rows and 8 variables:

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp; Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


SITC3-SITC1 Concordance

Description

A dataset containing concordances between SITC3 and SITC1 classification.

Usage

sitc3_sitc1

Format

A data frame with 3118 rows and 10 variables:

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


SITC3-SITC2 Concordance

Description

A dataset containing concordances between SITC3 and SITC2 classification.

Usage

sitc3_sitc2

Format

A data frame with 3121 rows and 10 variables:

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


SITC4 Description

Description

A dataset containing the description of products under the SITC4 classification.

Usage

sitc4_desc

Format

A data frame with 7239 rows and 2 variables:

code

SITC4 Code

desc

SITC4 Description

Source

https://comtrade.un.org/data/cache/classificationS4.json


SITC4-NAICS Concordance

Description

A dataset containing concordances between SITC4 and NAICS (combined) classification via HS (combined).

Usage

sitc4_naics

Format

A data frame with 5714 rows and 8 variables:

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

NAICS_6d

6-digit NAICS Code

NAICS_4d

4-digit NAICS Code

NAICS_2d

2-digit NAICS Code

Source

https://wits.worldbank.org/product_concordance.html; https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp; Pierce and Schott (2009, 2018),https://spinup-000d1a-wp-offload-media.s3.amazonaws.com/faculty/wp-content/uploads/sites/47/2019/06/hssicnaics_20181015.zip


SITC4-SITC1 Concordance

Description

A dataset containing concordances between SITC4 and SITC1 classification.

Usage

sitc4_sitc1

Format

A data frame with 3199 rows and 10 variables:

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

SITC1_5d

5-digit SITC1 Code

SITC1_4d

4-digit SITC1 Code

SITC1_3d

3-digit SITC1 Code

SITC1_2d

2-digit SITC1 Code

SITC1_1d

1-digit SITC1 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


SITC4-SITC2 Concordance

Description

A dataset containing concordances between SITC4 and SITC2 classification.

Usage

sitc4_sitc2

Format

A data frame with 3271 rows and 10 variables:

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

SITC2_5d

5-digit SITC2 Code

SITC2_4d

4-digit SITC2 Code

SITC2_3d

3-digit SITC2 Code

SITC2_2d

2-digit SITC2 Code

SITC2_1d

1-digit SITC2 Code

Source

https://unstats.un.org/unsd/trade/classifications/correspondence-tables.asp


A dataset containing concordances between SITC4 and SITC3 classification.

Description

A dataset containing concordances between SITC4 and SITC3 classification.

Usage

sitc4_sitc3

Format

A data frame with 3488 rows and 10 variables:

SITC4_5d

5-digit SITC4 Code

SITC4_4d

4-digit SITC4 Code

SITC4_3d

3-digit SITC4 Code

SITC4_2d

2-digit SITC4 Code

SITC4_1d

1-digit SITC4 Code

SITC3_5d

5-digit SITC3 Code

SITC3_4d

4-digit SITC3 Code

SITC3_3d

3-digit SITC3 Code

SITC3_2d

2-digit SITC3 Code

SITC3_1d

1-digit SITC3 Code

Source

https://unstats.un.org/unsd/trade/sitcrev4.htm