diff options
| author | franck cuny <franck@lumberjaph.net> | 2011-06-19 10:54:39 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2011-06-19 10:54:39 +0200 |
| commit | 1af7718d38fa1e22e9373bdcf709f2c293bafbb8 (patch) | |
| tree | 83352569c6303f9afbc4f9c8187ec658fbd2ac01 | |
| parent | cleanup css, js, and update about + layout (diff) | |
| download | stargit-1af7718d38fa1e22e9373bdcf709f2c293bafbb8.tar.gz | |
add more metrics to nodes
Signed-off-by: franck cuny <franck@lumberjaph.net>
| -rw-r--r-- | lib/GitHub/Collector/Role/Graph/Gexf.pm | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |
