python-math
A collection of snippets I use to do a little math. Nothing fancy.
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.
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
Other utilities to:
- Get a random point
- Nudge identical points slightly apart