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