remove_agg_memo_flows | R Documentation |
Aggregation and memo rows are included with IEA data. Sometimes, it is convenient to remove those rows. This function does so, using default identifying strings for aggregations and memos.
remove_agg_memo_flows(
.iea_df,
flow = IEATools::iea_cols$flow,
product = IEATools::iea_cols$product,
agg_flows = IEATools::aggregation_flows,
memo_flow_prefixes = IEATools::memo_aggregation_flow_prefixes,
memo_product_prefixes = IEATools::memo_aggregation_product_prefixes
)
.iea_df |
A data frame of IEA data. |
flow |
The name of the flow column in |
product |
The name of the product columns in |
agg_flows |
A vector of strings identifying |
memo_flow_prefixes |
A vector of string prefixes for flow memo rows in |
memo_product_prefixes |
A string prefix for product memo rows in |
Note that the IEA data sometimes includes a variable number of spaces
before the "Memo: " string.
There are several places where trailing spaces are found, such as "Nuclear industry ".
This function strips all leading and trailing spaces in the Flow
and Product
columns.
.iea_df
without its aggregation rows.
sample_iea_data_path() %>%
iea_df() %>%
rename_iea_df_cols() %>%
remove_agg_memo_flows()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.