python-math icon indicating copy to clipboard operation
python-math copied to clipboard

A collection of quickie math functions. Nothing too fancy.

h1. python-math

A collection of snippets I use to do a little math. Nothing fancy.

h3. The mission

Make a single basket for all the math functions I use to do journalism and, as it expands, try to translate everything out of numpy so I don't have to deploy its entire module to my production server.

h3. Contains functions that calculate:

  • Decile rankings
  • ELFI (Ethnolinguistic Fractionalization Index)
  • Mean
  • Mean center
  • Median
  • Ordinal rank
  • Per capita rate
  • Per square mile rate
  • Percentage change
  • Percentage
  • Percentile
  • Standard competition rank
  • Standard deviation
  • Standard deviation distance
  • Standard deviation ellipses

h3. Other utilities to:

  • Get a random point
  • Nudge identical points slightly apart

h3. Dependencies

  • "django":http://www.djangoproject.com/
  • "geodjango":http://www.geodjango.org/
  • "math":http://docs.python.org/library/math.html
  • "psql ellipse() function":http://postgis.refractions.net/support/wiki/index.php?plpgsqlfunctions
  • "random":http://docs.python.org/library/random.html