Giter Club home page Giter Club logo

facebookchatstatistics's Introduction

Facebook Chat Statistics

A small program written in Python 3 that lets you see statistics of any Facebook Messenger conversation. This project started of as a Valentines day surprise for my girlfriend inspired by this Reddit post.

Features

The program fetches data such as:

  • Start time
  • End time
  • Number of days
  • Number of messages
  • Number of words
  • Average length of messages
  • Average messages per day
  • Most used emojis

It also generates a PDF containing the following plots (see pictures below)

  • Who texts the most
  • Timeline
  • Activity by day
  • Activity by weekday
  • Most used emojis and who sent them

Images

Running locally

Firstly you will need to download or clone the repository, the latter can be done by typing

git clone https://github.com/davidkrantz/FacebookChatStatistics.git

in your terminal.

Download your Facebook conversations to a .json file

Download your Facebook data by following these instructions and chosing the format to be JSON. Note that you only have to download your messages in order for this program to work.

Run it

  1. First you will have to install the needed packages. These are listed in the requirements.txt file and should be easily installed using pip with
pip3 install -r /path/to/requirements.txt
  1. Run the script as below with the path to your JSON conversation as an argument, for example
python3 facebook_chat_statistics.py /Path/To/Conversation.json

NOTE: The number of top emojis is default set to 10, but can easily be changed to some other integer by changing the line nbr_of_top_emojis = 10 in facebook_chat_statistics.py.

Enjoy!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.