Man pages for SWS-Methodology/faoswsTrade
FAO Trade Module

accuracyScoresCompute accuracy scores.
adaptTradeDataNamesStandardise TL or ES variable names.
adaptTradeDataTypesStandardise TL or ES variable names.
add_area_namesA function to add columns with area names to a data frame...
add_fcls_from_linksAdd fcl codes to trade data from links datasets
addFCLunitsAdd FCL variable to trade data.
addMirrorAdd mirror data.
applyadjApply adjustments to trade data
area_name_faoA function to provide names for FAO area list codes.
check_versionsCheck package versions requirements
computeMedianUnitValueCompute the median unit value of the transaction.
comtradeunitsUnits of measuremnt for Comtrade datasets
convertComtradeM49ToFAOConverts area codes, stored in UNSD Comtrade M49, into FAO...
convertGeonom2FAOConvertion of EuroStat Geonomenclature to FAO area codes
convertHS2FCLConverts dataset with tradeflows from HS to FCL
convertMeasuredElementTradeConverts measuredElementTrade for the output
convertTLPartnerToFAOConvert tariffline partner code to FAO code
detectOutliersDetect anomalous observations (outliers).
doImputationImpute missing values or outliers.
extract_hs6fclmapCreate HS6->FCL mapping table.
extract_rprt_elemExtract an element from list stored in RDS archive in report...
extract_rprt_yearExtracts year from report directory name
faoAreaNameAssign area names to M49 or geonom codes.
fao_country_codeInformation of country code and names
fcl_2_cpc2FAO Commodity List (FCL) to Central Product Classification...
fclcodelistLocal replacement for table with fcl codes and descriptions...
fclunitsUnits of measurment for FCL codes
filterHS6FAOinterestFunction to filter trade data by HS6 codes of FAO interest
flowsToMirrorCheck which flows for which countries need to be mirrored.
generateFlagVarsGenerate flag variables in trade data.
geonom2faoEurostat Geonomenclature to FAO area codes mapping
getAgriHSCodesReturns subset of HS-codes of agriculture items used by ESS...
getComputedDataSWSGet computed dataset on SWS.
getHsManyLengthsGet HS codes with many digits.
getlistofadjsGenerate list of adjustments from a table extracted from MDB...
getSaveMostRecentfoldersGet and save the most updated folders.
hs6faointerestHS codes of length 6 from HSagric_filter.xls what take part...
hsfclmapSubsetSubset the HS to FCL map.
hsInRangeLooks for corresponding FCL codes in country-specific mapping...
is.SWSEnvirFunction to check is it SWS environment
list_rprt_dirsProvides list of directories with names matching reporting...
livestockWeightsTableLivestock weight table.
m49Table of M49 area codes. Taken from...
m49faomapComtrade M49 <-> FAO area list map. This table should be used...
mapHS2FCLUmbrella function to map HS codes to FCL codes
mapHS6toFCLMap HS to FCL based on HS codes of length 6
maxHSLengthPrepares for numerical comparison vector of hs codes from...
mdbfaoareamapMapping between character codes of areas in folders' names...
meltTradeDataMelt trade database
mirrorNonReportersMirror non-reporting and incomplete countries.
mirrorRulesUse mirror rules for balancing trade.
movavMoving average
name_areaA function to provide names for codes from different area...
preAggregateMultipleTLRowsAggregate multiple rows in raw Tariff Line data.
register_cpu_coresCheck for parallel support and register CPU cores
removeInvalidReportersRemove invalid reporters.
removeNonNumericRemove non numeric reporter/partner/hs.
reportdirectoryCreate directory for writing a report and supplementary files
reshapeTradeReshape trade data.
rprtFunction to call reporting instructions
rprt_fulltableAdds full table to report
rprt_glimpse0Drops dplyr::glimpse's invisible value
rprt_hs2fcl_fulldataReporting on multiple matches during HS->FCL matching by...
rprt_hs2fcl_multilinksReporting on multiple matches during HS->FCL matching by...
rprt_hs2fcl_nolinksReporting on results of HS ranges matches by function...
rprt_hs6fclmapReports on results of extraction of HS6->FCL map
rprt_hs6fcl_resultsReports on results of HS6->FCL mapping process.
rprt_hschangedReporting on HS code changes in trade data during HS->FCL...
rprt_hsfclmapFunction to produce report on HS->FCL mapping table
rprt_hslengthReporting on reporter/flow/hs unique combinations during...
rprt_map_hschangedReporting on modifications of HS codes in mapping table...
rprt_rawtradedataReport table on raw trade data
rprt_reportAdds info to futile.logger report
rprt_uniqhsReporting on reporter/flow/hs unique combinations during...
rprt_writetableWrites full table for report collection. Table is saved as...
saveFileForPPRSave file for pre-processing report.
sel1FCLSelect one record from multiple matches during HS->FCL...
setFlag2Set flags in trade data.
setFlag3Set flags in trade data.
set_sws_dev_settingsSet SWS environment in development mode
specificCorrectionsHSSpecific corrections to HS data.
sumFlagsSum the flags indicator variables
swapFlagsChange position of flags.
tfvalidValid dataset from database to be compared with new procedure
trailingDigitsAdds zeros to the end of hs column to make both columns of...
trailingDigits2Other version of adding of trailing digits. We should check...
ts_all_reportsGeneral function to produce all time-series reports
ts_content_checkCheck if quantity and weight both exist.
ts_corrections_not_appliedFunction to produce the list of corrections not applied.
ts_count_recordsCount number of records across years.
ts_flows_checkCheck if value and quantity and weight exist.
ts_hsfcl_nolinksExtract all unmapped HS codes across years
ts_hsfcl_nolinks_statisticExtracts time series of not mapped HS codes number
ts_missing_recordsReport the number of records with missing quantity/weight.
ts_non_reportersFunction to produce the list of non-reporting countries.
ts_preprocExtracts time series data from preprocessing reports
ts_reportersFunction to produce the list of reporters cointained in the...
ts_write_rprtWrites table with time series report to specific directory as...
unsdpartnersblocksUNSD partner blocksreference list
updateInfoTableUpdate the table with information of module runs.
useAdjustmentsUse specific adjustment factors for trade data.
useValidationCorrectionsUse the corrections deriving from validation.
SWS-Methodology/faoswsTrade documentation built on July 14, 2018, 4:06 p.m.