Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.51 KB

File metadata and controls

27 lines (15 loc) · 1.51 KB

Figures for Wikpedia page on "Household income in the United States"

Repository for creating figures on "Household income in the United States" Wikipedia entry. In particular, this repository creates a histogram of median household income in the U.S. and a choropleth of median household income by county.

Reproducing the results

The histogram was produced in R and only requires the library 'gdata' to download the data from the Census website.

The choropleth was produced in Python. The script requires 'xlrd' to open the Excel file from the Census website and 'BeautifulSoup' to parse the .svg file.

Each script will download the data (saving it in the 'data' folder) and save the resulting figures in 'results'.

Finally, the figures were touched up and some text added in Illustrator.

Data

The data comes from U.S. Census estimates for 2012.

The .svg used comes from Wikimedia Commons.

Credits

Thanks to FlowingData for the tutorials and inspiration.