Weighted Degree Centrality
Degree centrality is defined as the number of edges connected to a vertex. The degree can be interpreted in terms of the immediate risk of a vertex for catching whatever is flowing through the network.
Weighted degree centrality allows you to assign weights to the edges connected to a vertex.
Specifications
CREATE QUERY tg_weighted_degree_cent(STRING v_type, STRING e_type,
STRING reverse_e_type, STRING weight_attribute, BOOL in_degree = TRUE,
BOOL out_degree = TRUE, INT top_k=100, BOOL print_results = TRUE,
STRING result_attribute = "",STRING file_path = "")
Parameters
Parameter  Description 


Vertex type to traverse. 

Edge type to traverse. 

Reverse vertex type to traverse and calculate indegree. 

The name of the attribute that indicates the weight of the edge.
The attribute itself must be of type 

Whether to count incoming edges when calculating degree centrality. 

Whether to count outgoing edges when calculating degree centrality. 

The number of vertices with the highest degree centrality to return. 

If true, return JSON results to standard output. 

If not empty, save the degree centrality of each vertex to this attribute. 

If not empty, output CSV results to this filepath. 