Skip to contents

All product and industry aggregations need to be present in the same data frame. This function stacks them (with dplyr::bind_rows) and adds columns to identify the levels of product and industry aggregation.

Usage

stack_despecification_aggregations(
  specified_df,
  Ds_Pr = NULL,
  Ds_In = NULL,
  Ds_PrIn = NULL,
  product_aggregation = PFUAggPipeline::aggregation_df_cols$product_aggregation,
  industry_aggregation = PFUAggPipeline::aggregation_df_cols$industry_aggregation,
  specified = PFUAggPipeline::aggregation_df_cols$specified,
  despecified = PFUAggPipeline::aggregation_df_cols$despecified
)

Arguments

specified_df

A data frame in which all rows and columns are specified.

Ds_Pr

A data frame in which products are despecified.

Ds_In

A data frame in which industries are despecified.

Ds_PrIn

A data frame in which both products and industries are despecified.

product_aggregation, industry_aggregation, specified, despecified

See PFUAggPipeline::aggregation_df_cols.

Value

A stacked data frame containing new metadata columns for product and industry specification.