Skip to content

Scripts for creating figures on the page "Household_income_in_the_United_States".

Notifications You must be signed in to change notification settings

vikjam/Household_income_in_the_United_States

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Scripts for creating figures on the page "Household_income_in_the_United_States".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published