ReproduceIt is a series of articles that reproduce the results from data analysis articles focusing on having open data and open code. All the code and data is available on github: reproduceit-538-baltimore-black-income. This post contains a more verbose version of the content that will probably get outdated while the github version could be updated including fixes.
For this second article I (again) took an article from one of my favorite websites FiveThirtyEight. On this case I took an article by Ben Casselman "How Baltimore’s Young Black Men Are Boxed In" which I found interesting given the recent events in the US, specially on this case Baltimore, Maryland.
The article analyses the income gap between white and black people in different cities all around the US. The data source is the "American Community Survey" and is available in the "American Fact Finder"
With this app is not possible to crawl it like on the previous ReproduciIt article since it requires user input to select the desired data but the data used for this analysis is available with the code in the github repo.
As usual we print some versions of the software and libraries used for future reproducibility.
In :import sys sys.version_info
Out:sys.version_info(major=3, minor=4, micro=3, releaselevel='final', serial=0)
In :import numpy as np np.__version__
In :import pandas as pd pd.__version__
In :%matplotlib inline
In :import matplotlib import matplotlib.pyplot as plt plt.style.use('ggplot') matplotlib.__version__
In :import bokeh.plotting as plt from bokeh.models import HoverTool plt.output_notebook() import bokeh bokeh.__version__