get_upstream | R Documentation |
Returns measures of industry upstreamness and downstreamness based on Antras and Chor (2018) and Antras, Chor, Fally and Hillberry (2012).
get_upstream(
sourcevar,
origin,
country,
year,
setting = "GVC_Ui",
detailed = FALSE
)
sourcevar |
An input character vector of industry codes to look up. |
origin |
A string indicating one of the following industry/product classifications: "HS0" (1988/92), "HS1" (1996), "HS2" (2002), "HS3" (2007), "HS4" (2012), "HS5" (2017), "HS6" (2022), "HS" (combined), "SITC1" (1950), "SITC2" (1974), "SITC3" (1985), "SITC4" (2006), "NAICS2002", "NAICS2007", "NAICS2012", "NAICS2017", "ISIC2" (1968), "ISIC3" (1989), "ISIC3.1" (2002), "ISIC4" (2008), "BEC4" (2016). |
country |
A string setting the ISO 3-letter country code for which to return values (default = "USA"). Antras and Chor (2018) provide estimates for 40 countries and the Rest of the World (RoW). For a list of available countries, load the package and type "unique(upstream$ISO3C)". |
year |
An integer setting the year for which to return values. Antras and Chor (2018) provide estimates for 1995-2011. The default returns estimates for 2011. |
setting |
Choose one of the four available measures from Antras and Chor (2018).
|
detailed |
Choose whether to return more detailed industry-level GVC_Ui estimates following Antras, Chor, Fally, and Hillberry (2012). Note that these estimates only exist for USA in 2002, 2007, and 2012.
|
Concords each element of the input vector to 2-digit ISIC3 codes, then uses the corresponding codes as input to calculate weighted estimates of upstreamness or downstreamness. For detailed estimates, the function concords each element of the input vector to 6-digit BEA codes, and then calculates weighted average estimates of upstreamness (GVC_Ui).
Data from Pol Antras' webpage:
<https://scholar.harvard.edu/antras/publications/measurement-upstreamness-and-downstreamness-global-valuechains>
<https://scholar.harvard.edu/antras/publications/measuring-upstreamness-production-and-trade-flows>
Antras, Pol, and Davin Chor. 2018. "On the Measurement of Upstreamness and Downstreamness in Global Value Chains." World Trade Evolution: Growth, Productivity and Employment, 126-194. Taylor & Francis Group.
Antras, Pol, Davin Chor, Thibault Fally, and Russell Hillberry. 2012. "Measuring the Upstreamness of Production and Trade Flows." American Economic Review Papers and Proceedings 102(3), 412-416.
# ISIC3
get_upstream(sourcevar = c("01", "29", "29", "80"), origin = "ISIC3",
country = "USA", year = "2011",
setting = "GVC_Ui", detailed = FALSE)
# HS5
get_upstream(sourcevar = c("0101", "0301", "7014", "8420"), origin = "HS5",
country = "USA", year = "2012",
setting = "GVC_Ui", detailed = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.