Research
- Crime Categories
- Murder Circumstances
- Charges
- Murder Numbers by SHR
- Definitions of Murder
- Crime Literature
- Other Literature
- Seminars
- Journal Ranking
- Laws
- Changes in Law and Reporting in Michigan
- Citation Guides
- Datasets
Writing
Methods
- BLP
- Econometrics Models
- Econometrics Tests
- Econometrics Resources
- Event Study Plots
- Metrics Literature
- Machine Learning
Python-related
- Python Basic Commands
- Pandas Imports and Exports
- Pandas Basic Commands
- Plotting in Python
- Python web scraping sample page
- Two Sample t Test in Python
- Modeling in Python
R-related
- R Basics
- R Statistics Basics
- RStudio Basics
- R Graphics
- R Programming
- Accessing MySQL Databases from R
Latex-related
Stata-related
SQL
Github
Linux-related
Conda-related
AWS-related
Webscraping
Interview Prep
Other
Bar Chart Races in Matplotlib
https://towardsdatascience.com/bar-chart-race-in-python-with-matplotlib-8e687a5c8a41
Several tricks here:
- We don’t need to change the dataframe names in the code. We could just create dataframes with the names df and dff.
- We don’t need to change the column names of the original dataframes, we could change the column names of df and dff to match with what is in the post.
- The best way to work with
animator.save()
is to save it as .mp4 and then useffmpeg -i C:\my_path\animation.mp4 C:\my_path\animation.gif
in cmd to convert the mp4 file into gif. Or we could just embed the mp4 file.