thuvh / gitvisualizations

A suite of visualization tools for analyzing files in git

Home Page:http://briandk.com/codetimeline_demos/simulator/simulator.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome! This repository contains tools for visualizing changes to code over time.

Requirements for using these tools

In order to run our tools properly, you're going to need a few things. But don't worry! Below, we explain how to get all of them:

Python Requirements

  • A working version of Python. The tools were developed on Python 2.7.3, and in principle should work with Pyhon 3.x installations, but I can't make any guarantees.
  • The GitPython and pystache libraries for Python (installation instructions below)
  • A code file of interest that's currently under version control in a Git repository
  • A stable, recent release of a major browser (we try to test on Chrome, Safari, and Firefox, in that order)

R Requirements

You'll need the latest version of R (>= 2.15.2).

You'll also need to install the following dependent libraries from CRAN:

  • ggplot2
  • plyr
  • lubridate

How to get set up

On Mac/Linux/Unix-based systems

  1. Make sure you've got Git,

  2. Then, open a terminal, clone our stuff, and navigate to it:

    $ cd path/to/where/you/want/our/stuff
    $ git clone https://github.com/briandk/gitvisualizations.git
    $ cd gitvisualizations
  3. Make sure you have Python Installed

    $ which python # should return python's location, if it's installed
  4. Install pip if you haven't got it already

    $ which pip # should return pip's location, if it's installed
  5. From your clone of our project directory, use pip to install the required python dependencies for this project

    $ pip install -r requirements.txt

RepoStatistics.py Usage

Assuming your terminal prompt is still in the gitvisualizations project directory, you can start using RepoStatistics.py like so:

$ python RepoStatistics/RepoStatistics.py path_to_another_git_repository

Limiting Date Ranges

You can also specify delimiting dates and times, using the --since and --until flags. They offer enormous flexibility

$ python python RepoStatistics/RepoStatistics.py your_repo --since='2011-01-27'
$ python RepoStatistics/RepoStatistics.py your_repo --until='yesterday'

You can even combine both flags (naturally):

$ python RepoStatistics/RepoStatistics.py your_repo --since='2011-01-27' --until='yesterday'

Sample Output Graphics

Commit Activity Summary Plot

In this plot, the blue ribbon bins the total number of commits per day. The red curve shows the cumulative sum of commits over time.

CommitActivityOverTime-1

Small multiple summary of per-file additions and deletions

This plot shows a small multiple for each unique file in the project. The green ribbon represents total number of lines added per day. The orange ribbon is total number of deletions per day.

Small Multiple Summary

Let us know what you think

Please give us feedback! We'd love to hear your gripes, thrill stories, and feature requests. Just open an issue to get in touch. Thanks!

About

A suite of visualization tools for analyzing files in git

http://briandk.com/codetimeline_demos/simulator/simulator.html


Languages

Language:Python 54.8%Language:R 25.5%Language:JavaScript 19.7%