Ok, we're all tired of the neverending count, so here's something completely different:
10 less well-known code packages; the fun, the useful, and the unexpected.
below.
#EconTwitter #DataScience #RStats #Python #PyData
10 less well-known code packages; the fun, the useful, and the unexpected.

#EconTwitter #DataScience #RStats #Python #PyData
1. Jazzit. “Ever wanted your scripts to play music while running/ on erroring out? Of course you didn’t. But here it is anyway”
Yes, Jazzit laughs at your expense when your code hits an error, here via a clip from curb your enthusiasm. https://github.com/Sangarshanan/jazzit
(see also: beepy)
Yes, Jazzit laughs at your expense when your code hits an error, here via a clip from curb your enthusiasm. https://github.com/Sangarshanan/jazzit
(see also: beepy)
2. Handcalcs
Handcalcs renders maths in latex in your console/notebook and can also export latex equations to file. *Really* useful for writing papers where you want your code and the mathematics in your paper to be consistent.
https://github.com/connorferster/handcalcs
(see also: sympy)
Handcalcs renders maths in latex in your console/notebook and can also export latex equations to file. *Really* useful for writing papers where you want your code and the mathematics in your paper to be consistent.
https://github.com/connorferster/handcalcs
(see also: sympy)
3. Pandas profiling
Exploratory data analysis is important, often a bit overlooked, and also saves time in the long-run. So a library creating beautiful HTML EDA reports (missing variables, cardinality, distributions, & correlations) is super useful.
https://github.com/pandas-profiling/pandas-profiling
Exploratory data analysis is important, often a bit overlooked, and also saves time in the long-run. So a library creating beautiful HTML EDA reports (missing variables, cardinality, distributions, & correlations) is super useful.
https://github.com/pandas-profiling/pandas-profiling
4. Matplotlib!?
Alright, you’ve probably heard of @matplotlib & might be surprised to see it on the list. But there’s a new feature of matplotlib that you might not be aware of: figure placement using ASCII & lists. Can be useful for plots in papers.
https://matplotlib.org/
Alright, you’ve probably heard of @matplotlib & might be surprised to see it on the list. But there’s a new feature of matplotlib that you might not be aware of: figure placement using ASCII & lists. Can be useful for plots in papers.
https://matplotlib.org/
5. Pandera data validation
You don't want nasty surprises with the data you're reading in (think floats as strings), & this package validates data types, & more, as it arrives. Fantastically useful.
https://pandera.readthedocs.io/en/stable/
See also: Great Expectations, https://greatexpectations.io/
You don't want nasty surprises with the data you're reading in (think floats as strings), & this package validates data types, & more, as it arrives. Fantastically useful.
https://pandera.readthedocs.io/en/stable/
See also: Great Expectations, https://greatexpectations.io/
6. Tenacity
If at first you don’t succeed, try and try again. Tenacity has several different ways to keep trying a function, even if execution fails.
https://tenacity.readthedocs.io/en/latest/
See also: purrr’s 'insistently'
If at first you don’t succeed, try and try again. Tenacity has several different ways to keep trying a function, even if execution fails.
https://tenacity.readthedocs.io/en/latest/
See also: purrr’s 'insistently'
7. Streamlit
streamlit sells itself as the fastest way to build data apps (dashboards). You can do an impressive amount with a very simple set of commands. But there’s also depth--it can, for example, serve up 'explainable' AI models.
https://www.streamlit.io/
Also: RShiny, Dash
streamlit sells itself as the fastest way to build data apps (dashboards). You can do an impressive amount with a very simple set of commands. But there’s also depth--it can, for example, serve up 'explainable' AI models.
https://www.streamlit.io/
Also: RShiny, Dash
8. Black
Black is an automatic code formatter (“you can have it any colour you want, as long as it’s black”). If you just want to write code & forget about formatting, it's brilliant-though some won't like its opinionated style.
https://black.readthedocs.io/en/stable/
Also: Google's yapf
Black is an automatic code formatter (“you can have it any colour you want, as long as it’s black”). If you just want to write code & forget about formatting, it's brilliant-though some won't like its opinionated style.
https://black.readthedocs.io/en/stable/
Also: Google's yapf
9. Scalene for profiling
Profiling finds bottlenecks in your code-but with scalene, you can find bottlenecks in your data too. Yes, it does memory profiling! Super useful for economics & data science, where *memory* is often limiting.
https://github.com/emeryberger/scalene
Also: PyInstrument
Profiling finds bottlenecks in your code-but with scalene, you can find bottlenecks in your data too. Yes, it does memory profiling! Super useful for economics & data science, where *memory* is often limiting.
https://github.com/emeryberger/scalene
Also: PyInstrument
10. alive-progress for progress bars
Waiting for code to run doesn't *need* to be tedious. alive-progress gives a wealth of options for glitzing your progress bar. Better still is the realistic ETA (I'm looking at you, Windows File Transfer)
https://github.com/rsalmei/alive-progress
Also: tdqm
Waiting for code to run doesn't *need* to be tedious. alive-progress gives a wealth of options for glitzing your progress bar. Better still is the realistic ETA (I'm looking at you, Windows File Transfer)
https://github.com/rsalmei/alive-progress
Also: tdqm
Bonus: R style analysis in Python!?
R users swear by two of R’s most loved declarative-style packages, dplyr for data analysis & ggplot2 for plotting, & miss them when working in Python. Here are two great stand-ins:
plotnine, a port of ggplot2:
https://plotnine.readthedocs.io/en/stable/index.html
R users swear by two of R’s most loved declarative-style packages, dplyr for data analysis & ggplot2 for plotting, & miss them when working in Python. Here are two great stand-ins:
plotnine, a port of ggplot2:
https://plotnine.readthedocs.io/en/stable/index.html
...and here's Siuba, a Python port of dplyr in R. (Yes, it has slightly awkward syntax for now, but it's new & great for R users wanting to get going quickly in Python.)
https://github.com/machow/siuba
https://github.com/machow/siuba
Well I hope you've enjoyed this non-election related content. You can find all of the packages, the 'see also' packages, and more, in this blog post:
http://aeturrell.com//2020/10/24/10-lesser-known-Python-packages/
http://aeturrell.com//2020/10/24/10-lesser-known-Python-packages/