Skip to content

Feature request: Improvements to network_p2p() #225

@moralec

Description

@moralec

Overview

Redesign the network_p2p() function in order to increase functionality with a more streamlined user experience. Among other things, add the ONA calculations from network_summary so they happen automatically when you create a person to person network.

Why?

  • Ease of use - makes getting ONA calculations easier to get for non-data science users.
  • Consistency - make sure the different returns make sense, regardless of what type of analysis you are doing.

How?

Restructure function so it includes the following parameters.

  • hrvar (single variable)
  • return: Plot, PDF, Table, Data, Network
  • centrality: OFF, Betweenness, Closeness, Degree, eigenvector, Pagerank
  • community: OFF, Laiden, Louvain
  • REMOVE display, desc_hrvar

Additionally, make the following changes:

  • HIDE network_leiden(), network_louvain()
  • KEEP netowrk_describe, network_summary,

Example of new functionality

Centrality: OFF & Community: OFF

PLOT -> Returns basic plot with HR attribute
PDF -> Exports plot as pdf file
Table -> HR Var count
Data -> Returns person dataset with HR attributes
Network -> Returns network object

Centrality: ON (any) & Community: OFF

PLOT -> Returns basic plot with HR attribute AND vertices proportional to centrality
PDF -> Exports plot as pdf file
Table -> HR Var count and average centrality
Data -> Returns person dataset with HR attributes and centrality scores (ALL)
Network -> Returns network object with centrality scores (ALL)

Centrality: OFF & Community: ON (Any)

PLOT -> Returns basic plot with community (no hrvar)
PDF -> Exports plot as pdf file
Table -> HR Var x community count
Data -> Returns person dataset with HR attributes and community attribute
Network -> Returns network object with community attribute

Centrality: ON (any) & Community: ON (Any)

PLOT -> Returns basic plot with community AND vertices proportional to centrality
PDF -> Exports plot as pdf file
Table -> HR Var x community count and average centrality
Data -> Returns person dataset with HR attributes, community attribute and centrality scores (ALL)
Network -> Returns network object with community attribute and centrality scores (ALL)

Future Changes

Network_describe

  • Leave as an independent function for now. Can be used with the output of return="table"
  • In the future, consider how to generalize as a profiling function. So any population (e.g an HR attribute) can be described with 3 others.
  • Useful for top_performance analysis.

Create_Sankey

  • Leave it as an indepentent function for now.
  • In the future, make it run from any person data (sq_data, or return from network_p2p return data)

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions