Package: Avionic24 0.1.0

The package maintainer

Avionic24: What the Package Does (Title Case)

More about what it does (maybe more than one line) Use four spaces when indenting paragraphs within the Description.

Authors:Who wrote it

Avionic24_0.1.0.tar.gz
Avionic24_0.1.0.zip(r-4.5)Avionic24_0.1.0.zip(r-4.4)Avionic24_0.1.0.zip(r-4.3)
Avionic24_0.1.0.tgz(r-4.4-x86_64)Avionic24_0.1.0.tgz(r-4.4-arm64)Avionic24_0.1.0.tgz(r-4.3-x86_64)Avionic24_0.1.0.tgz(r-4.3-arm64)
Avionic24_0.1.0.tar.gz(r-4.5-noble)Avionic24_0.1.0.tar.gz(r-4.4-noble)
Avionic24_0.1.0.tgz(r-4.4-emscripten)Avionic24_0.1.0.tgz(r-4.3-emscripten)
Avionic24.pdf |Avionic24.html
Avionic24/json (API)

# Install 'Avionic24' in R:
install.packages('Avionic24', repos = c('https://aqlt.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/inseefrlab/avionic24/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openjdk– OpenJDK Java runtime, using Hotspot JIT

On CRAN:

53 exports 1 stars 0.36 score 48 dependencies

Last updated 28 days agofrom:b56ec07aa0. Checks:OK: 1 WARNING: 8. Indexed: no.

TargetResultDate
Doc / VignettesOKAug 22 2024
R-4.5-win-x86_64WARNINGAug 22 2024
R-4.5-linux-x86_64WARNINGAug 22 2024
R-4.4-win-x86_64WARNINGAug 22 2024
R-4.4-mac-x86_64WARNINGAug 22 2024
R-4.4-mac-aarch64WARNINGAug 22 2024
R-4.3-win-x86_64WARNINGAug 22 2024
R-4.3-mac-x86_64WARNINGAug 22 2024
R-4.3-mac-aarch64WARNINGAug 22 2024

Exports:AddRownamesToFirstColAgreg_ManufAjoutPRBRAttr_TxSimu_HRM_100MoEAutarkyav_create_FIGAROixi_2022av_create_ICIO_2021av_create_LRWIOD_2022av_create_WIOD_2016av_Diff_SPAav_dl_MicroMRIOav_dl_UE27av_extend_MRIO_dwav_fun_VarPostTransitionav_HRMav_MadeInav_MRIO_comparisonav_SPABoucleAnneesMADEINsBoucleLinkageBwdFwdBouclePaysContVAdesExportsBouclePaysEtAnneesContVAdesExportsBuild_MadeIn_byOriginCFPcalculationRCPPCompoMRIOContentVAExports_RetropolationContentVAExports_Retropolation_UE27ContenusContVAdesExportsdw_to_dlEmissionsProdGereInfNAGetRownamesFromFirstColHerfindahlImportedContentInVAIndicVariant_IndusCountryInfo_MRIOLinkageBwdFwdListsReferentialMadeIn_byOriginMadeIn_ManufMadeIn_RetropolationMadeIn_Retropolation_UE27Mult2_rcpp3PasteNPastePRBRRatioNogueraReqSumrndNSoldExtPaysSommeDFenP3_S14SplitPRBRvectDF

Dependencies:cellrangerclicolorspacecpp11crayondata.tabledplyrfansifarvergenericsggplot2gluegtablehmsisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigprettyunitsprogressR6RColorBrewerRcppRcppArmadilloreadxlrematchrJavarlangscalesstringistringrtibbletictoctidyselectutf8vctrsviridisLitewithrxlsxxlsxjars

Build databases and calculation of Made-In indicators (and content of VA in exports)

Rendered frombuildatabase.Rmdusingknitr::rmarkdownon Aug 22 2024.

Last update: 2024-05-30
Started: 2024-05-30

Readme and manuals

Help Manual

Help pageTopics
AddRownamesToFirstCol Add Rownames To First ColumnAddRownamesToFirstCol
Agreg_Manuf greggation function TypAgreg= Manuf_CT ; Manuf_IP19 ; Manuf_CT_lrwiod ; Manuf_IP19_lrwiod MRIO= LRWIOD ; WIOD; FIGARO Warning : the variable to agreggate must be named "value" Use of StructDocs to manage classificationsAgreg_Manuf
AjoutPRBR Add PR and BR to help transposing tables to wide format (eg. matrix like A or L)AjoutPRBR
Attr_TxSimu_HRM_100MoE Function to affect the right Why 100Mo ? / because as we exchange imports with production we need to have enough imports. -> Linear Model => results*10 with no problem. TypeTx = "VA" or "PROD"Attr_TxSimu_HRM_100MoE
Autarky Function for calculating an autarky situation from a MRIO which is the starting world economy situation The MRIO has already undergone a CompoMRIO, and the Save option does a saveRDS in "MRIO_Autarky.rds".Autarky
av_create_FIGAROixi_2022av_create_FIGAROixi_2022
av_create_ICIO_2021 ICIO 2021 release, CSV flat format : link : https://www.oecd.org/industry/ind/inter-country-input-output-tables.htm OECD (2021), OECD Inter-Country Input-Output Database, http://oe.cd/icioav_create_ICIO_2021
av_create_LRWIOD_2022 LR-WIOD 2022 release : link : https://www.rug.nl/ggdc/valuechain/long-run-wiod?lang=en License and funding : Long-run WIOD is licensed under a Creative Commons Attribution 4.0 International License . The construction of the Long-run WIOD was supported by the Dutch Science Foundation (NWO) [grant number 453-14-012].av_create_LRWIOD_2022
av_create_WIOD_2016 WIOD 2016 release, RData format : link : https://www.rug.nl/ggdc/valuechain/wiod/wiod-2016-release?lang=en Timmer, M. P., Dietzenbacher, E., Los, B., Stehrer, R. and de Vries, G. J. (2015), "An Illustrated User Guide to the World Input–Output Database: the Case of Global Automotive Production" , Review of International Economics., 23: 575–605av_create_WIOD_2016
av_Diff_SPA Function for calculating the difference of Stuctural Path Analysis (SPA) for variant analysis The MRIO can only be in long format here TypeSPA="VA" or "Emi" ListThres = GenThres=,Thres_L2_1=,Thres_L3_1=,Thres_L3_2=,Thres_L3_3,Thres_L3_4=,Thres_L4_1=,Thres_L4_2=,Thres_L4_3,Thres_L4_4=,Thres_L5_1=,Thres_L5_2=,Thres_L5_3,Thres_L5_4=,Thres_L6_1=,Thres_L6_2=,Thres_L6_3,Thres_L6_4=,Thres_L7_1=,Thres_L7_2=,Thres_L7_3,Thres_L7_4= Fitted FIGARO VA : ListThres = GenThres=0.001,Thres_L2_1=0.001,Thres_L3_1=0.001,Thres_L3_2=0.001,Thres_L3_3=0.00001,Thres_L3_4=0.001,Thres_L4_1=0.001,Thres_L4_2=0.001,Thres_L4_3=0.000005,Thres_L4_4=0.001,Thres_L5_1=0.001,Thres_L5_2=0.001,Thres_L5_3=0.000001,Thres_L5_4=0.001,Thres_L6_1=0.001,Thres_L6_2=0.001,Thres_L6_3=0.0000005,Thres_L6_4=0.001,Thres_L7_1=0.001,Thres_L7_2=0.001,Thres_L7_3=0.0000001,Thres_L7_4=0.001 Fitted FIGARO Emi : ListThres = GenThres=0.001,Thres_L2_1=0.0001,Thres_L3_1=0.0001,Thres_L3_2=0.00001,Thres_L3_3=0.000005,Thres_L3_4=0.0001,Thres_L4_1=0.0001,Thres_L4_2=0.00001,Thres_L4_3=0.000005,Thres_L4_4=0.00001,Thres_L5_1=0.001,Thres_L5_2=0.0001,Thres_L5_3=0.000004,Thres_L5_4=0.000001,Thres_L6_1=0.0001,Thres_L6_2=0.00001,Thres_L6_3=0.000004,Thres_L6_4=0.0000001,Thres_L7_1=0.0005,Thres_L7_2=0.00005,Thres_L7_3=0.0000005,Thres_L7_4=0.001av_Diff_SPA
av_dl_MicroMRIOav_dl_MicroMRIO
av_dl_UE27 Build a new MRIO with all EU countries aggragated into "UE27" item. Useful to calculate EU made-in for instance. WARNING : dl must be normalized (not raw data) for countries homogeneity reasons.av_dl_UE27
av_extend_MRIO_dw Extend MRIO components by adding stressors like Value added or CO2 Emissions You can manage this function to add new cases : other MRIO options or other stressors etc.av_extend_MRIO_dw
av_fun_VarPostTransition Function for robustness checks by applying structural changes at the wolrd economy to suit climate change Parameters description : - paramEmploi : Employment intensity (value = 0.9 => 10 - paramA : Intermediate consumption substitution intensity: value = 0.9 => the technical coefficient of each country's automotive industry (C29) in products C29 and C28 (domestic and imported) is reduced by 10 - paramDF : The intensity of final consumption substitution: value = 0.9 => each country's final demand for oil products (C19) is reduced by 10 The adjustments made are therefore zero-sum on intermediate consumption and final demand. The simulations are called by their X-Y-Z parameters: for example, 09-08-07 will correspond to a parameter of 0.9 for employment, 0.8 for intermediate consumption and 0.7 for final demand.av_fun_VarPostTransition
av_HRM Master function in the ecosystem : Function HRM (hypothetical repatriation method) repat_pct can come from an other function to calibrate VARIANTs options : OptVarianteDemande : ALL=Normal ; CIdom=CI domestics ; CIall=all CI (dom+exp) ; DFdom=DF domestics ; DFall=all final demand (dom+exp) ; OptVariantePaysImp : ALL=Normal ; <country>= normal but 1 country only ; horsUE=substitution outside EU only We implement a repat_pct repatriation of repat_pct to repatriate 1 Md??? of production, we set the previous repatriation The calculations are transversal to TEI and FD: the entire product is uniformly concerned.av_HRM
av_MadeIn Function calculation of MADE-INav_MadeIn
av_MRIO_comparison Function to compare 2 MRIOs MRIOs can be initially in long format (Optdl) or in wide format (split comparison of all components of the MRIO)av_MRIO_comparison
av_SPA Master function in the environment : Structural Path Analysis (SPA) Function for calculating the Stuctural Path Analysis (SPA) of a MRIO The MRIO can be in long format or it has already undergone a CompoMRIO (dt) TypeSPA="VA" or "Emi" ListThres = GenThres=,Thres_L2_1=,Thres_L3_1=,Thres_L3_2=,Thres_L3_3,Thres_L3_4=,Thres_L4_1=,Thres_L4_2=,Thres_L4_3,Thres_L4_4=,Thres_L5_1=,Thres_L5_2=,Thres_L5_3,Thres_L5_4=,Thres_L6_1=,Thres_L6_2=,Thres_L6_3,Thres_L6_4=,Thres_L7_1=,Thres_L7_2=,Thres_L7_3,Thres_L7_4= Fitted FIGARO VA : ListThres = GenThres=0.001,Thres_L2_1=0.001,Thres_L3_1=0.001,Thres_L3_2=0.001,Thres_L3_3=0.00001,Thres_L3_4=0.001,Thres_L4_1=0.001,Thres_L4_2=0.001,Thres_L4_3=0.000005,Thres_L4_4=0.001,Thres_L5_1=0.001,Thres_L5_2=0.001,Thres_L5_3=0.000001,Thres_L5_4=0.001,Thres_L6_1=0.001,Thres_L6_2=0.001,Thres_L6_3=0.0000005,Thres_L6_4=0.001,Thres_L7_1=0.001,Thres_L7_2=0.001,Thres_L7_3=0.0000001,Thres_L7_4=0.001 Fitted FIGARO Emi : ListThres = GenThres=0.001,Thres_L2_1=0.0001,Thres_L3_1=0.0001,Thres_L3_2=0.00001,Thres_L3_3=0.000005,Thres_L3_4=0.0001,Thres_L4_1=0.0001,Thres_L4_2=0.00001,Thres_L4_3=0.000005,Thres_L4_4=0.00001,Thres_L5_1=0.001,Thres_L5_2=0.0001,Thres_L5_3=0.000004,Thres_L5_4=0.000001,Thres_L6_1=0.0001,Thres_L6_2=0.00001,Thres_L6_3=0.000004,Thres_L6_4=0.0000001,Thres_L7_1=0.0005,Thres_L7_2=0.00005,Thres_L7_3=0.0000005,Thres_L7_4=0.001av_SPA
BoucleAnneesMADEINs Loop to build insight database on MADE-IN 2 options : (1) On the full MRIO database (if memory allows) (2) by year but need to load all the dl and put them into a list (ListdlAnnual)BoucleAnneesMADEINs
BoucleLinkageBwdFwd Function loop to calculate Backward and Forward Linkage indicators databasesBoucleLinkageBwdFwd
BouclePaysContVAdesExports Calculation loop of content of value addend embedded in exports for a list of countries and a given year Foster-McGregor, N., et R. Stehrer (2013) : “Value added content of trade : A comprehensive approach,” Economics Letters, 120(2), 354–357.BouclePaysContVAdesExports
BouclePaysEtAnneesContVAdesExports Calculation loop of content of value addend embedded in exports for a list of countries and a time period (several years) if OptAnnual=TRUE then dtdl must be a list of dtdl Foster-McGregor, N., et R. Stehrer (2013) : “Value added content of trade : A comprehensive approach,” Economics Letters, 120(2), 354–357.BouclePaysEtAnneesContVAdesExports
Build_MadeIn_byOrigin Build contents of VA by country of originBuild_MadeIn_byOrigin
Matrix Multiplication : 3 componentsCFPcalculationRCPP
CompoMRIO Master function in the ecosystem Allow to build Wide MRIO (dw) from Long MRIO (dl), by splitting components You can add other components if needed Afterward you can use av_extend_MRIO_dw() function to extend with environmental data for exampleCompoMRIO
ContentVAExports_Retropolation Retropolation of content in value added of exports WIOD is the reference and LRWIOD is used to retropolate backward, and FIGARO is used to retropolate forward. ICIO is not used here because of systematic retropolation method Very specific task : can be adapted depending on data you're usingContentVAExports_Retropolation
ContentVAExports_Retropolation_UE27 Retropolation of content in value added of exports for UE27 and big areas Need to aggregate data before to have only one area EU Very specific task : can be adapted depending on data you're usingContentVAExports_Retropolation_UE27
Contenus Master function in the ecosystem Function calculation of contents (in VA, émissions CO2, emploi) : allow footprint calculation along different formats WARNING Needs CompoMRIO with bonus and extensionsContenus
ContVAdesExports Calculation of content of value addend embedded in exports for a given country and a given year Foster-McGregor, N., et R. Stehrer (2013) : “Value added content of trade : A comprehensive approach,” Economics Letters, 120(2), 354–357.ContVAdesExports
dw_to_dl Convert dw to dldw_to_dl
EmissionsProd Function to calculate Inventory Emissions (coming from production) Be careful : [["EmiOverOuput"]] must have been introduced in our MRIO previously (with av_extend_MRIO_dw() function)EmissionsProd
GereInfNA Function (very useful) to convert infinity data into NA and NA data into 0 or 1 for exampleGereInfNA
GetRownamesFromFirstCol Get Rownames From First ColumnGetRownamesFromFirstCol
Herfindahl Function Herfindahl (concentration indicator)Herfindahl
ImportedContentInVA Function to calculate the imported content in value added it works with 1 country but you can loop all over the contries available in the MRIO.ImportedContentInVA
IndicVariant_IndusCountry Function to calculate differences of indicators resulting from a HRM variant for instanceIndicVariant_IndusCountry
Info_MRIO Info_MRIO function: provides information on a product * country (equivalent to branch * country) MRIO must be derived from compoMRIO nb_top : number of crosses to display (ex: nb of countries of origin) Output in print format and save possible.Info_MRIO
LinkageBwdFwd Function Backward and Forward LinkageLinkageBwdFwd
ListsReferential Function to return lists of countries or operations or both You can add lists depending of new MRIO for exemple, or depending of releasesListsReferential
MadeIn_byOrigin Calculate MAdeIn by country of origin, for analyticsMadeIn_byOrigin
MadeIn_Manuf Calculation of manuf's made-in by agreggation (2 classifications)MadeIn_Manuf
MadeIn_Retropolation Retropolation of made-in to fit long series inter-MRIO You can manage the MRIO listMadeIn_Retropolation
MadeIn_Retropolation_UE27 Retropolation of made-in to fit long series inter-MRIOMadeIn_Retropolation_UE27
Matrix Multiplication : 2 componentsMult2_rcpp3
PasteN Function to concatenate the amounts (in value) of several columns of a DT (in list form)PasteN
PastePRBR Paste (Lig_Country and Lig_Indus) into PR and/or (Col_Country and Col_Indus) into BR. Please note: country names, branch names and product names must not contain underscores.PastePRBR
RatioNoguera Calculation of Noguera indicatorRatioNoguera
ReqSum Query function to calculate a sum from a list of dimensions to be summed ListDimASommer is the normalized list of dimensions on wich you wants to sum up. OptStruct keeps initial format of data bur compute structure on the given list of dimensions (ListDimASommer)ReqSum
rndN Rounding function, default 0 decimal placesrndN
SoldExtPays Function to calculate external balance for all countries of a MRIOSoldExtPays
SommeDFenP3_S14 Function which sums up all final demand and stores it in P3_14 Caution: potentially biases detailed interpretation of MRIO components On the other hand, remains compatible with all functions and avoids the weird things of P5M (stock variatins that make HRM jump on C22 in particular) Only works with FIGARO at this time, needs more lists if you wants to expandSommeDFenP3_S14
SplitPRBR Split of PR and BR into four parts or only PR or only BR Please note: country names, branch names and product names must not contain underscores.SplitPRBR
vectDF Function to convert a vector into dataframevectDF