Git Product home page Git Product logo

chronist's Introduction

Chronist

Long-term analysis of emotion, sentiment, and aging using photos and text.

Chronist is a multifaceted project consisting of:

  • A command-line tool for gathering chronological sentiment analysis of text from iMessages, Facebook Messenger, Day One, and 750 Words
  • A command-line tool for gathering chronological emotion, age, expression, and ethnicity data from photos
  • Python scripts for cleaning and resampling the data generated from these tools for analysis
  • Python scripts for generating visualizations (using matplotlib) of the resulting time-series data
  • An anonymous dataset contributed by a few very generous friends who have agreed to donate their real data

The goal of this project is to quantitatively monitor the emotional and physical changes of an individual over periods of time. My thesis is that if you can accurately show emotional or physical change over time, you can objectively pinpoint how an environmental change such as a career change, moving to a new city, starting or ending a relationship, or starting a new habit like going to the gym affected your physical and emotional health. This can lead to important insights on an individual level and for a population as a whole.

If you are interested in hearing more about this project, contributing your data, or collaborating, contact me at [email protected].

Chronist's command-line tools were written in Javascript/ES6 for Node.js and its data processing scripts were written in Python.

Setup

First, make sure you have Node.js >= 6 and Python 2 or 3 installed.

Then run npm install -g chronist.

Commandline Tool

Run chronist to get started. This will show you the available subcommands.

Gathering Data

Lifeslice

This is an alias of photos which uses the default Lifeslice photo directory (/Users/<USERNAME>/Library/Application Support/LifeSlice/webcam) as its input directory and uses the filenames to detect the dates of the photos. The results will be saved as a CSV on your Desktop by default.

chronist lifeslice

Photos

Run emotion and demographic analysis on a directory of photos. The results will be saved as a CSV on your Desktop by default.

chronist photos ~/Desktop/photos

Facebook

First you'll need to download your Facebook data, then you can run the sentiment analysis on your Facebook messages - make sure to specify your first and last name as they appear on Facebook with -n. The results will be saved as a CSV on your Desktop by default.

chronist facebook -i ~/Desktop/messages.htm -n “Chris Roth”

iMessage

Run a sentiment analysis on the currently logged-in OS X user. The results will be saved as a CSV on your Desktop by default.

chronist imessage

750 Words

First download your 750 Words entries, then run the sentiment analysis on your entries. The results will be saved as a CSV on your Desktop by default.

chronist 750words -i ~/Desktop/750words

Day One

First export your Day One journal entries, then run the sentiment analysis on the JSON export. The results will be saved as a CSV on your Desktop by default.

chronist dayone -i ~/Desktop/journal.json

Working With Data

Run pip install -r requirements.txt to install the Python dependencies. If you do not have pip, you'll need to install it first.

All of the contributed data is stored in /data as CSVs. It is first organized by participant, eg /data/a is participant a's data. Some participants have different datasets available than others, and each file will likely have data from different date ranges. The analysis will be aware of these caveats.

The scripts to run analyses are in /analysis. You can run them with python analysis/comparative.py but using Rodeo is ideal.

chronist's People

Contributors

cjroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chronist's Issues

Problem running 750 words

Problem running on 750 words

~/Documents/Personal/QS/chronist
$ chronist 750words -i ../sentiment/sentiment-bear/inputs/750words
/usr/local/bin/chronist 750words

Options:
  --help        Show help                                              [boolean]
  --input, -i                                                         [required]
  --output, -o       [default: "/Users/stan/Desktop/chronist-750words-stan.csv"]

fs.readDirSync is not a function

Uncaught IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.

➜ chronist git:(master) chronist lifeslice -i /Volumes/Biscuit/Lifeslice\ Photos
Analyzing your photos...
Input Photo Directory: /Volumes/Biscuit/Lifeslice Photos
Output CSV File: /Users/c/Desktop/chronist-photos-c.csv
--------------------------------------------------------------------------------- 0/20218 (0%)Uncaught IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
Could not complete analysis.

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.