Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Improvements to network_p2p() #225

Closed
moralec opened this issue Jun 22, 2022 · 3 comments · Fixed by #228
Closed

Feature request: Improvements to network_p2p() #225

moralec opened this issue Jun 22, 2022 · 3 comments · Fixed by #228
Assignees

Comments

@moralec
Copy link
Contributor

moralec commented Jun 22, 2022

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)
@moralec moralec changed the title Feature request: ONA calculations in network_p2p Feature request: Improvements to network_p2p Jun 23, 2022
@martinctc martinctc changed the title Feature request: Improvements to network_p2p Feature request: Improvements to network_p2p() Jun 30, 2022
martinctc added a commit that referenced this issue Aug 11, 2022
martinctc added a commit that referenced this issue Aug 11, 2022
martinctc added a commit that referenced this issue Aug 11, 2022
@moralec
Copy link
Contributor Author

moralec commented Jul 13, 2023

Another small request:
node_alpha = 1
edge t ickness - at least double.

@moralec
Copy link
Contributor Author

moralec commented Jul 13, 2023

I think the basic flow is the following:

Step 1: Take data and use Igraph to create network object
Step 2: If Centrality is ON: Use network summary to get the ONA calculations for the different nodes.
Step 3: If Community is ON: Call additional functions for Community > network_leiden() and network_louvain()
Step 4: Prepare data for return (depending on type).

@moralec
Copy link
Contributor Author

moralec commented Jul 13, 2023

Another add: We should add an minimal example edge list dataset (not to have to generate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants