View source: R/economic_activity_hierachy.R
roll_up_hierarchy_by_level | 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_level(graph_tree, level_to, name_attribute)
graph_tree |
Graph representing the economic activity hierarchy |
level_to |
The level to which you want to move the nodes in the hierarchy |
name_attribute |
The name of the attribute you want to check for values |
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
graph_SBI_rolled <- roll_up_hierarchy_by_level(graph_tree = graph_SBI,
level_to = 2
name_attribute = "qty_companies")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.