Created
April 7, 2015 05:45
-
-
Save sjbliss/eb43f708c8686e1ccd75 to your computer and use it in GitHub Desktop.
Module 3: Visualizing Homeownership Rates by Metro Area, 2014
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MSA | ownership2010 | ownership2011 | ownership2012 | ownership2013 | ownership2014 | |
---|---|---|---|---|---|---|
Richmond VA | 68.5 | 66.7 | 66.6 | 70 | 75.5 | |
Pittsburgh PA | 71.6 | 70.5 | 68.8 | 68.3 | 72.4 | |
Albany-Schenectady-Troy NY | 73.2 | 73.7 | 67.5 | 67.4 | 71.7 | |
Kansas City MO-KS | 71 | 69.9 | 65.5 | 65.8 | 71.3 | |
Poughkeepsie-Newburgh-Middletown NJ | 69.4 | 71.6 | 66 | 57.7 | 71.2 | |
Akron OH | 74.1 | 73.4 | 69.2 | 61.4 | 71 | |
Detroit-Warren-Livonia MI | 73.6 | 76.7 | 73.5 | 71.5 | 70.9 | |
Cleveland-Elyria-Mentor OH | 68.8 | 67.6 | 65.6 | 69 | 70.2 | |
Indianapolis IN | 68.8 | 67.7 | 67.8 | 67.9 | 70 | |
St. Louis MO-IL | 71.7 | 73.7 | 73.8 | 72.5 | 70 | |
Springfield MA | 66.2 | 72.7 | 69.3 | 61.9 | 69.6 | |
Minneapolis-St. Paul-Bloomington MN-WI | 70.2 | 70.4 | 72.3 | 72.6 | 69.5 | |
Hartford-West Hartford-East Hartford CT | 72.3 | 69 | 72.7 | 70.6 | 68.6 | |
Alburquerque NM | 65.5 | 64.2 | 63.4 | 64.7 | 68.3 | |
Salt Lake City UT | 64.8 | 66.5 | 68.6 | 67.1 | 68.3 | |
Greensboro-High Point NC | 65.4 | 64.6 | 62.5 | 67.2 | 67.9 | |
Louisville KY-IN | 63.4 | 63.5 | 62.6 | 64.6 | 67.4 | |
Allentown-Bethlehem-Easton PA-NJ | 72.9 | 77.4 | 73.7 | 74.9 | 67 | |
San Antonio TX | 68.2 | 65.9 | 63.1 | 69.4 | 66.9 | |
Dayton OH | 70.4 | 67.8 | 68.4 | 66.1 | 66.7 | |
Omaha-Council Bluffs NE-IA | 73.3 | 71 | 74.2 | 72.4 | 66.3 | |
El Paso TX | 74.5 | 76.1 | 66 | 65.6 | 66.2 | |
Nashville-Davidson-Murfreesboro TN | 71.7 | 68.4 | 61.1 | 65.7 | 66.1 | |
Philadelphia-Camden-Wilmington PA | 70.1 | 71 | 70.9 | 70 | 66 | |
Tulsa OK | 66.8 | 65.1 | 63.4 | 69.2 | 65.7 | |
Tampa-St. Petersburg-Clearwater FL | 67.9 | 68.1 | 65.9 | 65.1 | 65.5 | |
Baton Rouge LA | 72.5 | 71.9 | 73.1 | 68.4 | 65 | |
Oklahoma City OK | 72.2 | 69.3 | 68.6 | 68.8 | 64.8 | |
Baltimore-Towson MD | 66.2 | 67.5 | 65.1 | 68.3 | 64.5 | |
Cincinnati-Middletown OH-KY-IN | 62.4 | 64.2 | 63.3 | 64.8 | 64.5 | |
Chicago-Naperville-Joliet IL | 67.2 | 66.3 | 67.5 | 69.5 | 64.1 | |
Columbia SC | 69.3 | 64.3 | 64.8 | 63.9 | 64 | |
Birmingham-Hoover AL | 78.3 | 75.8 | 76.1 | 74.7 | 63.9 | |
Jacksonville FL | 67.8 | 69.8 | 68.1 | 70.2 | 63.6 | |
Syracuse NY | 57.3 | 62 | 58.2 | 62.2 | 63.5 | |
Washington-Arlington-Alexandria DC-VA-MD-WV | 67.5 | 68.2 | 68.1 | 66.8 | 63.5 | |
Boston-Cambridge-Quincy MA-NH | 67 | 66.1 | 64.7 | 63.7 | 63 | |
Atlanta-Sandy Springs-Marietta GA | 67.3 | 64.8 | 63.4 | 60.1 | 62.9 | |
Bridgeport-Stamford-Norwalk CT | 68.8 | 70 | 68.8 | 70.9 | 62.4 | |
Oxnard-Thousand Oaks-Ventura CA | 66.6 | 61.3 | 63.5 | 65.5 | 62.4 | |
Austin-Round Rock TX | 64.1 | 57.5 | 60.1 | 59.9 | 62.3 | |
Houston-Baytown-Sugar Land TX | 61 | 62.8 | 60.4 | 59.5 | 62.3 | |
Portland-Vancouver-Beaverton OR-WA | 62.7 | 61.8 | 60 | 59.4 | 62.3 | |
New Haven-Milford CT | 64.1 | 65.7 | 60.3 | 63.3 | 62.1 | |
Orlando FL | 71 | 66.9 | 71.4 | 68.2 | 61.9 | |
Phoenix-Mesa-Scottsdale AZ | 65.1 | 64.5 | 63.2 | 63.3 | 61.9 | |
Worcester MA | 63.5 | 70.3 | 61.8 | 58.6 | 61.9 | |
Honolulu HI | 54.5 | 54.7 | 59 | 59.4 | 61.7 | |
Rochester NY | 72.6 | 64.7 | 69.6 | 69.3 | 61.7 | |
Columbus OH | 61.5 | 57.2 | 59.5 | 60.8 | 61.5 | |
Denver-Aurora CO | 65.2 | 62.9 | 61.7 | 61.2 | 61.3 | |
Providence-New Bedford-Fall River RI-MA | 58.6 | 59.4 | 62 | 62 | 60.9 | |
Buffalo-Cheektowaga-Tonawanda NY | 64.6 | 66.8 | 66.4 | 67.1 | 60.7 | |
Virginia Beach-Norfolk-Newport News VA | 61.6 | 61.5 | 62.1 | 62.8 | 60.5 | |
New Orleans-Metairie-Kenner LA | 64.4 | 63.2 | 62.2 | 61 | 60.1 | |
Grand Rapids-Wyoming MI | 75.4 | 75.1 | 77 | 70.6 | 60 | |
Miami-Fort Lauderdale-Miami Beach FL | 63.3 | 62.9 | 58.7 | 59.3 | 59.4 | |
Memphis TN-AR-MS | 59.9 | 60.2 | 61.2 | 54.3 | 59.2 | |
Charlotte-Gastonia-Concord NC-SC | 64.3 | 65.2 | 55.7 | 57.8 | 58.7 | |
Sacramento-Arden-Arcade-Roseville CA | 61.9 | 58.9 | 58 | 58.8 | 58.2 | |
Toledo OH | 59.1 | 67.6 | 62.7 | 56.8 | 58.1 | |
Seattle-Tacoma-Bellevue WA | 60.6 | 61.1 | 63.2 | 60 | 58 | |
Raleigh-Cary NC | 70.8 | 68.5 | 66.2 | 61.5 | 57.8 | |
Tucson AZ | 67.2 | 64.7 | 63.9 | 63.2 | 57.6 | |
Milwaukee-Waukesha-West Allis WI | 62.7 | 61.4 | 62.6 | 59.9 | 57.5 | |
San Jose-Sunnyvale-Santa Clara CA | 58.7 | 62.2 | 58.1 | 60.4 | 57.1 | |
San Diego-Carlsbad-San Marco CA | 51.2 | 54.9 | 56 | 55.6 | 56.6 | |
Dallas-Ft. Worth-Arlington TX | 62.6 | 63.5 | 61.3 | 61.1 | 56.3 | |
San Francisco-Oakland-Fremont CA | 57.1 | 55.3 | 53.2 | 54.6 | 55.8 | |
Bakersfield CA | 60.7 | 64.8 | 57.4 | 61.1 | 54.6 | |
Riverside-San Bernardino-Ontario CA | 61.3 | 56.8 | 55.5 | 54.1 | 53.4 | |
Las Vegas-Paradise NV | 53.6 | 52.2 | 52.8 | 49.7 | 53 | |
Fresno CA | 49.9 | 53.6 | 59 | 56.2 | 51.9 | |
New York-Northern New Jersey--Long Island NY | 52.3 | 50.6 | 51.3 | 50 | 50.2 | |
Los Angeles-Long Beach-Santa Ana CA | 49.3 | 48.8 | 49.1 | 49.7 | 47.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Home Ownership Rates by Metro Area, 2014</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script> | |
<style type="text/css"> | |
body { | |
background-color: #ddddff; | |
} | |
svg { | |
background-color: white; | |
} | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var svg = d3.select("body") | |
.append("svg") | |
.attr("width", 300) | |
.attr("height", 1200); | |
d3.csv("home_ownership_MSA.csv", function(data) { | |
data.sort(function(a, b) { | |
return d3.descending(a.ownership2014, b.ownership2014); | |
//If your numeric values aren't sorting properly, | |
//try commenting out the line above, and instead using: | |
// | |
//return d3.descending(+a.lifeSatisfaction, +b.lifeSatisfaction); | |
// | |
//Data coming in from the CSV is saved as strings (text), | |
//so the + signs here force JavaScript to treat those | |
//strings instead as numeric values, thereby fixing the | |
//sort order (hopefully!). | |
}); | |
var rects = svg.selectAll("rect") | |
.data(data) | |
.enter() | |
.append("rect"); | |
rects.attr("x", 0) | |
.attr("y", function(d, i) { | |
return i * 15; | |
}) | |
.attr("width", function(d) { | |
return d.ownership2014 * 3; | |
}) | |
.attr("height", 10) | |
.append("title") | |
.text(function(d) { | |
return "The 2014 homeownership rate in " + d.MSA + " was " + d.ownership2014 + " percent."; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment