projections | R Documentation |
projections()
computes two graphs that are particularly
useful to visualize product-product and country-country similarity.
projections(
proximity_country,
proximity_product,
avg_links = 5,
tolerance = 0.05,
compute = "both"
)
proximity_country |
(Type: dgCMatrix) the output from
|
proximity_product |
(Type: dgCMatrix) the output from
|
avg_links |
average number of connections for the projections.
By default this is set to |
tolerance |
tolerance for proximity variation on each iteration until
obtaining the desired average number of connections.
By default this is set to |
compute |
(Type: character) the proximity to compute. By default this is
|
The current implementation follows \insertCiteatlas2014economiccomplexity to create simplified graphs that correspond to a simplification of the proximity matrices. The result is obtained by iterating and reducing links until the desired average number of links per node is obtained, or a spaning tree after the strongest links is returned when is not possible to return the desired network.
A list of two graphs.
For more information see:
\insertRefatlas2014economiccomplexity
and the references therein.
net <- projections(
economiccomplexity_output$proximity$proximity_country,
economiccomplexity_output$proximity$proximity_product,
avg_links = 10,
tolerance = 0.1
)
# partial view of projections
igraph::E(net$network_country)[1:5]
igraph::E(net$network_product)[1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.