Skip to content

Commit

Permalink
add more metrics to nodes
Browse files Browse the repository at this point in the history
Signed-off-by: franck cuny <franck@lumberjaph.net>
  • Loading branch information
fcuny committed Jun 19, 2011
1 parent 81d01e6 commit 1af7718
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/GitHub/Collector/Role/Graph/Gexf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 } ) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 1af7718

Please sign in to comment.