Add supplementary data to a SIOT, a use, supply or margins table.
Arguments
- data_table
A SIOT, a use table, a supply table, or a margins table.
- supplementary_data
Supplementary data to be added. It must be a data.frame or tibble with a key column containing the indicator's name, and the column names must match with the
data_table
. Can be a vector or a data frame of several rows.- supplementary_names
Optional names for the new supplementary rows. Defaults to
NULL
.
Value
An extended data_table
with the new row(s) binded.
A symmetric input-output table with supplementary data,
of data.frame class.
The column names are ordered, and the row names are in the
first, auxiliary metadata column.
Details
This function is a wrapper around the more general rows_add
function.
See also
Other iotables processing functions:
conforming_vector_create()
,
household_column_get()
,
iotable_year_get()
,
key_column_create()
,
matrix_round()
,
output_get()
,
primary_input_get()
,
rows_add()
,
total_tax_add()
,
vector_transpose_longer()
,
vector_transpose_wider()
Examples
de_io <- iotable_get()
CO2_coefficients <- data.frame(agriculture_group = 0.2379,
industry_group = 0.5172,
construction = 0.0456,
trade_group = 0.1320,
business_services_group = 0.0127,
other_services_group = 0.0530)
CH4_coefficients <- data.frame(agriculture_group = 0.0349,
industry_group = 0.0011,
construction = 0,
trade_group = 0,
business_services_group = 0,
other_services_group = 0.0021)
CO2 <- cbind (data.frame(iotables_row = "CO2"),
CO2_coefficients)
CH4 <- cbind(data.frame (iotables_row = "CH4_coefficients"),
CH4_coefficients)
de_coeff <- input_coefficient_matrix_create ( iotable_get() )
emissions <- rbind (CO2, CH4)
# Check with the Eurostat Manual page 494:
supplementary_add(de_io, emissions)
#> iotables_row agriculture_group industry_group construction
#> 1 agriculture_group 1131.0000 25480.0000 1.0000
#> 2 industry_group 7930.0000 304584.0000 64167.0000
#> 3 construction 426.0000 7334.0000 3875.0000
#> 4 trade_group 3559.0000 72717.0000 14190.0000
#> 5 business_services_group 3637.0000 96115.0000 31027.0000
#> 6 other_services_group 1552.0000 14986.0000 1747.0000
#> 7 total 18235.0000 521216.0000 115007.0000
#> 8 imports 2927.0000 156703.0000 13427.0000
#> 9 intermediate_consumption 22246.0000 684424.0000 129982.0000
#> 10 compensation_employees 9382.0000 296464.0000 78819.0000
#> 11 net_tax_production -2012.0000 1457.0000 963.0000
#> 12 consumption_fixed_capital 7871.0000 63769.0000 5860.0000
#> 13 os_mixed_income_net 6423.0000 33332.0000 29982.0000
#> 14 gva 21664.0000 395022.0000 115624.0000
#> 15 output 43910.0000 1079446.0000 245606.0000
#> 16 net_tax_products 1084.0000 6505.0000 1548.0000
#> 17 employment_wage_salary 483.0000 8032.0000 2896.0000
#> 18 employment_self_employed 613.0000 349.0000 340.0000
#> 19 employment_domestic_total 1096.0000 8381.0000 3236.0000
#> 20 CO2 0.2379 0.5172 0.0456
#> 21 CH4_coefficients 0.0349 0.0011 0.0000
#> trade_group business_services_group other_services_group total
#> 1 607.000 710.0000 762.0000 28691
#> 2 41082.000 11981.0000 30360.0000 460104
#> 3 5296.000 23457.0000 9155.0000 49543
#> 4 74399.000 10835.0000 21008.0000 196708
#> 5 65755.000 193176.0000 34223.0000 423933
#> 6 11225.000 15058.0000 22070.0000 66638
#> 7 198364.000 255217.0000 117578.0000 1225617
#> 8 21943.000 13371.0000 13772.0000 222143
#> 9 228656.000 277061.0000 143901.0000 1486270
#> 10 214450.000 124810.0000 272975.0000 996900
#> 11 2748.000 5946.0000 -8602.0000 500
#> 12 41100.000 98610.0000 49260.0000 266470
#> 13 53109.000 186060.0000 51384.0000 360290
#> 14 311407.000 415426.0000 365017.0000 1624160
#> 15 540063.000 692487.0000 508918.0000 3110430
#> 16 8349.000 8473.0000 12551.0000 38510
#> 17 7977.000 3653.0000 9555.0000 32596
#> 18 1274.000 605.0000 651.0000 3832
#> 19 9251.000 4258.0000 10206.0000 36428
#> 20 0.132 0.0127 0.0530 0
#> 21 0.000 0.0000 0.0021 0
#> final_consumption_households final_consumption_government inventory_change
#> 1 8500 16 -6
#> 2 197792 8588 7559
#> 3 3457 742 0
#> 4 269663 13492 0
#> 5 214757 10061 0
#> 6 119504 317251 0
#> 7 813673 350150 7553
#> 8 80187 2970 -4233
#> 9 1001060 356790 3580
#> 10 NA NA NA
#> 11 NA NA NA
#> 12 NA NA NA
#> 13 NA NA NA
#> 14 NA NA NA
#> 15 1001060 356790 3580
#> 16 107200 3670 260
#> 17 NA NA NA
#> 18 NA NA NA
#> 19 NA NA NA
#> 20 0 0 0
#> 21 0 0 0
#> gross_capital_formation exports total_final_use
#> 1 2975 3734 43910
#> 2 91692 313711 1079400
#> 3 191715 149 245606
#> 4 14155 46045 540063
#> 5 30124 13612 692487
#> 6 3483 2042 508918
#> 7 334144 379293 3110384
#> 8 41436 42597 385100
#> 9 404240 420730 3672624
#> 10 NA NA 996900
#> 11 NA NA 500
#> 12 NA NA 266470
#> 13 NA NA 360290
#> 14 NA NA 1624160
#> 15 404240 420730 NA
#> 16 28660 -1160 177140
#> 17 NA NA 32596
#> 18 NA NA 3832
#> 19 NA NA 36428
#> 20 0 0 0
#> 21 0 0 0