Skip to content
Some simple math we use to do journalism.
Branch: master
Clone or download
Latest commit 874c51f Sep 14, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
calculate Fixed docstring typo Sep 13, 2016
docs Remake Apr 26, 2014
.gitignore First try at analyzing test coverage via Jan 4, 2014
.travis.yml Corrected docs test Jul 4, 2015 Updated README docs link Mar 16, 2014
requirements.txt Correct requirement Jul 4, 2015 New style and tests for #47 Jul 4, 2015
tox.ini Updated tox to use coverage Jan 25, 2014

 dP""b8    db    88      dP""b8 88   88 88        db    888888 888888 
dP   `"   dPYb   88     dP   `" 88   88 88       dPYb     88   88__   
Yb       dP__Yb  88  .o Yb      Y8   8P 88  .o  dP__Yb    88   88""   
 YboodP dP""""Yb 88ood8  YboodP `YbodP' 88ood8 dP""""Yb   88   888888

Some simple math we use to do journalism.

Build Status PyPI version Coverage Status


  • Descriptive statistics like mean, median, percentile, mode, range, standard deviation
  • Comparison statistics like percentage change, per-capita, per square mile, percentiles, deciles and rankings
  • Geospatial stats like mean center and standard deviation distance
  • A small dab of more complicated hoohah like Pearson’s R
  • A grabbag of utilities for a diversity index, Benford’s Law, ages, margin of victory, date rates, making break points, generating random points and other things


For most functions, nothing. GeoDjango and its dependencies are required for a small number of the geospatial functions, though the rest of the module will work if it is not installed.

Getting started

Install from PyPI

$ pip install latimes-calculate

Experiment in Python shell

>>> import calculate
>>> calculate.percentage_change(100, 150)
You can’t perform that action at this time.