From 1af7718d38fa1e22e9373bdcf709f2c293bafbb8 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 19 Jun 2011 10:54:39 +0200 Subject: add more metrics to nodes Signed-off-by: franck cuny --- lib/GitHub/Collector/Role/Graph/Gexf.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/GitHub/Collector/Role/Graph/Gexf.pm') diff --git a/lib/GitHub/Collector/Role/Graph/Gexf.pm b/lib/GitHub/Collector/Role/Graph/Gexf.pm index ab83dd4..00dd2b9 100644 --- a/lib/GitHub/Collector/Role/Graph/Gexf.pm +++ b/lib/GitHub/Collector/Role/Graph/Gexf.pm @@ -13,11 +13,13 @@ sub export { my ($self, ) = @_; my $gexf = Graph::GEXF->new(); - $gexf->add_node_attribute( name => 'string' ); - $gexf->add_node_attribute( lang => 'string' ); - $gexf->add_node_attribute( size => 'int' ); - $gexf->add_node_attribute( country => 'string' ); + $gexf->add_node_attribute( name => 'string' ); + $gexf->add_node_attribute( lang => 'string' ); + $gexf->add_node_attribute( size => 'int' ); + $gexf->add_node_attribute( country => 'string' ); $gexf->add_node_attribute( indegree => 'int' ); + $gexf->add_node_attribute( nbrepos => 'int' ); + $gexf->add_node_attribute( follower => 'int' ); my $nodes = {}; foreach my $node ( keys %{ $self->nodes } ) { @@ -28,6 +30,8 @@ sub export { $n->attribute( lang => $self->nodes->{$node}->{language} || '' ); $n->attribute( country => $self->nodes->{$node}->{country} || '' ); $n->attribute( indegree => $self->nodes->{$node}->{indegree} ); + $n->attribute( follower => $self->nodes->{$node}->{follower} ); + $n->attribute( nbrepos => $self->nodes->{$node}->{nbrepos} ); $nodes->{$node} = $n; } -- cgit v1.2.3