All Projects → baieric → chatstats

baieric / chatstats

Licence: other
💬📊 Fun data visualizations for Facebook Messenger chats

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to chatstats

datascienv
datascienv is package that helps you to setup your environment in single line of code with all dependency and it is also include pyforest that provide single line of import all required ml libraries
Stars: ✭ 53 (+194.44%)
Mutual labels:  pandas, matplotlib
Engezny
Engezny is a python package that quickly generates all possible charts from your dataframe and saves them for you, and engezny is only supporting now uni-parameter visualization using the pie, bar and barh visualizations.
Stars: ✭ 25 (+38.89%)
Mutual labels:  pandas, matplotlib
Kagglestruggle
Kaggle Struggle
Stars: ✭ 228 (+1166.67%)
Mutual labels:  pandas, matplotlib
Windrose
A Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution
Stars: ✭ 208 (+1055.56%)
Mutual labels:  pandas, matplotlib
covid-19
Data ETL & Analysis on the global and Mexican datasets of the COVID-19 pandemic.
Stars: ✭ 14 (-22.22%)
Mutual labels:  pandas, matplotlib
Python Wechat Itchat
微信机器人,基于Python itchat接口功能实例展示:01-itchat获取微信好友或者微信群分享文章、02-itchat获取微信公众号文章、03-itchat监听微信公众号发送的文章、04 itchat监听微信群或好友撤回的消息、05 itchat获得微信好友信息以及表图对比、06 python打印出微信被删除好友、07 itchat自动回复好友、08 itchat微信好友个性签名词云图、09 itchat微信好友性别比例、10 微信群或微信好友撤回消息拦截、11 itchat微信群或好友之间转发消息
Stars: ✭ 216 (+1100%)
Mutual labels:  pandas, matplotlib
Udacity-Data-Analyst-Nanodegree
Repository for the projects needed to complete the Data Analyst Nanodegree.
Stars: ✭ 31 (+72.22%)
Mutual labels:  pandas, matplotlib
Opendatawrangling
공공데이터 분석
Stars: ✭ 148 (+722.22%)
Mutual labels:  pandas, matplotlib
fer
Facial Expression Recognition
Stars: ✭ 32 (+77.78%)
Mutual labels:  pandas, matplotlib
Algorithmic-Trading
Algorithmic trading using machine learning.
Stars: ✭ 102 (+466.67%)
Mutual labels:  pandas, matplotlib
Dexplot
Simple plotting library that wraps Matplotlib and integrated with DataFrames
Stars: ✭ 208 (+1055.56%)
Mutual labels:  pandas, matplotlib
hh research
Автоматизация поиска и исследования вакансий с сайта hh.ru (Headhunter) с помощью методов Python. Классификация данных, поиск статистических параметров.
Stars: ✭ 36 (+100%)
Mutual labels:  pandas, matplotlib
Data Science Types
Mypy stubs, i.e., type information, for numpy, pandas and matplotlib
Stars: ✭ 180 (+900%)
Mutual labels:  pandas, matplotlib
Edaviz
edaviz - Python library for Exploratory Data Analysis and Visualization in Jupyter Notebook or Jupyter Lab
Stars: ✭ 220 (+1122.22%)
Mutual labels:  pandas, matplotlib
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+12105.56%)
Mutual labels:  pandas, matplotlib
Jupyter Tips And Tricks
Using Project Jupyter for data science.
Stars: ✭ 245 (+1261.11%)
Mutual labels:  pandas, matplotlib
Ml Cheatsheet
A constantly updated python machine learning cheatsheet
Stars: ✭ 136 (+655.56%)
Mutual labels:  pandas, matplotlib
Data Analysis
主要是爬虫与数据分析项目总结,外加建模与机器学习,模型的评估。
Stars: ✭ 142 (+688.89%)
Mutual labels:  pandas, matplotlib
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+16377.78%)
Mutual labels:  pandas, matplotlib
anesthetic
Nested Sampling post-processing and plotting
Stars: ✭ 34 (+88.89%)
Mutual labels:  pandas, matplotlib

ChatStats

ChatStats is a data visualizer for a Facebook Messenger conversation. Try it out with your group chats or your significant other. You don't need to be an experienced programmer to use it!

Graph of our most distinguishing words

ChatStats also works with group chats!

Graph of most frequent emoji

More examples can be found in my blog post.

Graphs

  • Average number of words per message
  • Days with the most messages
  • Each sender's most distinguishing words
  • Each term's most distinguishing words
  • Messages by hour of day
  • Messages by term
  • Messages by weekday
  • Most frequent stickers
  • Names said in chat
  • Number of messages sent

And more!

How To

Note: Not tested on Windows.

Pre-requisites

You will need the following installed:

  • Git
  • Python3
  • Pip3 (should be included when installing Python3)

Step One: Getting Your Facebook Data

To get your entire chat history:

  1. Go to https://www.facebook.com/dyi. Select "Download Your Information".
  2. On this page, change the Format option to JSON. You can deselect all information except for Messages to lower the size of your download. The other options can be left default or customized to your liking. Click Create File to continue.
  3. Facebook takes a few minutes to generate a download link for you. Once you receive a notification from Facebook with a download link, save the file to your computer and unzip it. You can do Step Two while waiting for the file to download.
  4. You may be given more than one zip file. You must combine these zips when extracting in to one folder structure. (If you are interesting in contributing to ChatStats, automating this step would be awesome!)

Note that your Facebook data contains very sensitive information, so be careful storing it.

Step Two: Set Up ChatStats

  1. Clone or fork this repository:
git clone https://github.com/baieric/chatstats.git
  1. Install the dependencies:
python3 -m pip install -r requirements.txt

(If this fails, try running with sudo at the front.)

Step Three: Generate Graphs!

  1. Go to your Facebook messages folder, and find the folder containing the chat you want to use.
  2. Use the path of that folder to run the following command:
python3 chatstats.py <chat_folder>

This creates a folder in chatstats/my_data/ with your ChatStats graphs.

Have fun! If you need help deciding what conversations to try, sort your messages folder by size. Try it out on all of your largest conversations!

Advanced Configuration

There are some advanced options available in the file config.py.

Something Not Working?

Facebook's Download Your Information tool sometimes updates the format of your data, which can break this tool. If you notice something, please file an issue or make a pull request!

Contribute

Feel free to request a feature or make a pull request. There are ideas for bug fixes, improvements, and new graphs in the project roadmap.

Getting Started With the Codebase

To create a new graph, create a new Grapher object in grapher.py. The file has many examples to help you get started.

ChatStats uses graphers in this code snippet from chatstats.py:

# generate graphs that use message data
messages = clean_data(pd.DataFrame(json_data["messages"]))
for grapher in message_graphers:
    grapher.graph(messages, output_folder, parent_folder)

# generate graphs that use word data
words = word_data(messages)
for grapher in word_graphers:
    grapher.graph(words, output_folder, parent_folder)

Here we create two different dataframes, messages and words, which are called by graphers in corresponding message_graphers and word_graphers lists. For ChatStats to use a newly created grapher, it must be added to the appropriate list.

If your graph is complex enough that it needs a new dataframe, create it along with a corresponding list of graphers that use it.

Thanks

Thanks to my girlfriend, Camille, for motivating me to build this tool so we could look through our chat history together.

I'd also like to thank /u/sumisel on Reddit. Their /r/dataisbeautiful post was the inspiration for this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].