Several modules that are taking information from agriculture:aproduction are saving results back to the agriculture:aproduction database after imputation.
However:
/R
folder for “DatasetKey” faoswsFeed
: c("agriculture:aproduction", "trade:total_trade_cpc_m49")
c("agriculture:aproduction:==", "trade:total_trade_cpc_m49:==")
agriculture:aproduction
faoswsFood
: c("faostat_one:FS1_SUA_UPD", "agriculture:aproduction")
faoswsIndustrial
:
faoswsLoss
: faostat_one:FS1_SUA
faoswsProduction
: agriculture:aproduction
agriculture:aproduction
:
faoswsSeed
: agriculture:aproduction
agriculture:aproduction
agriculture:aproduction
WorldBank:wb_climate
faoswsStandardization
: c("faostat_one:FS1_SUA", "faostat_one:aupus_share_fs")
faoswsStock
: agriculture:aproduction
agriculture:aproduction
trade:total_trade_cpc_m49
faoswsTourist
: agriculture:aproduction
agriculture:aupus_ratio
faoswsTrade
:
main.R
scripts in /modules
folder for “ReadDatatable” faoswsFeed
:
faoswsFood
: oldToNewCommodity=ReadDatatable("food_old_code_map")
faoswsIndustrial
:
faoswsLoss
:
faoswsProduction
:
faoswsSeed
:
faoswsStandardization
:
faoswsStock
:
faoswsTourist
:
faoswsTrade
: c("hsfclmap2<-tbl_df(ReadDatatable(table=\"hsfclmap2\"))", "adjustments<-tbl_df(ReadDatatable(table=\"adjustments\"))", "tldata<-ReadDatatable(table=paste0(\"ct_tariffline_unlogged_\",year),columns=c(\"rep\",\"tyear\",\"flow\",\"comm\",\"prt\",\"weight\",\"qty\",\"qunit\",\"tvalue\",\"chapter\"),where=\"chapterIN('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','33','35','38','40','41','42','43','50','51','52','53')\")", "esdata<-ReadDatatable(table=paste0(\"ce_combinednomenclature_unlogged_\",year),columns=c(\"declarant\",\"partner\",\"product_nc\",\"flow\",\"period\",\"value_1k_euro\",\"qty_ton\",\"sup_quantity\"))"
)
List of datasets used by module as mentioned in the DESCRIPTION file of each repository
faoswsFeed
: agriculture:aproduction
trade:total_trade_cpc_m49
faoswsFood
: faostat_one:FS1_SUA_UPD
food:food_factors
agriculture:aproduction
population:population
WorldBank:wb_ecogrw
fcl_2_cpc
fal_2_m49
extraction_rates
faoswsIndustrial
: usda:usda_psd_nv
faoswsLoss
: agriculture:aproduction
TS_ICS_WORK_YR(oldsystemSUAWorkingDataset)
loss_food_group
m49_2_fs
cpc_2_fcl
faoswsProduction
: agriculture:aproduction
item_type_yield_elements
faoswsSeed
: agriculture:agriculture
WorldBank:wb_climate
specific_seed_rate
default_seed_rate
faoswsStandardization
: agriculture:aproduction
trade:total_trade_CPC
tourism:tourismprod
suafbs:sua
faostat_one:FS1_SUA
faostat_one:aupus_share_fs
faostat_one:input_from_proc_fs
SWS_R_SHARE/browning/elementCodes.csv
faoswsStock
: agriculture:aproduction
faoswsTourist
: tourism:tourist_flow
tourism:tourist_consumption
agriculture:aproduction
population:population
agriculture:aupus_ratio
faoswsTrade
:
faoswsStandardization
ModuleswsDatasetDepends:
agriculture:aproduction,
trade:total_trade_CPC,
tourism:tourismprod,
suafbs:sua,
faostat_one:FS1_SUA,
faostat_one:aupus_share_fs,
faostat_one:input_from_proc_fs,
SWS_R_SHARE/browning/elementCodes.csv
faosws
package, the FetchDatatableConfig
function can retrieve the data types of columnsdecimal
and smalltext
in the following example are not mentionedmetadata <- faosws::FetchDatatableConfig(table = "ce_combinednomenclature_unlogged_2009")
metadata$ce_combinednomenclature_unlogged_2009$columns$sup_quantity$type
[1] "decimal"
metadata$ce_combinednomenclature_unlogged_2009$columns$period$type
[1] "smalltext"
Table 8-2. Numeric Types and Table 8-4. Character Types
Name | Storage Size | Description | Range |
---|---|---|---|
decimal | variable | user-specified precision, exact | up to 131072 digits before the decimal point; up to 16383 digits after the decimal point |
character varying(n), varchar(n) | variable-length with limit | ||
character(n), char(n) | fixed-length, blank padded | ||
text | variable unlimited length |
The tables below contain the list of unique members for selected dimensions. Only the first 10 entries are shown.
|code |description |selectionOnly |type |startDate |endDate | |:—–|:———————————|:————-|:—-|:———|:——-| |5060 |Statistic Discrepancies [1000 hl] |FALSE |NA |NA |NA | |5030 |Availab For Consumption [1000 t] |FALSE |NA |NA |NA | |5061 |Balance - Qty [1000 t] |FALSE |NA |NA |NA | |5040 |Built Area [1000 ha] |FALSE |NA |NA |NA | |5007 |Closing Stocks [1000 t] |FALSE |NA |NA |NA | |5052 |Closing Stocks [t] |FALSE |NA |NA |NA | |5412 |Conversion Factor [%] |FALSE |NA |NA |NA | |5418 |Conversion Factor [kg/unit] |FALSE |NA |NA |NA | |252 |Export [cal] |FALSE |NA |NA |NA | |55202 |Feed [cal] |FALSE |NA |NA |NA |
|code |description |selectionOnly |type |startDate |endDate | |:—-|:————-|:————-|:——|:———|:——-| |1023 |Refuse |FALSE |detail |NA |NA | |1021 |Ascorbic acid |FALSE |detail |NA |NA | |1019 |Niacin |FALSE |detail |NA |NA | |1017 |Riboflavin |FALSE |detail |NA |NA | |1015 |Thiamine |FALSE |detail |NA |NA | |1013 |Beta carotene |FALSE |detail |NA |NA | |1011 |Retinol |FALSE |detail |NA |NA | |1009 |Iron |FALSE |detail |NA |NA | |1007 |Calcium |FALSE |detail |NA |NA | |1005 |Fats |FALSE |detail |NA |NA |
|code |description |selectionOnly |type |startDate |endDate | |:—–|:———————————|:————-|:—-|:———|:——-| |5060 |Statistic Discrepancies [1000 hl] |FALSE |NA |NA |NA | |5030 |Availab For Consumption [1000 t] |FALSE |NA |NA |NA | |5061 |Balance - Qty [1000 t] |FALSE |NA |NA |NA | |5040 |Built Area [1000 ha] |FALSE |NA |NA |NA | |5007 |Closing Stocks [1000 t] |FALSE |NA |NA |NA | |5052 |Closing Stocks [t] |FALSE |NA |NA |NA | |5412 |Conversion Factor [%] |FALSE |NA |NA |NA | |5418 |Conversion Factor [kg/unit] |FALSE |NA |NA |NA | |252 |Export [cal] |FALSE |NA |NA |NA | |55202 |Feed [cal] |FALSE |NA |NA |NA |
|code |description |selectionOnly |type |startDate |endDate | |:—————-|:—————————————————|:————-|:—-|:———|:——-| |21499.90 |Other prepared and preserved fruit and nuts, n.e.c. |FALSE |NA |NA |NA | |H_INDUSE_BIOFUEL |Biofuel items |FALSE |NA |NA |NA | |39120.18 |Marc of grape |FALSE |NA |NA |NA | |2351f |Raw cane or beet sugar (centrifugal only) |FALSE |CRNP |NA |NA | |AH01 |Ad hoc aggregation |FALSE |NA |NA |NA | |02951.90 |Other raw hides and skins of bovine animals |FALSE |NA |NA |NA | |Tree |CPC Hierarchy |FALSE |NA |NA |NA | |F9999 |List Of Lists |FALSE |NA |NA |NA | |F9994 |Items By Domain |FALSE |NA |NA |NA | |F9993 |List Of Items |FALSE |NA |NA |NA |
|code |description |selectionOnly |type |startDate |endDate | |:—-|:————————|:————-|:——-|:———-|:———-| |831 |Guernsey |FALSE |country |NA |NA | |728 |South Sudan |FALSE |country |2011-07-11 |NA | |736 |Sudan (former) |FALSE |country |1956-11-12 |2011-07-08 | |381 |Italy |FALSE |country |NA |NA | |248 |Åland Islands |FALSE |country |NA |NA | |835 |Zanzibar |FALSE |country |NA |NA | |239 |SouthGeorgia/Sandwich Is |FALSE |country |NA |NA | |663 |Saint-Martin |FALSE |country |NA |NA | |652 |Saint Barthélemy |FALSE |country |NA |NA | |896 |Other nei |FALSE |country |NA |NA |
Only the first 10 entries of each table are shown.
fcl | cpc |
---|---|
smalltext | smalltext |
fcl | cpc |
---|---|
0015 | 0111 |
0016 | 23110 |
0017 | 39120.01 |
0018 | 23710 |
0019 | 23140.01 |
0020 | F0020 |
0021 | 23140.02 |
0022 | F0022 |
0023 | 23220.01 |
0024 | 23220.02 |
validyear | area | flow | fromcode | tocode | fcl | mdbyear | mdbarea | mdbfcl |
---|---|---|---|---|---|---|---|---|
integer | integer | integer | smalltext | smalltext | integer | integer | smalltext | smalltext |
validyear | area | flow | fromcode | tocode | fcl | mdbyear | mdbarea | mdbfcl |
---|---|---|---|---|---|---|---|---|
NA | 2 | 1 | 01020001 | 01020001 | 866 | 2009 | AFG | 866 |
NA | 2 | 1 | 01021000 | 01029079 | 866 | 2009 | AFG | 866 |
NA | 2 | 1 | 01029090 | 01029090 | 866 | 2009 | AFG | 866 |
NA | 2 | 1 | 01011000 | 01011000 | 1096 | 2009 | AFG | 1096 |
NA | 2 | 1 | 01011100 | 01011199 | 1096 | 2009 | AFG | 1096 |
NA | 2 | 1 | 01011900 | 01011999 | 1096 | 2009 | AFG | 1096 |
NA | 2 | 1 | 01019000 | 01019000 | 1096 | 2009 | AFG | 1096 |
NA | 2 | 1 | 01012000 | 01012000 | 1107 | 2009 | AFG | 1107 |
NA | 2 | 1 | 01012010 | 01012010 | 1107 | 2009 | AFG | 1107 |
NA | 2 | 1 | 01012090 | 01012090 | 1110 | 2009 | AFG | 1110 |
chapter | declarant | partner | product_nc | flow | stat_regime | period | value_1k_euro | qty_ton | sup_quantity |
---|---|---|---|---|---|---|---|---|---|
smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | decimal | decimal | decimal |
chapter | declarant | partner | product_nc | flow | stat_regime | period | value_1k_euro | qty_ton | sup_quantity |
---|---|---|---|---|---|---|---|---|---|
27 | 001 | 0003 | 27030000 | 2 | 4 | 200952 | 0.09 | 0 | NA |
29 | 001 | 0004 | 29081100 | 2 | 4 | 200952 | 0.07 | 0 | NA |
29 | 001 | 0004 | 29181800 | 2 | 4 | 200952 | 0.02 | 0 | NA |
29 | 001 | 0004 | 29373100 | 2 | 4 | 200952 | 0.06 | 0 | 10 |
30 | 001 | 0003 | 30066019 | 2 | 4 | 200952 | 0.29 | 0 | NA |
42 | 001 | 0004 | 42021110 | 2 | 4 | 200952 | 2230.70 | 0 | 9686 |
63 | 001 | 0003 | 63011000 | 1 | 4 | 200952 | 104.20 | 0 | 6623 |
70 | 001 | 0003 | 70112000 | 1 | 4 | 200952 | 0.02 | 0 | NA |
84 | 001 | 0003 | 84254200 | 2 | 4 | 200952 | 502.45 | 0 | 1479 |
85 | 001 | 0003 | 85269120 | 2 | 4 | 200952 | 1669.96 | 0 | 8248 |
chapter | rep | tyear | curr | hsrep | flow | repcurr | comm | prt | weight | qty | qunit | tvalue | est | ht |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | smalltext | decimal | decimal | smalltext | decimal | smalltext | smalltext |
chapter | rep | tyear | curr | hsrep | flow | repcurr | comm | prt | weight | qty | qunit | tvalue | est | ht |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
07 | 184 | 2009 | NA | H0 | 1 | NA | 07121000 | 36 | NA | NA | 1 | 634.93650 | 0 | 0 |
09 | 184 | 2009 | NA | H0 | 1 | NA | 09011200 | 36 | NA | NA | 1 | 470.57794 | 0 | 0 |
12 | 184 | 2009 | NA | H0 | 1 | NA | 12100000 | 554 | NA | NA | 1 | 544.94550 | 0 | 0 |
21 | 184 | 2009 | NA | H0 | 1 | NA | 21050020 | 504 | NA | NA | 1 | 379.96200 | 0 | 0 |
33 | 90 | 2009 | NA | H1 | 1 | NA | 3303 | 458 | NA | NA | 1 | 54.75252 | 0 | 0 |
70 | 90 | 2009 | NA | H1 | 1 | NA | 7009 | 344 | NA | NA | 1 | 105.78038 | 0 | 0 |
83 | 90 | 2009 | NA | H1 | 1 | NA | 8307 | 36 | NA | NA | 1 | 1965.37951 | 0 | 0 |
84 | 90 | 2009 | NA | H1 | 1 | NA | 8443 | 36 | NA | NA | 1 | 23821.07007 | 0 | 0 |
85 | 90 | 2009 | NA | H1 | 1 | NA | 8516 | 608 | NA | NA | 1 | 191.44758 | 0 | 0 |
90 | 90 | 2009 | NA | H1 | 1 | NA | 9017 | 598 | NA | NA | 1 | 224.59706 | 0 | 0 |
fbs_domain | fbs_dataset | fbs_key | fbs_code |
---|---|---|---|
text | text | text | text |
fbs_domain | fbs_dataset | fbs_key | fbs_code |
---|---|---|---|
agriculture | aproduction | measuredElement | 5315 |
agriculture | aproduction | timePointYears | 1990 |
agriculture | aproduction | timePointYears | 1991 |
agriculture | aproduction | timePointYears | 1992 |
agriculture | aproduction | timePointYears | 1993 |
agriculture | aproduction | timePointYears | 1994 |
agriculture | aproduction | timePointYears | 1995 |
agriculture | aproduction | timePointYears | 1996 |
agriculture | aproduction | timePointYears | 1997 |
agriculture | aproduction | timePointYears | 1998 |
Only the first 10 entries of each table are shown.
flagObservationStatus | flagMethod | Valid | Protected |
---|---|---|---|
- | TRUE | TRUE | |
b | FALSE | FALSE | |
E | - | TRUE | FALSE |
E | b | FALSE | FALSE |
I | - | TRUE | FALSE |
I | b | TRUE | FALSE |
M | - | TRUE | FALSE |
M | b | FALSE | FALSE |
T | - | TRUE | TRUE |
T | b | FALSE | FALSE |
fcl | fclunit |
---|---|
15 | mt |
16 | mt |
17 | mt |
18 | mt |
19 | mt |
20 | mt |
21 | mt |
22 | mt |
23 | mt |
24 | mt |
Counting the number of observations by year
and hsrep
between 2000 and 2014.
ct_tariffline_unlogged_[year]
spark.sql("SELECT year, hsrep, COUNT(*) AS cnt FROM parquetTable GROUP BY year, hsrep ORDER BY year, hsrep")
count_[hsrep]
is the rowcount with the respective hsrep, e.g. count_HS2
are the number of observations using commodity classification H2 (HS 2002).pct_max
represents the share of the HS group that has the largest share in the respective year (in percent)year | count_H0 | count_H1 | count_H2 | count_H3 | count_H4 | count_S3 | pct_max |
---|---|---|---|---|---|---|---|
2014 | NA | 198 | 54787 | 148579 | 17296436 | NA | H4: 98.8 |
2013 | NA | 18 | 508939 | 502068 | 16043975 | NA | H4: 94.1 |
2012 | NA | 51446 | 1750726 | 8514410 | 7258418 | NA | H3: 48.4 |
2011 | 3745 | 50440 | 3172691 | 14538124 | NA | NA | H3: 81.8 |
2010 | 3591 | 79675 | 3314265 | 14372469 | NA | NA | H3: 80.9 |
2009 | 5 | 10017 | 3283 | 17776694 | NA | 1 | H3: 99.9 |
2008 | 29318 | 281544 | 2298875 | 14785263 | NA | NA | H3: 85 |
2007 | 127891 | 396287 | 4177847 | 12797975 | NA | NA | H3: 73.1 |
2006 | 97833 | 591735 | 17110432 | NA | NA | NA | H2: 96.1 |
2005 | 96584 | 720565 | 17052850 | NA | NA | 1 | H2: 95.4 |
2004 | 187334 | 816709 | 14537045 | NA | NA | 12642 | H2: 93.5 |
2003 | 176226 | 956636 | 13779311 | NA | NA | 38491 | H2: 92.2 |
2002 | 157536 | 1402216 | 12165198 | NA | NA | 23240 | H2: 88.5 |
2001 | 241385 | 12418541 | NA | NA | NA | 24345 | H1: 97.9 |
2000 | 498923 | 16796077 | NA | NA | NA | NA | H1: 97.1 |
Counting the number of observations by year
and stat_regime
between 2000 and 2014.
ce_combinednomenclature_unlogged_[year]
spark.sql("SELECT year, stat_regime, COUNT(*) AS cnt FROM parquetTable GROUP BY year, stat_regime ORDER BY year, stat_regime")
count_[stat_regime]
is the rowcount with the respective stat_regime, e.g. count_2
are the number of observations using stat regime 2.pct_4
represents the share of stat regime 4 in the respective year, i.e. in 2014, 95.5% of observations used stat regime 4year | count_2 | count_3 | count_4 | count_5 | count_6 | count_7 | count_9 | pct_4 |
---|---|---|---|---|---|---|---|---|
2014 | 381328 | 130064 | 10929025 | NA | NA | NA | 1571 | 95.5 |
2013 | 397058 | 135248 | 10784362 | NA | NA | NA | 1588 | 95.3 |
2012 | 406991 | 136770 | 10553406 | NA | NA | NA | 1312 | 95.1 |
2011 | 391238 | 136060 | 10190021 | NA | NA | NA | 1494 | 95.1 |
2010 | 382150 | 132559 | 10086377 | NA | NA | NA | 10164 | 95.1 |
2009 | NA | 120710 | 9910229 | 308534 | 105915 | 499 | NA | 94.9 |
2008 | NA | 147841 | 9890763 | 306820 | 106509 | 7807 | NA | 94.6 |
2007 | NA | 154912 | 9788676 | 318741 | 95863 | 12833 | NA | 94.4 |
2006 | NA | 167631 | 9613721 | 365686 | 85798 | 9803 | NA | 93.9 |
2005 | NA | 168927 | 9501055 | 394324 | 88208 | 15556 | NA | 93.4 |
2004 | NA | 222160 | 9559596 | 607108 | 125278 | 22603 | NA | 90.7 |
2003 | NA | 252003 | 9201879 | 686211 | 88554 | 20190 | NA | 89.8 |
2002 | NA | 247250 | 9130982 | 714876 | 104978 | 23182 | NA | 89.3 |
2001 | NA | 244792 | 8838263 | 687988 | 104966 | 26688 | NA | 89.3 |
2000 | NA | 243967 | 8720865 | 687259 | 124958 | 29281 | NA | 88.9 |
Count of unique FCL mappings by year and flow (SWS table hsfclmap2
)
mdbyear | flow_1 | flow_2 |
---|---|---|
2009 | 1077 | 1078 |
2010 | 1076 | 1076 |
2011 | 1072 | 1072 |
2012 | 1087 | 1088 |
2013 | 1068 | 1067 |
in the SWS, the following data types are used:
value_1k_euro
numeric(20,2)qty_ton
numeric(20,2)sup_quantity
numeric(20,2) (see message 03 August 2016 11:16)
see readme.txt
nc200101.dat
–> January 2001FLOW
=1
for import =2
for exportPRODUCT
)TOTAL
code is “total trade”)PARTNER
)STAT_REGIME
)RS1 = RS4-RS2-RS3-RS5-RS6-RS7-RS9
DECLARANT
)EU
is Europe)Example of a *.dat
file
DECLARANT,PARTNER,PRODUCT_NC,FLOW,STAT_REGIME,PERIOD,VALUE_1000ECU,QUANTITY_TON,SUP_QUANTITY
001,0003,01,1,4,200201,6191.13,1947.9,00
001,0003,01011010,1,4,200201,20.66,2.3,6
To get a PRODUCT_NC
code of 4 or 6 digits, 8 digits corresponding codes have to be added. For example, code 1234 is the sum of all 8 digits codes beginning by 1234 (1234 = sum(1234????))
Data are disseminated according to the Combined Nomenclature (CN8 level) for the following indicators:
Lines 5642-5647 from table_of_contents_en.txt at Eurostat Bulk Download Listing (access date: 2016-07-27)
title | code | type |
---|---|---|
Traditional international trade database access (ComExt) | comext | comext |
EU trade since 1988 by CN8 | DS-016890 | comext |
EU trade since 1988 by HS6 | DS-016893 | comext |
EU trade since 1988 by HS2-HS4 | DS-016894 | comext |
EU trade since 1988 by HS2,4,6 and CN8 | DS-645593 | dataset |
EU trade since 1999 by HS2,4,6 and CN8 - daily updated | DS-575274 | dataset |
EU trade since 1988 by SITC | DS-018995 | comext |
EU trade since 1988 by BEC | DS-057555 | comext |
EXTRA EU trade since 1999 by mode of transport (NSTR) | DS-022469 | comext |
EXTRA EU trade since 2000 by mode of transport (HS6) | DS-043328 | comext |
EXTRA EU trade since 2000 by mode of transport (HS2-HS4) | DS-043327 | comext |
Adjusted EU-EXTRA imports by tariff regime, by CN8 | DS-041691 | comext |
Adjusted EU-EXTRA imports by tariff regime, by HS6 | DS-041718 | comext |
Adjusted EU-EXTRA imports by tariff regime, by HS2-HS4 | DS-041719 | comext |
EFTA trade since 1995 by SITC | DS-043227 | comext |
Traditional international trade database access (ComExt) | comext | comext |
H0
HS 1992H1
HS 1996H2
HS 2002H3
HS 2007H4
HS 2012px
: H2
(Group: CL: HS 2002
)y
: 2005
(Group: time)r
: 400
(Group: RPT: Jordan
)rg
: 1
(Section: TF: imports
)p
: 392
(Obs: PRT: Japan
)cc
: 442190900
(Obs: CC-H2: Articles of Wood (Other)
) hscode.cfm?code=4421px
: commodity classificationy
: yearr
: reporter countryrg
: trade flowp
: partner countrycc
: commodity codecomp
: compresscount
World Bank have done some work to identify the Tariff line product code description using a combination of WTO IDB, UNCTAD TRAINS and HS 6 digit level product description for the UN COMTRADE tariff line data.
The file can be downloaded from http://wits.worldbank.org/data/public/CMTTL_TarifflineDescription.zip (137 MB)
<?xml version="1.0" encoding="utf-8"?>
<CrossSectionalData xmlns="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message" xmlns:uncs="http://unstats.un.org/structure/key_families/cross/UN_COMTRADE_H2" xmlns:cross="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/cross" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:schemaLocation="http://www.SDMX.org/resources/SDMXML/schemas/v1_0/message SDMXMessage.xsd http://unstats.un.org/structure/key_families/cross/UN_COMTRADE_H2 UN_COMTRADE_H2_CrossSectional.xsd http://www.SDMX.org/resources/SDMXML/schemas/v1_0/cross SDMXCrossSectionalData.xsd">
<Header>
<ID>UN1105460460</ID>
<Test>true</Test>
<Truncated>false</Truncated>
<Prepared>2016-09-22T12:25:12</Prepared>
<Sender id="UN"><Name xml:lang="en">United Nations</Name></Sender>
<KeyFamilyRef>UN_COMTRADE_H2</KeyFamilyRef>
<DataSetID>01</DataSetID>
<DataSetAction>Update</DataSetAction>
<Extracted>2016-09-22T12:25:12</Extracted>
</Header>
<uncs:DataSet>
<uncs:Group RPT="400" time="2005" CL="H2" UNIT_MULT="1" DECIMALS="1" CURRENCY="USD" FREQ="A" TIME_FORMAT="P1Y" REPORTED_CLASSIFICATION="H2" FLOWS_IN_DATASET="MXR">
<uncs:Section TF="1" REPORTED_CURRENCY="JOD" CONVERSION_FACTOR="1.410440" VALUATION="CIF" TRADE_SYSTEM="Special" PARTNER="Origin">
<uncs:Obs CC-H2="442190900" PRT="392" netweight="438" qty="438" QU="8" value="2238.36828" EST="0" HT="0" />
<uncs:Obs CC-H2="442190900" PRT="422" netweight="88883" qty="88883" QU="8" value="385604.42292" EST="0" HT="0" />
...
</uncs:Section>
</uncs:Group>
</uncs:DataSet>
</xml>
> as.data.frame(readSDMX("http://comtrade.un.org/ws/getsdmxtarifflinev1.aspx?px=H2&y=2005&r=400&rg=1&p=392&cc=442190900&comp=false"))
RPT time CL UNIT_MULT DECIMALS CURRENCY FREQ TIME_FORMAT
1 400 2005 H2 1 1 USD A P1Y
REPORTED_CLASSIFICATION FLOWS_IN_DATASET TF REPORTED_CURRENCY
1 H2 MXR 1 JOD
CONVERSION_FACTOR VALUATION TRADE_SYSTEM PARTNER obs CC.H2 PRT netweight
1 1.410440 CIF Special Origin Obs 442190900 392 438
qty QU value EST HT
1 438 8 2238.36828 0 0
RPT | time | CL | UNIT_MULT | DECIMALS | CURRENCY | FREQ | TIME_FORMAT | REPORTED_CLASSIFICATION | FLOWS_IN_DATASET |
---|---|---|---|---|---|---|---|---|---|
400 | 2005 | H2 | 1 | 1 | USD | A | P1Y | H2 | MXR |
TF | REPORTED_CURRENCY | CONVERSION_FACTOR | VALUATION | TRADE_SYSTEM | PARTNER | obs | CC.H2 | PRT |
---|---|---|---|---|---|---|---|---|
1 | JOD | 1.410440 | CIF | Special | Origin | Obs | 442190900 | 392 |
netweight | qty | QU | value | EST | HT |
---|---|---|---|---|---|
438 | 438 | 8 | 2238.36828 | 0 | 0 |