/snap-facebook

A python script that parses the SNAP facebook dataset into a single NetworkX network

Primary LanguagePython

This is python script that parses the SNAP facebook dataset into a single NetworkX network.

Usage:

import facebook

# load the network
facebook.load_network()

print facebook.network.order()
print facebook.network.size()

# Look at a node's features
print facebook.network.node[0]['features']

# 0: feature not present for this user
# 1: user does not have this feature
# 2: user does have this feature

# look at the features of the whole network
print facebook.feature_matrix()

Tests:

./facebook.py