Just some fun you can have with facebook's archive data
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 13 commits behind kaustubhhiware:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



forthebadge forthebadge

Chat at Slack

PRs Welcome MIT Licence Python

GitHub open pull requests GitHub open issues

Analyse everything facebook knows about you, through their own archive.

In light of the recent facebook's data breach, Mark Zuckerberg made all the data available for each user via Facebook. You're going to need to download it, we'll get to it shortly. There are some things that would take a lot of time (too costly API calls) online, but can be easily done on archived data.

Table of Contents

Getting the data

  1. Head on to Facebook > Settings > General Settings > Your facebook information.
  2. Select the JSON data format and click on download archive. It might take some time to prepare the archive, this might take upto 10-15 minutes. NOTE: The download might be in order of 100s MBs. Disable photo and video download options to save some bandwidth. (My archive was ~300MB).
  3. If possible, downlaod the same data in HTML format. It is much easier to browse through your archive and spot some interesting patterns in the HTML format, however this is not necessary. The JSON format will suffice for processing, refer #2.

↥ back to top


Install requirements with pip install -r requirements.txt


> python plot_friends.py
Enter facebook archive extracted location: <location of extracted data folder,  e.g.: "facebook-kaustubhhiware">

You can also run the script on sample data included in the examples folder:

> python plot_friends.py
Enter facebook archive extracted location: ./examples

↥ back to top


Will be updated soon

  • Plot messages across all conversations.
> python plot_messages.py -a
Enter facebook archive extracted location: "location of extracted, downloaded zip: like facebook-kaustubhhiware" 
  • Plot messages for a single conversation.
> python plot_messages.py
Enter facebook archive extracted location: "location of extracted, downloaded zip: like facebook-kaustubhhiware"
Enter id for friend: 511

What's this id?

  1. Open index.html in facebook-yourfacebookusername
  2. Click messages. Search for the person / conversation you want to analyse.
  3. Clicking on that chat should open a url like ; 'file:///home/kaustubh/GitHub/facebook-kaustubhhiware/messages/511.html'. For this particular chat, 511 is the id for this particular conversation. ↥ back to top


Your contributions are always welcome 😄 ! Please have a look at the contribution guidelines first.

Before working on an issue / feature, it is crucial that you're assigned the task on a GitHub issue.

  • If a relevant issue already exists, discuss on the issue and get yourself assigned on GitHub.
  • If no relevant issue exists, open a new issue and get it assigned to yourself on GitHub. Please proceed with a Pull Request only after you're assigned. It'd be a waste of your time as well as ours if you have not contacted us before hand when working on some feature / issue.

If you are here for GirlScript's Summer of Code and wish to seek assistance, feel free to contact any of the mentors on slack - @kaustubhhiware, @techytushar, @Anubhav, @fhackdroid, @Roopal.

↥ back to top


(Click to expand)

Your friends

Plot the friends you make every day (blue), and the friends so far (orange).

Plot exclusively the friends you make each day.

Plot messages as a function of month.

↥ back to top

Your Messages

The following is available for either a specific chat (person / group) or for all messages.

Plot all messages so far, with new messages each hour.

Plot only new messages each hour.

Plot messages as a function of hour (0-24)

Plot messages as a function of month.

↥ back to top

Your reactions

Plot count of different reactions to posts

Plot of 10 Friends whose posts you react to the most

Plot reactions as a function of month.

Plot cumulative count of different reactions on a single plot

↥ back to top


  1. There is a spike in friends made in March (Election season) and July (new juniors, much higher spike).

  2. I tend to message less during exams (Feb, Apr, Sep, Nov).

  3. Highest number of messages sent at 9 and 11 pm, confirming with calls from home come at 10pm. Almost no messages shared between 3am-7am.

↥ back to top


I always wanted to know how many friends I make every month. It would have been infeasible to make a webapp out of this because so many API calls would be so slow, and whosoever wants to work with Facebook's Graph API?

Plus it was raining and I couldn't go to MS's Hall Day till after the rain stopped.

Have a feature request? See an interesting avenue not utilised yet with facebook's archive? Let me know by making a new issue.

↥ back to top


The MIT License (MIT) 2018 - Kaustubh Hiware. Please have a look at the LICENSE for more details.