No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
network
nginx
presentation
sql
.env
.gitignore
.gitmodules
.secret.example
.static
Makefile
README.md
__init__.py
categorize.py
colors.py
community.py
cultural_groups.csv
data.json
eecs 510.txt
eecs professors.csv
eecs.py
facebook.gexf
find_usernames.py
get_friends.py
group_export.csv
group_export.py
groups.csv
groups.py
index-old.html
lib.py
mark_0_friends_as_todo.py
mark_all_as_nu.py
mark_all_users_todo.py
mark_inprogress_and_error_as_todo.py
models.py
netvizz.txt
network.py
network2.py
nodify.py
notes.txt
notes2.txt
old.dump.txt
producer.py
requirements.txt
set_all_username.py
usage.py
user_export.py

README.md

Usage

workon nusocialgraph

# several points of entry
	python -i models.py
	psql nusocialgraph
	python -i network.py

Setup

mkvirtualenv nusocialgraph
pip install -r requirements.txt

# Fix Matplotlib Backend for Mac OS (set to qt4agg)
# http://matplotlib.org/users/customizing.html
# matplotlib.matplotlib_fname() => /Users/`whoami`/.virtualenvs/nusocialgraph/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc

# install pyside

createdb nusocialgraph
pg_restore -Fc -d nusocialgraph latest.dump.bak

Restore Database

wget https://s3.amazonaws.com/al-johri/latest.dump.bak
dropdb nusocialgraph; createdb nusocialgraph
pg_restore -Fc -d nusocialgraph latest.dump.bak

Random Instructions and Links

brew install graphviz
brew install igraph
http://stackoverflow.com/a/16166290/1667241
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH
https://github.com/yyuu/pyenv/issues/16#issuecomment-17818298
http://cairographics.org/pycairo/
http://stackoverflow.com/a/25903802/1667241

Queries

>>> nu = session.query(FacebookUser).filter(FacebookUser.nu == 1).all()
>>> len(nu)
15881
>>> nu_todo = [user for user in nu if user.all_friends.count() < 10]