View source: R/economic_activity_hierachy.R
roll_up_hierarchy_by_minimum | R Documentation |
This function can be used to aggregate a NACE or SBI code economic activity tree, so the codes represent enough of something for example number of companies, number of customers or revenue.
roll_up_hierarchy_by_minimum(graph_tree, name_attribute, name_propagated,
threshold)
graph_tree |
Graph representing the economic activity hierarchy |
name_attribute |
The name of the attribute you want to base the roll-up on |
name_propagated |
The name of the new attribute that should contain the cumulative value of name_attribute |
threshold |
The minimum value name_attribute should have to be exluded from further roll-up |
A data frame containing the original economic activity code, the new activity code and the quantity/value that the new code would contain if aggregated
roll_up_hierarchy_by_minimum(graph_tree = graph_SBI, name_attribute = "qty_companies", name_propagated = "qty_companies_cum", threshold = 5000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.