{"id":17584577,"url":"https://github.com/kaustubhhiware/facebook-archive","last_synced_at":"2025-04-15T16:56:38.420Z","repository":{"id":31471615,"uuid":"127941048","full_name":"kaustubhhiware/facebook-archive","owner":"kaustubhhiware","description":"Just some fun you can have with facebook's archive data","archived":false,"fork":false,"pushed_at":"2023-10-03T21:21:16.000Z","size":1597,"stargazers_count":75,"open_issues_count":16,"forks_count":42,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T22:41:48.905Z","etag":null,"topics":["data","data-visualization","facebook","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaustubhhiware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"Code-of-Conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-03T17:03:19.000Z","updated_at":"2025-02-15T20:57:37.000Z","dependencies_parsed_at":"2024-10-22T23:02:29.918Z","dependency_job_id":null,"html_url":"https://github.com/kaustubhhiware/facebook-archive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaustubhhiware%2Ffacebook-archive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaustubhhiware%2Ffacebook-archive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaustubhhiware%2Ffacebook-archive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaustubhhiware%2Ffacebook-archive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaustubhhiware","download_url":"https://codeload.github.com/kaustubhhiware/facebook-archive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116137,"owners_count":21215140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","data-visualization","facebook","python"],"created_at":"2024-10-22T02:06:59.182Z","updated_at":"2025-04-15T16:56:38.401Z","avatar_url":"https://github.com/kaustubhhiware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# facebook-archive\n[![forthebadge](http://forthebadge.com/images/badges/made-with-python.svg)](http://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/for-you.svg)](https://forthebadge.com)\n\n[![Chat at Slack](https://img.shields.io/badge/chat%20on%20-Slack-brightgreen.svg?style=for-the-badge)](https://girlscriptgssoc.slack.com/messages/CB4V6N62H/details/)\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=shields)](http://makeapullrequest.com) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.png?v=103)](https://opensource.org/licenses/mit-license.php) ![Python](https://img.shields.io/badge/python-3.6-blue.svg)\n\n\n![GitHub open pull requests](https://img.shields.io/github/issues-pr/kaustubhhiware/facebook-archive.svg) \n![GitHub open issues](https://img.shields.io/github/issues/kaustubhhiware/facebook-archive.svg)\n\n\u003e Analyse everything facebook knows about you, through their own archive.\n\nIn 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.\n\nNote to KWoC contributors: All issues are available for KWoC, feel free to work on any issue after being assigned.\n\n\n## Table of Contents\n\n- [facebook-archive](#facebook-archive)\n  - [Table of Contents](#table-of-contents)\n  - [Getting the data](#getting-the-data)\n  - [Usage](#usage)\n    - [Friends](#friends)\n    - [Messages](#messages)\n    - [Locations](#locations)\n  - [Contributing](#contributing)\n  - [Features](#features)\n    - [Your friends](#your-friends)\n    - [Your Messages](#your-messages)\n    - [Friend Request](#friend-request)\n    - [Your reactions](#your-reactions)\n    - [Your posts and comments](#your-posts-and-comments)\n    - [Your locations](#your-locations)\n  - [Observations](#observations)\n  - [Why](#why)\n  - [License](#license)\n\n## Getting the data\n\n1. Head on to [Facebook \u003e Settings \u003e General Settings \u003e Your facebook information](https://www.facebook.com/settings?tab=your_facebook_informations).\n2. 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).\n3. If possible, download 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](https://github.com/kaustubhhiware/facebook-archive/issues/2).\n ![](images/archive-download.png)\n \n[↥ back to top](#table-of-contents)\n\n## Usage\n\nInstall requirements with `pip install -r requirements.txt`\n\n### Friends\n\n```\npython plot_friends.py [path] [--from date] [--to date]\n```\n* `path` is the path to the facebook data archive\n* `--from date` specify the beginning of the plot\n* `--to date` specify the end of the plot\n* `date` string is in format __YYYY-MM-DD__\n```\n\u003e python plot_friends.py\nEnter facebook archive extracted location: \u003clocation of extracted data folder,  e.g.: \"facebook-kaustubhhiware\"\u003e\n```\nYou can also run the script on sample data included in the examples folder:\n```python\n\u003e python plot_friends.py\nEnter facebook archive extracted location: ./examples\n```\n[↥ back to top](#table-of-contents)\n\n### Messages\n\n**Will be updated soon**\n\n* Plot messages across all conversations.\n ```\n \u003e python plot_messages.py\n Enter facebook archive extracted location: \"location of extracted, downloaded zip: like facebook-kaustubhhiware\" \n ```\n\n### Locations\n\n**Will be updated soon**\n\n* Plot your location history.\n ```\n \u003e python where_have_you_been.py \n Enter facebook archive extracted location: \"location of extracted, downloaded zip: like facebook-kaustubhhiware\" \n ```\n [↥ back to top](#table-of-contents)\n\n## Contributing\n\nYour contributions are always welcome :smile: ! Please have a look at the [contribution guidelines](CONTRIBUTING.md) first.\n\nBefore working on an issue / feature, it is **crucial** that you're assigned the task on a GitHub issue.\n* If a relevant issue already exists, discuss on the issue and get yourself assigned on GitHub.\n* If no relevant issue exists, open a new issue and get it assigned to yourself on GitHub.\nPlease 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.\n\nIf you are here for GirlScript's Summer of Code and wish to seek assistance, feel free to contact any of the mentors on [slack](https://girlscriptgssoc.slack.com/) - \n[@kaustubhhiware](https://girlscriptgssoc.slack.com/messages/DB0B3GBEG/), [@techytushar](https://girlscriptgssoc.slack.com/messages/DBBGEQAPQ/),\n[@Anubhav](https://girlscriptgssoc.slack.com/messages/DBAK57AQ2/), [@fhackdroid](https://girlscriptgssoc.slack.com/messages/DBAK4TUP4/), [@Roopal](https://girlscriptgssoc.slack.com/messages/DB92S68SX).\n\n[↥ back to top](#table-of-contents)\n\n## Features\n\n(Click to expand)\n\n### Your friends\n\nPlot the friends you make every day (blue), and the friends so far (orange).\n\n ![](images/plot_friends/friends-cumulative.png)\n\n\u003cdetails\u003e\n\u003csummary\u003ePlot exclusively the friends you make each day.\u003c/summary\u003e\n\n ![](images/plot_friends/friends-each.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePlot messages as a function of month.\u003c/summary\u003e\n\n ![](images/plot_friends/friends-month.png)\n\u003c/details\u003e\n\n[↥ back to top](#table-of-contents)\n\n\n### Your Messages\n\nThe following is available for either a specific chat (person / group) or for all messages.\n\nPlot all messages so far,\n\n ![](images/plot_messages/msgs-cumulative.png)\n\n\u003cdetails\u003e\n\u003csummary\u003ePlot daily message frequency\u003c/summary\u003e\n\n ![](images/messages-daily.png)\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003ePlot monthly message frequency\u003c/summary\u003e\n\n ![](images/messages-monthly.png)\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003ePlot yearly message frequency\u003c/summary\u003e\n\n ![](images/messages-yearly.png)\n\u003c/details\u003e\n\n[↥ back to top](#table-of-contents)\n### Top_10_friends_whom_I_message and Top_10_friends_who_message_me\nFind the top ten friends whom you message and plot each friends no. of messages as a function of time\nhttps://github.com/hadesanirban/facebook-archive/tree/master/images/Top_10_Friends_whom_I_message\n* Plot Top_ten_Friends.\n ```\n \u003e python plot Top_ten_Friends.py --num_friends 7 (for example)\n enter your official facebook name: \"your name as in facebook i.e. Anirban Panda\"\n Enter facebook archive extracted location: \"location of extracted, downloaded zip: like facebook-kaustubhhiware\"\n ```\n Also added a new command line argument named num_friends which helps you to plot as many friends as you want but default value is set to 10.\n\n### Friend Request\nPlot the friends you make every day(Red) ,friend request send every day(green) and friend request received every day(blue)\n\n![](images/received_friend/FriendEachDay.png)\n\n \u003cdetails\u003e\n  \u003csummary\u003eWe compare monthwise no.of friend request send vs friend request received\u003c/summary\u003e\n\n  ![](images/received_friend/Compare.png)\n  \u003c/details\u003e\n\n### Your reactions\n\nPlot count of different reactions to posts\n\n ![](images/reactions/reactions_plot2.png)\n\n\u003cdetails\u003e\n\u003csummary\u003ePlot of 10 Friends whose posts you react to the most\u003c/summary\u003e\n\n ![](images/reactions/top10_friends.png)\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003ePlot reactions as a function of month.\u003c/summary\u003e\n\n ![](images/reactions/reactions_monthwise.png)\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003ePlot cumulative count of different reactions on a single plot\u003c/summary\u003e\n\n ![](images/reactions/cumulative_rxns.png)\n\u003c/details\u003e\n\n[↥ back to top](#table-of-contents)\n\n### Your posts and comments\n\nWordcloud of common words in your posts and comments\n\n ![](images/wordclouds/wordcloud_comments.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eMost tagged friends in your post\u003c/summary\u003e\n\n ![](images/wordclouds/wordcloud_tagged_friends.png)\n\u003c/details\u003e\n\n### Your Locations\n\nPlot all locations so far,\n\n ![](images/where_have_you_been/Location_history_640x480.png)\n\n[↥ back to top](#table-of-contents)\n\n\n\n## Observations\n\n\n1. There is a spike in friends made in March (Election season) and July (new juniors, much higher spike).\n\n2. I tend to message less during exams (Feb, Apr, Sep, Nov).\n\n3. 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.\n\n4. I used to send more friend request as compared to friend request received.\n \t \n5. I tend to receive more friend request in the month of july,august(new juniors)\n\n[↥ back to top](#table-of-contents)\n\n## Why\n\nI 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?\n\nPlus it was raining and I couldn't go to MS's Hall Day till after the rain stopped.\n\nHave a feature request? See an interesting avenue not utilised yet with facebook's archive? Let me know by making a new issue.\n\n[↥ back to top](#table-of-contents)\n\n## License\n\nThe MIT License (MIT) 2018 - [Kaustubh Hiware](https://github.com/kaustubhhiware). Please have a look at the [LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaustubhhiware%2Ffacebook-archive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaustubhhiware%2Ffacebook-archive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaustubhhiware%2Ffacebook-archive/lists"}