-
Notifications
You must be signed in to change notification settings - Fork 1
00. Usage: Local
The following steps will execute the MapReduce application directly, not as a microservice.
First, (if you haven't already) go to your Facebook's settings page and download your personal data (tiny blue link at the bottom of the section).
Install Go Lang, and set your GOPATH to whatever workspace you've saved this project to.
Go to /src/ and execute go build and go install to create the binaries. You may need to call go get a couple of times to get some external libraries into your workspace.
Copy your messages.htm file into facebookanalysis/fbparser/. You'll need to install the Python dependencies for the prepocessor. Do so by executing:
./install_deps.sh pip install -r requirements.txt
Run the preprocessor via:
python fbparser.py > input_data.txt
Copy or move the new input_data.txt file into the parent facebookanalysis/ folder.
Calculate your top 3 friends and their message history times via:
cat input.txt | go run wc.go map | sort | go run wc.go reduce | sort > output.txt
Next, produce an image of this result by post-processing via:
go run wc.go graph stack-hist output.txt 3
Finally, clean up any temporary files by running (linux only):
./cleanup.sh
View the results in:
FabulousFacebookFriends.png
Let us know how it went! Was your result accurate? Was it too slow? Leave an issue!