Code Monkey home page Code Monkey logo

snafun's Introduction

SNAfun

FUNctions to enjoy alongside the SNA4DS course

The following API is used:

  • add_* : add stuff to network objects
  • count_* : counting things in the graph, such as the number of vertices, number of edges, dyad census, triad census
  • create_* : create graphs (in igraph or network format) with specific characteristics
  • extract_* : access specific data from (network) objects
  • find_* : identify specific parts of the network, such as who the isolates are
  • is_* : checks, such as whether a network is bipartite
  • has_* : checks, such as whether a network has loops
  • list_*: list characteristics, such as list_edge_attributes
  • make_* : create objects based on graphs, ie. make a matrix from vertex attributes, make a mixing_matrix, etc.
  • plot_* : several plot functions
  • remove_* : delete parts of the network, such as remove the isolates
  • stat_* : help functions for statistical modeling
  • to_* : conversion methods, converting from igraph, network, matrix, data.frame to igraph, network, matrix, data.frame

Then, there are indices/measures at three levels:

  • e_* : edge level indices
  • g_* : graph level indices, such as betweenness centralization
  • v_* : vertex level indices, such as betweenness

Finally, a few some functions don't fit within a clear category and don't follow this API.

snafun's People

Contributors

snanalyst avatar czucca avatar

Stargazers

Xs avatar

Watchers

 avatar  avatar

snafun's Issues

centrality and centralization and general measures

add methods for centrality and centralization, for igraph and network objects
v_degree
v_betweenness
v_closeness
v_stress
v_eccentricity

e_betweenness
e_* ???

g_eccentricity
g_closeness
g_density
g_degree
g_betweenness
g_diameter
g_reciprocity
g_transitivity
g_stress

manual graph creation function

Per maksim:

"Would it also be possible to introduce some manual graph creation/node addition/edge addition functions to "SNAfun" by next year? During the first lab, we start with basics, paying quite a bit of attention to the manual creation of graphs (e.g., using the "graph.formula" function). "

set, get, and delete attributes

add functions to set, get (=show), and remove:

  • vertex attributes
  • edge attributes
  • graph attributes

that works for both igraph and network objects.

naming of makeEdgelist and makeNodelist

The (unwritten and not-yet-well-developed) api for our package has the "make_" verb. Therefore, it would be preferable to use make_* here too.
Perhaps make_*_from_dfs would work, as I will probably create make_igraph_from_dfs and make_network_from_dfs as well, so that would be consistent in naming.

Test function to test the proper install of the entire SNA4DSverse

Add a function (here or as a separate script) to test that students have a proper installation of all packages for our course, with all required dependencies, required versions (incl. R and Rstudio), location of folders on the machine, and all works well (esp. check that the packages that embed C work well on the student's machine--ergm, btergm, igraph, others?).

Update cheatsheet

snafun is new and contains many useful functions
update the cheatsheet so students can see how to do things in snafun in addition to what is already in the cheatsheet

isolates

Add:

  • find_isolates()
  • remove_isolates()
  • contract_isolates()

Modify plot_weighted_graph

Currently plot_weighted_graph takes class matrix.

Implement plots also for weighted graph of class

  • igraph
  • network
  • data.frame

make_random

methods for generating random graphs, either with fixed edge prob or fixed density

count_* methods

add generic count_* methods, including:

  • count_vertices()
  • count_nodes()
  • count_dyads() (=dyad census)
  • count_triads() (=triad census)

all for network, igraph, matrix, data.frame

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.