This document provides a step-by-step view of the data preparation and calculation stages for a specific analytical task, as well as visualizations of some preliminary findings. It is part of a research project concerned with assessing the involvement of developing economies in Global Value Chains of non-renewable resource (NRR) sectors during the 2005-2014 period.
This project is part of my dissertation on value capturing through NRR-based industries, which partially fulfills the requirements for a doctoral degree in Public Policy at The New School University, NYC.
The main task is to calculate sector-level indexes of participation and position in NRR-based Global Production Networks (GPN). On the one hand, the GPN participation index estimates the share of gross sector-related exports and output involved in a vertically fragmented production process. Our index focuses on inter-industry trade (among different sectors) to account for the inputs that make possible the exploitation of own NRR; that is, it signals the integration of domestic inter-industry supply chains in GPN:
\[\sf{GPNPRT_{c,j}}=\frac{\sum_{i=1,i≠j}^{I} {IM_{i,j,c}}}{\sf{Y_{j}+\sum_{i=1,i≠j}^{N} {IX_{i}}}}+\frac{\sum_{i=1,i≠j}^{I} {IX_{c,i,j}}}{\sf{Y_{j}+\sum_{i=1,i≠j}^{N} {IX_{i}}}}\]
where \(\sf{GPNPRT_{c,j}}\) denotes our GPN participation index for country c and industry j, composed from buying (left) and selling (right) metrics. For the buying perspective of c, \(\sf{IM_{i,c,j}}\) denotes the foreign inputs from industry i of origin used by NRR-based industries j in buyer c of destination. For the selling side of c, \(\sf{IX_{c,i,j}}\) refers to inputs i from seller c exported for use by foreign sectors j. These buying and selling metrics are expressed as percentage of the sum total of sector gross output (\(\sf{Y_{j}}\)) and inputs from i in c exported for use by foreign sectors j (\(\sf{IX_{c,i,j}}\)) (our common denominator).
On the other hand, the GPN position index measures the nature of the integration of c in the GPN, defined as the log ratio of the selling to the buying metric for c through j:
\[\sf{GPNPSN_{c,j}}=ln\left(1+\frac{\sum_{i=1,i≠j}^{I} {IX_{i,j,c}}}{\sf{Y_{j}+\sum_{i=1,i≠j}^{N} {IX_{j}}}}\right)+ln\left(1+\frac{\sum_{i=1,i≠j}^{I} {IM_{c,i,j}}}{\sf{Y_{j}+\sum_{i=1,i≠j}^{N} {IX_{j}}}}\right)\]
the results of \(\sf{GPNPSN_{c,j}}\) are interpreted between two opposing poles: predominantly seller or buyer. That is, if the country-sector c,j is predominantly a seller of inputs along the global supply chain, the numerator tends to be large; on the contrary, if the country-sector is mainly a buyer in the GPN, then the numerator tends to be small. For instance, if the US specializes in providing inputs for extractive firms in Perú, the index tends to take on a higher value for the US and a lower value for Perú.
For our case, we examine the inputs used by the entire value chain of NRR production (both upstream and downstream segments) for 2005.
B. Data sources:
icio_zicio_tivaC. Relevant coding systems:
Our unit of analysis is the domestic industry engaging indirectly (through inputs) in NRR production; for simplification purposes, we refer to it from now on as “countries”. Two criteria orient the delimitation of our study universe:
Please click on the titles below to reveal the contents of each subsection.
NRR producers based on ICIO data: The universe of cases is determined by ICIOv18 (our main data source for data on intermediate transactions), which covers 64 economies (codes_cntrs_icio_all) + 1 Rest of the World (ROW) global-region for the 2005-2015 period:
# We count the number of unique country codes in ICIOv18:
n_distinct(unique(codes_cntrs_icio_all$country_code_iso3))
## [1] 64
Data availability on DE of NRR for ICIOv18 cases:
Since our concern is with NRR production, the sole inclusion criterion of the study is defined as those countries engaging in Domestic Extraction (DE) of NRR for our starting year 2005; where NRR include Fossil Fuels and Metal Ores (tonnes). As mentioned before, our main data source is UNGMF UN, 2019.
The file codes_cntrs_intgrtd_0515 shows data availability on DE of NRR (UNGMF) for the universe of cases covered in ICIOv18. In sum, it integrates ICIOv18 cases, UNSD codes, and data from UNGMF relevant to our inclusion criteria; on the latter, it includes data on DE of NRR (tonnes) by country, and a dummy variable for NRR-production when DE of NRR > 0.
The main attributes of codes_cntrs_intgrtd_0515:
## Rows: 693
## Columns: 7
## $ country_code_iso3 <chr> "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "A…
## $ country_name_mvf <chr> "Argentina", "Argentina", "Argentina", "Argentina",…
## $ development_level <chr> "Developing", "Developing", "Developing", "Developi…
## $ subreg_name <chr> "Latin America and the Caribbean", "Latin America a…
## $ year <fct> 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 201…
## $ amount_nrr <dbl> 111964302, 117591462, 114697002, 112168192, 1158527…
## $ nrr_prod_dummy <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
| country_code_iso3 | country_name_mvf | development_level | subreg_name | year | amount_nrr | nrr_prod_dummy |
|---|---|---|---|---|---|---|
| ARG | Argentina | Developing | Latin America and the Caribbean | 2005 | 111964302 | 1 |
| ARG | Argentina | Developing | Latin America and the Caribbean | 2006 | 117591462 | 1 |
| ARG | Argentina | Developing | Latin America and the Caribbean | 2007 | 114697002 | 1 |
| ARG | Argentina | Developing | Latin America and the Caribbean | 2008 | 112168192 | 1 |
| ARG | Argentina | Developing | Latin America and the Caribbean | 2009 | 115852769 | 1 |
A closer look at codes_cntrs_intgrtd_0515 shows that there is only data on 63 out of the total 64 economies covered in ICIOv18; Taiwan, China (TWN), is not included.
# Number of countries from ICIOv18 on which there is data on DE of NRR (UNGMF):
n_distinct(unique(codes_cntrs_intgrtd_0515$country_name_mvf))
## [1] 63
#From the total cases covered in ICIOv18:
n_distinct(unique(codes_cntrs_icio_all$country_code_iso3))
## [1] 64
Based on the above, we create the file codes_stdy_unvrs_allnrr where we only include those cases meeting our inclusion criteria (i.e., DE of NRR > 0 in 2005 through our nrr_prod_dummy). In practical terms, codes_stdy_unvrs_allnrr serves as filter when making calculations for buying and selling sides; in this way, ICIO stays a raw data-cube that is filtered from an external source (our object) before calculations are made.
# we create codes_stdy_filter only those countries displaying DE of NRR > 0 in 2005 (our inclusion criteria) through our dummy variable:
codes_stdy_unvrs_allnrr <- codes_cntrs_intgrtd_0515 %>%
filter(year == 2005 & nrr_prod_dummy == 1)
We show below an overview and detailed list of our study universe. In sum, we focus on 55 economies that were NRR producers by our starting year of 2005.
Please click on the titles below to reveal the contents of each subsection.
a. Size: NRR producers in ICIOv18
To get a sense of the size of our study universe, we compare those cases that meet our inclusion criteria (NRR producers in 2005) to all cases covered in ICIOv18.
The size of our study universe (NRR-producers in 2005) is:
# we count the number of unique country codes in our file `codes_stdy_unvrs_allnrr`
n_distinct(unique(codes_stdy_unvrs_allnrr$country_code_iso3))
## [1] 55
While the number of cases that are covered in ICIOv18 (codes_cntrs_icio_all) but are excluded from our study universe (non NRR-producers in 2005) is:
# we count the number of cases [countries] from ICIOv18 that do not meet our inclusion criteria (i.e., our study universe)
n_distinct(unique(codes_cntrs_icio_all$country_code_iso3[!codes_cntrs_icio_all$country_code_iso3 %in% codes_stdy_unvrs_allnrr$country_code_iso3]))
## [1] 9
Based on the above, we focus on 55 economies that were NRR producers by our starting year of 2005. The remaining 9 economies and the ROW region are included as partner countries (i.e., countries of origin and destination).
b. Composition: Development level
The composition of our study universe by development level:
# We select only developed economies from our study universe
icio_stdy_unvrs_dvlpd <- filter(codes_stdy_unvrs_allnrr, development_level=="Developed")
# and we count the number of unique cases that are "Developed"
n_distinct(unique(icio_stdy_unvrs_dvlpd$country_code_iso3))
## [1] 33
# We select only developing economies from our study universe:
icio_stdy_unvrs_dvlpng <- filter(codes_stdy_unvrs_allnrr, development_level=="Developing")
# and we count the number of unique cases that are "Developing"
n_distinct(unique(icio_stdy_unvrs_dvlpng$country_code_iso3))
## [1] 22
NRR producers in ICIOv18: List of included countries
| development_level | subreg_name | country_code_iso3 | country_name_mvf | year | amount_nrr |
|---|---|---|---|---|---|
| Developed | Australia and New Zealand | AUS | Australia | 2005 | 1026275900 |
| Developed | Australia and New Zealand | NZL | New Zealand | 2005 | 14020343 |
| Developed | Eastern Asia | JPN | Japan | 2005 | 5197602 |
| Developed | Eastern Europe | BGR | Bulgaria | 2005 | 40338301 |
| Developed | Eastern Europe | CZE | Czech Republic | 2005 | 65968060 |
| Developed | Eastern Europe | HUN | Hungary | 2005 | 13718933 |
| Developed | Eastern Europe | POL | Poland | 2005 | 242399520 |
| Developed | Eastern Europe | ROU | Romania | 2005 | 51245996 |
| Developed | Eastern Europe | RUS | Russian Federation | 2005 | 1383600542 |
| Developed | Eastern Europe | SVK | Slovakia | 2005 | 3195885 |
| Developed | Northern America | CAN | Canada | 2005 | 509819932 |
| Developed | Northern America | USA | United States of America | 2005 | 2280372819 |
| Developed | Northern Europe | DNK | Denmark | 2005 | 27129360 |
| Developed | Northern Europe | EST | Estonia | 2005 | 15557400 |
| Developed | Northern Europe | FIN | Finland | 2005 | 12679086 |
| Developed | Northern Europe | GBR | United Kingdom | 2005 | 171220229 |
| Developed | Northern Europe | IRL | Ireland | 2005 | 9035738 |
| Developed | Northern Europe | LTU | Lithuania | 2005 | 622000 |
| Developed | Northern Europe | LVA | Latvia | 2005 | 841865 |
| Developed | Northern Europe | NOR | Norway | 2005 | 199448421 |
| Developed | Northern Europe | SWE | Sweden | 2005 | 57067947 |
| Developed | Southern Europe | ESP | Spain | 2005 | 21310260 |
| Developed | Southern Europe | GRC | Greece | 2005 | 73557616 |
| Developed | Southern Europe | HRV | Croatia | 2005 | 2565842 |
| Developed | Southern Europe | ITA | Italy | 2005 | 14490922 |
| Developed | Southern Europe | PRT | Portugal | 2005 | 287418 |
| Developed | Southern Europe | SVN | Slovenia | 2005 | 4542880 |
| Developed | Western Asia | ISR | Israel | 2005 | 1557645 |
| Developed | Western Europe | AUT | Austria | 2005 | 4480691 |
| Developed | Western Europe | BEL | Belgium | 2005 | 1200 |
| Developed | Western Europe | DEU | Germany | 2005 | 222039759 |
| Developed | Western Europe | FRA | France | 2005 | 2363050 |
| Developed | Western Europe | NLD | Netherlands | 2005 | 49388936 |
| Developing | Central Asia | KAZ | Kazakhstan | 2005 | 285920346 |
| Developing | Eastern Asia | CHN | China | 2005 | 3108319155 |
| Developing | Eastern Asia | KOR | South Korea | 2005 | 4718356 |
| Developing | Latin America and the Caribbean | ARG | Argentina | 2005 | 111964302 |
| Developing | Latin America and the Caribbean | BRA | Brazil | 2005 | 449802842 |
| Developing | Latin America and the Caribbean | CHL | Chile | 2005 | 546513349 |
| Developing | Latin America and the Caribbean | COL | Colombia | 2005 | 116659198 |
| Developing | Latin America and the Caribbean | CRI | Costa Rica | 2005 | 170269 |
| Developing | Latin America and the Caribbean | MEX | Mexico | 2005 | 375051265 |
| Developing | Latin America and the Caribbean | PER | Peru | 2005 | 311726595 |
| Developing | Northern Africa | MAR | Morocco | 2005 | 2371110 |
| Developing | Northern Africa | TUN | Tunisia | 2005 | 5670457 |
| Developing | South-eastern Asia | BRN | Brunei Darussalam | 2005 | 19209294 |
| Developing | South-eastern Asia | IDN | Indonesia | 2005 | 922988475 |
| Developing | South-eastern Asia | MYS | Malaysia | 2005 | 85658635 |
| Developing | South-eastern Asia | PHL | Philippines | 2005 | 15712964 |
| Developing | South-eastern Asia | THA | Thailand | 2005 | 50454805 |
| Developing | South-eastern Asia | VNM | Viet Nam | 2005 | 62595007 |
| Developing | Southern Asia | IND | India | 2005 | 684112336 |
| Developing | Sub-Saharan Africa | ZAF | South Africa | 2005 | 407221218 |
| Developing | Western Asia | SAU | Saudi Arabia | 2005 | 553444073 |
| Developing | Western Asia | TUR | Turkey | 2005 | 71497096 |
For the calculation of our numerators and denominators, we use icio_z from ICIOv18:
# this are the dimensions of our datafile:
icio_z_dim
## icio_z_dim
## 1 11
## 2 2484
## 3 2484
# where first row is number of individual matrices of intermediate transactions
# for each year in the '05-'15 period;
# the second and third rows correspond to the size of each individual matrix.
To facilitate calculations, we make a series of transformations to icio_z:
icio_z to our year of interest.codes_stdy_unvrs_allnrr to filter and focus only on our study universe (see 2.1.2).The following subsections expound on how these transformations are conducted. Please click on the titles below to reveal the contents of each subsection.
We create icio_z_2005 from icio_z to focus on year 20051. To further facilitate data wrangling, we also transform the rows of icio_z_2005, which refer to the country/industry of origin for intermediate transactions, into a column with cntry_sct_name as header.
# Size of matrix
dim(icio_z_2005)
## [1] 2484 2484
| cntry_sct_name | AUS_01T03 | AUS_05T06 | AUS_07T08 | AUS_09 | AUS_10T12 | AUS_13T15 |
|---|---|---|---|---|---|---|
| AUS_01T03 | 3425.26872 | 102.45226 | 24.00948 | 0.0000000 | 11642.146396 | 99.9047580 |
| AUS_05T06 | 107.55441 | 2687.92862 | 124.16880 | 0.5155636 | 131.895222 | 4.8860440 |
| AUS_07T08 | 15.33443 | 381.54107 | 6454.67654 | 0.6550312 | 8.373702 | 0.2551598 |
| AUS_09 | 0.00000 | 3879.36360 | 1850.74698 | 2724.6356920 | 0.000000 | 0.0000000 |
| AUS_10T12 | 2015.42505 | 24.10272 | 27.23894 | 5.3428780 | 6341.098155 | 52.5556643 |
| AUS_13T15 | 28.53818 | 24.56546 | 25.76046 | 3.6107721 | 47.444875 | 471.7913376 |
In sum, icio_z_2005 is a 2484x2484 matrix of intermediate transactions for year 2005, where the left row correspond to the country-industry of origin (sellers), and columns to the country-industry of destination (buyers).
To facilitate calculations of buying and selling sides for our study universe (i.e., NRR-producers in 2005), we further subset icio_z_2005. We create two data-files where NRR-producers act as buyers (columns) or sellers (rows), respectively. Specifically, we filter columns (for buyers) and rows (for sellers) according to our criteria of inclusion2; such yields icio_z_2005_nrr_buyers and icio_z_2005_nrr_sellers.
First, we filter the rows to include those countries that are part of our study universe, where codes_stdy_unvrs_allnrr includes the country codes for our study universe:
# we select only those columns from the matrix whose countries match our study universe
icio_z_2005_tbl_allnrr_buyers <- select(icio_z_2005_tbl, contains("cntry_sct_name"),
contains(paste(codes_stdy_unvrs_allnrr$country_code_iso3)), contains(paste(codes_cntrs_icio_mx_cn$country_isoalpha3_code)))
| cntry_sct_name | ARG_01T03 | ARG_05T06 | ARG_07T08 | ARG_09 | ARG_10T12 | ARG_13T15 |
|---|---|---|---|---|---|---|
| AUS_01T03 | 1.2384974 | 0.0003615 | 0.0009479 | 0.0002585 | 4.1980736 | 0.0760311 |
| AUS_05T06 | 1.8442650 | 0.1867868 | 0.3516953 | 0.7059199 | 1.1247149 | 0.1999119 |
| AUS_07T08 | 0.0003883 | 0.0001985 | 0.0008452 | 0.0000763 | 0.0001857 | 0.0000437 |
| AUS_09 | 0.0000006 | 0.0000045 | 0.0000004 | 0.0000004 | 0.0000001 | 0.0000000 |
| AUS_10T12 | 0.0161091 | 0.0012495 | 0.0010919 | 0.0015021 | 0.0213997 | 0.0070686 |
| AUS_13T15 | 0.0072439 | 0.0009814 | 0.0007429 | 0.0008683 | 0.0084536 | 0.1746471 |
Second, we also filter rows to include our study universe:
# we select only those rows from the matrix whose countries match our study universe
icio_z_2005_tbl_allnrr_sellers <- icio_z_2005_tbl %>%
filter(grepl(paste(codes_stdy_unvrs_allnrr_mx_cn$country_isoalpha3_code, collapse = "|"), cntry_sct_name))
| cntry_sct_name | AUS_01T03 | AUS_05T06 | AUS_07T08 | AUS_09 | AUS_10T12 | AUS_13T15 |
|---|---|---|---|---|---|---|
| AUS_01T03 | 3425.26872 | 102.45226 | 24.00948 | 0.0000000 | 11642.146396 | 99.9047580 |
| AUS_05T06 | 107.55441 | 2687.92862 | 124.16880 | 0.5155636 | 131.895222 | 4.8860440 |
| AUS_07T08 | 15.33443 | 381.54107 | 6454.67654 | 0.6550312 | 8.373702 | 0.2551598 |
| AUS_09 | 0.00000 | 3879.36360 | 1850.74698 | 2724.6356920 | 0.000000 | 0.0000000 |
| AUS_10T12 | 2015.42505 | 24.10272 | 27.23894 | 5.3428780 | 6341.098155 | 52.5556643 |
| AUS_13T15 | 28.53818 | 24.56546 | 25.76046 | 3.6107721 | 47.444875 | 471.7913376 |
We also conduct transformations to the original format of our data-files (i.e., matrices) into an indexed format to facilitate calculations 3. The result, is icio_z_2005_nrr_buyers_indexed and icio_z_2005_nrr_sellers_indexed. These last two become our main data-files to calculate our buying and selling metrics.
# Main attributes of our newly-crated datafile for buyers in indexed format:
glimpse(icio_z_2005_tbl_allnrr_buyers_pvt)
## Rows: 5,276,016
## Columns: 5
## $ cntry_c <chr> "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS…
## $ sctr_c_i <chr> "01T03", "05T06", "07T08", "09", "10T12", "13T15", "16", "17…
## $ cntry_p <chr> "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG…
## $ sctr_p_j <chr> "01T03", "01T03", "01T03", "01T03", "01T03", "01T03", "01T03…
## $ value <dbl> 1.238497e+00, 1.844265e+00, 3.882531e-04, 6.126050e-07, 1.61…
| cntry_c | sctr_c_i | cntry_p | sctr_p_j | value |
|---|---|---|---|---|
| AUS | 01T03 | ARG | 01T03 | 1.2384974 |
| AUS | 05T06 | ARG | 01T03 | 1.8442650 |
| AUS | 07T08 | ARG | 01T03 | 0.0003883 |
| AUS | 09 | ARG | 01T03 | 0.0000006 |
| AUS | 10T12 | ARG | 01T03 | 0.0161091 |
| AUS | 13T15 | ARG | 01T03 | 0.0072439 |
where column cntry_c and sctr_c_i are the selling country and industry of origin, respectively; while cntry_p and sctr_p_j are the buying country and industry of destination. Finally, value refers to the intermediate transaction between country-industry seller and buyer.
ICIOv18 splits MEX and CHN into MX1 & MX24 and CN1 & CN25, respectively. As a consequence we have + 4 countries listed as buyers and partner countries:
# Total number of NRR-producing countries as buyers (should be 55):
n_distinct(as_factor(icio_z_2005_tbl_allnrr_buyers_pvt$cntry_p))
## [1] 59
# Total number of partner countries of NRR-producers (should be 65):
n_distinct(as_factor(icio_z_2005_tbl_allnrr_buyers_pvt$cntry_c))
## [1] 69
To solve this issues, we re-code MX1/MX2 to MEX, and CN1/CN2 to CHN in our buyer indexed file icio_z_2005_nrr_buyers_indexed:
# we rename CN1,CN2 as CHN for buyers_files
icio_z_2005_tbl_allnrr_buyers_pvt_CHN <- icio_z_2005_tbl_allnrr_buyers_pvt %>%
mutate_at(vars("cntry_c", "cntry_p"),funs(str_replace_all(., c("CN1|CN2"), "CHN")))
# we rename MX1,MX2 as MEX for buyers_files, taking the above file as input
icio_z_2005_tbl_allnrr_buyers_pvt_CHNMEX <- icio_z_2005_tbl_allnrr_buyers_pvt_CHN %>%
mutate_at(vars("cntry_c", "cntry_p"),funs(str_replace_all(., c("MX1|MX2"), "MEX")))
After re-coding both of our buying and selling indexed files, we confirm that our data-files match the size of our universe of study (55) and their partner countries (64 + 1 [ROW]):
Data-files for NRR-producers as buyers:
# 65 partner countries of buyers [c]:
n_distinct(as_factor(icio_z_2005_tbl_allnrr_buyers_pvt_CHNMEX$cntry_c))
## [1] 65
# NRR-rpdoucers in 2005 as buyers [study universe]:
n_distinct(as_factor(icio_z_2005_tbl_allnrr_buyers_pvt_CHNMEX$cntry_p))
## [1] 55
Data-files for NRR-producers as sellers:
# 65 partner countries of sellers [p]:
n_distinct(as_factor(icio_z_2005_tbl_allnrr_sellers_pvt_CHNMEX$cntry_p))
## [1] 65
# NRR-rpdoucers in 2005 as sellers [study universe]:
n_distinct(as_factor(icio_z_2005_tbl_allnrr_sellers_pvt_CHNMEX$cntry_c))
## [1] 55
The following two data-files are the result of the transformations in subsection 2.2.1; these are to calculate buying and selling metrics of NRR producers during 2005:
icio_z_2005_allnrr_buyers main attributes:
## Rows: 5,276,016
## Columns: 5
## $ cntry_c <chr> "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS…
## $ sctr_c_i <chr> "01T03", "05T06", "07T08", "09", "10T12", "13T15", "16", "17…
## $ cntry_p <chr> "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG", "ARG…
## $ sctr_p_j <chr> "01T03", "01T03", "01T03", "01T03", "01T03", "01T03", "01T03…
## $ value <dbl> 1.238497e+00, 1.844265e+00, 3.882531e-04, 6.126050e-07, 1.61…
| cntry_c | sctr_c_i | cntry_p | sctr_p_j | value |
|---|---|---|---|---|
| AUS | 01T03 | ARG | 01T03 | 1.2384974 |
| AUS | 05T06 | ARG | 01T03 | 1.8442650 |
| AUS | 07T08 | ARG | 01T03 | 0.0003883 |
| AUS | 09 | ARG | 01T03 | 0.0000006 |
| AUS | 10T12 | ARG | 01T03 | 0.0161091 |
| AUS | 13T15 | ARG | 01T03 | 0.0072439 |
icio_z_2005_allnrr_sellers main attributes:
## Rows: 5,276,016
## Columns: 5
## $ cntry_c <chr> "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS…
## $ sctr_c_i <chr> "01T03", "05T06", "07T08", "09", "10T12", "13T15", "16", "17…
## $ cntry_p <chr> "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS", "AUS…
## $ sctr_p_j <chr> "01T03", "01T03", "01T03", "01T03", "01T03", "01T03", "01T03…
## $ value <dbl> 3425.26872, 107.55441, 15.33443, 0.00000, 2015.42505, 28.538…
| cntry_c | sctr_c_i | cntry_p | sctr_p_j | value |
|---|---|---|---|---|
| AUS | 01T03 | AUS | 01T03 | 3425.26872 |
| AUS | 05T06 | AUS | 01T03 | 107.55441 |
| AUS | 07T08 | AUS | 01T03 | 15.33443 |
| AUS | 09 | AUS | 01T03 | 0.00000 |
| AUS | 10T12 | AUS | 01T03 | 2015.42505 |
| AUS | 13T15 | AUS | 01T03 | 28.53818 |
In sum, our datafles in indexed formats can be understood as follows. In both cases, cntry_c and sctr_c_i are the country-industry of origin, while cntry_p and sctr_p_j are the country-industry of destination. In case of data on buyers, all cntry_p are NRR producers; in the case of sellers, only those countries producing NRR are included in cntry_c.
We associate NRR (Fossil Fuels + Metal Ores) to sectors in order to define what constitutes an NRR-based GPN; in turn, we split the NRR VC in upstream (NRR extraction) and downstream segments (NRR beneficiation):
| flow_category_UNGMF | upstream_sectors | upstream_codes_OECD | downstream_sectors | downstream_codes_OECD |
|---|---|---|---|---|
| Fossil fuels | Mining and extraction of energy producing products; Mining support service activities | D05T06 ; D09 | Coke and refined petroleum products | D19 |
| Metal ores | Mining and quarrying of non-energy producing products | D07T08 ; D09 | Basic metals | D24 |
Since we are interested only in inter-industry trade, this correspondence becomes our way to filter sectors in future calculations and focus on the entire VC as destination sectors; this involves excluding any intra-industry trade between sector of the NRR VC.
We calculate below the buying and selling metrics of our GPN indexes.
The buying side involves calculating the total value of intermediate imports (IM) destined for use by the entire NRR-production VC of NRR-producers. This implies the following steps:
We use our indexed version of icio_z_2005_allnrr_buyers as input:
# where nrrprd_vc is the sector codes associated with the NRR-production VC
indxd_icio_z_2005_allnrr_buyers_nrrprd_vc_im_ind <- indxd_icio_z_2005_allnrr_buyers %>%
filter(cntry_p != cntry_c,
sctr_p_j %in% codes_nrrprd_vc,
!sctr_c_i %in% codes_nrrprd_vc)
#Our destination sectors are those associated above with the NRR-production VC:
unique(indxd_icio_z_2005_allnrr_buyers_nrrprd_vc_im_ind$sctr_p_j)
## [1] "05T06" "07T08" "09" "19" "24"
# The total number of NRR-producers acting as buyers (55):
n_distinct(unique(indxd_icio_z_2005_allnrr_buyers_nrrprd_vc_im_ind$cntry_p))
## [1] 55
# once filters are in place, we aggregate the value of intermediate imports (im) for buyers (cntry_p):
indxd_icio_z_2005_allnrr_buyers_nrrprd_vc_im_ind <- indxd_icio_z_2005_allnrr_buyers_nrrprd_vc_im_ind %>%
group_by(cntry_p) %>% summarise(im_ind = sum(value))
| cntry_p | im_ind |
|---|---|
| ARG | 1318.8245 |
| AUS | 3223.0204 |
| AUT | 2078.7317 |
| BEL | 4990.3792 |
| BGR | 396.9364 |
| BRA | 4298.4926 |
where cntry_p is the buyer country of inter-industry imported inputs im_ind destined for NRR-based sectors.
The selling side involves calculating the total value of intermediate exports (IX) destined for the NRR-production VC of foreign NRR-producers. Since our data-files icio_z_2005_allnrr_sellers only includes NRR-producers as countries of origin (cntry_c) we follow the same steps for buying metrics.
We replicate the above for icio_z_2005_allnrr_sellers:
# The total number of NRR-producers acting as sellers of ix equals our universe of study (55):
n_distinct(unique(indxd_icio_z_2005_allnrr_sellers_nrrprd_vc_ix_ind$cntry_c))
## [1] 55
| cntry_c | ix_ind |
|---|---|
| ARG | 740.0962 |
| AUS | 6089.9520 |
| AUT | 2300.6573 |
| BEL | 3741.1325 |
| BGR | 241.3122 |
| BRA | 2634.4856 |
where cntry_c is the selling country exporting inter-industry inputs ix_ind destined for foreign NRR-based sectors.
GPN indexes include buying and selling metrics for exporting country c and its sector j expressed as shares of gross sector output and sector-related exports (i.e., \(\sf{Y_{j}+\sum_{i=1,i≠j}^{N} {IX_{j}}}\)). In our case, country c is a NRR producer and sector j includes all NRR-based sectors.
To exemplify our calculations, we focus on buying metrics.
For the denominator, the data sources used were the following:
icio_tiva data-set
For the numerators, we use as data our selling metrics from
Both of these metrics are included our the data-file allnrr_gpn_sllng_nrrprd_vc_2005, where countries and sectors are coded in terms of country c and sector j (\(\sf{GPN_{c,j}}\))6.
# buying side nrrprd_vc, where im_ind is our buying metric, and gpn_dnmntr our denominator;
# we perform this operation for NRR-producers acting as buyers (cntry_c) who produce and export through NRR-based sectors (sctr_sgmnt_c_j)
allnrr_gpn_byng_nrrprd_vc_2005_tmp <- allnrr_gpn_byng_nrrprd_vc_2005_tmp %>%
group_by_at(vars("cntry_c","sctr_sgmnt_c_j")) %>%
mutate(gpn_byng_im_ind = im_ind / gpn_dnmntr)
| cntry_c | sctr_sgmnt_c_j | year | gpn_dnmntr | im_ind | im_total | gpn_byng_im_ind |
|---|---|---|---|---|---|---|
| ARG | nrrprd_vc | 2005 | 41485.396 | 1318.8245 | 2404.312 | 0.0317901 |
| AUS | nrrprd_vc | 2005 | 156702.852 | 3223.0204 | 9192.028 | 0.0205677 |
| AUT | nrrprd_vc | 2005 | 24323.657 | 2078.7317 | 7380.586 | 0.0854613 |
| BEL | nrrprd_vc | 2005 | 55573.532 | 4990.3792 | 19737.938 | 0.0897978 |
| BGR | nrrprd_vc | 2005 | 6884.312 | 396.9364 | 3092.977 | 0.0576581 |
| BRA | nrrprd_vc | 2005 | 149619.786 | 4298.4926 | 14852.954 | 0.0287294 |
where cntry_c is the country NRR-producing country acting as buyer in the GPN, sctr_sgmnt_c_j is the producing and exporting NRR-based sector, gpn_dnmntr is the sum of sector output (\(\sf{Y_{j}}\)) and sector-related intermediate exports (\(\sf{IX_{c,i,j}}\)) (our denominator), im_ind is the imported intermediates destined for NRR-based sectors (\(\sf{IM_{i,c,j}}\)), and gpn_byng_im_ind is our buying metric in terms of the GPN (im_ind expressed as share of gpn_dnmntr).
Following our main analytical task mentioned above, we calculate our indexes on participation and position in GPN of NRR-based sectors.
We use a data-file gpn_nrrprd_vc_2005, which compiles our buying and selling metrics calculated previously; with these metrics, calculating our indexes is fairly simple:
gpn_nrrprd_vc_2005_tmp <- gpn_nrrprd_vc_2005_tmp %>%
group_by_at(vars("cntry_c","sctr_sgmnt_c_j")) %>%
mutate(gpn_prtc_ind = gpn_byng_im_ind + gpn_sllng_ix_ind) %>%
mutate(gpn_pstn_ind = (log((1 + gpn_sllng_ix_ind))) - (log((1 + gpn_byng_im_ind))))
# where gpn_prtc_ind is the result of calculating our index on GPN participation;
# and gpn_pstn_ind on the GPN position.
| cntry_c | sctr_sgmnt_c_j | year | gpn_byng_im_ind | gpn_sllng_ix_ind | gpn_prtc_ind | gpn_pstn_ind |
|---|---|---|---|---|---|---|
| ARG | nrrprd_vc | 2005 | 0.0317901 | 0.0178399 | 0.0496300 | -0.0136126 |
| AUS | nrrprd_vc | 2005 | 0.0205677 | 0.0388631 | 0.0594308 | 0.0177678 |
| AUT | nrrprd_vc | 2005 | 0.0854613 | 0.0945852 | 0.1800465 | 0.0083704 |
| BEL | nrrprd_vc | 2005 | 0.0897978 | 0.0673186 | 0.1571164 | -0.0208426 |
| BGR | nrrprd_vc | 2005 | 0.0576581 | 0.0350525 | 0.0927106 | -0.0216050 |
| BRA | nrrprd_vc | 2005 | 0.0287294 | 0.0176079 | 0.0463373 | -0.0108698 |
where cntry_c is the NRR-producing involved in the GPN, sctr_sgmnt_c_j is the producing and exporting NRR-based sector, gpn_byng_im_ind is our buying metric, and gpn_sllng_ix_ind our selling metric. Finally, gpn_prtc_ind is GPN participation index for cntry_c, and gpn_pstn_ind its GPN position index.
In this section, we provide some visualizations of some preliminary findings for year 2005.
A relationship on our buying and selling metrics based on development levels of NRR producers in the GPN:
## `geom_smooth()` using formula 'y ~ x'
Results from the GPN participation index, ranked from higher the lower:
Results from the GPN position index, ranked from higher the lower:
The research project focuses on the ’05-’14 period; however, we only focus on 2005 as an example in this document.↩
This filtering stage takes into account that in ICIOv18, countries MEX and CHN are further broken down as MX1 & MX2, and CN1 & CN2, respectively.↩
Matrices can be thought as resembling the format of a Cartesian product between two sets (columns of buyers of inputs and rows of sellers of inputs), where their intersection yields the value of transactions (i.e., cells). To facilitate data manipulation in R, we transform our data-files into an indexed format, where variables are columns, and rows are observations. In this way, we have variables for “country of origin” and “of destination”, which correspond to buyers and sellers, respectively; a final column corresponds to the value of transactions. Note that this same data format is adopted by the published version of OECD’s ICIO-TiVa data-sets (matrices of intermediate transactions in VA terms).↩
Global Manufacturing activities.↩
Export processing activities.↩
Notice that within matrix icio_z, country c was coded in terms of country of origin of traded intermediates; for \(\sf{GPN_{c,j}}\) country c refers to the producing and exporting country and its associated sector j.↩