I've recently been working on fixing my lack of data visualization skills, after starting to read the excellent Data-Driven Security book by Bob Rudis and Jay Jacobs. Also recently, Bob has started posting weekly data visualization challenges for people to work on. Essentially, he is throwing up a dataset, giving a sample viz, and saying "go do something neat with the data". In this week's challenge, he asked us to take a look at the data that HUD publishes annually on the number of homeless people in America.
After downloading the dataset and taking a brief look at the data, I saw that starting in 2011 HUD began capturing the number of sheltered and undeltered homeless veterans. As a vet myself, I thought that this was a good place to start looking. I decided to normalize the data for population (per 100k), and compare the rates of total, sheltered, and unsheltered veteran homelessness across the states. I've seen Mike Bostock's excellent county-level choropleths, and a cool looking choropleth using svg filters to give a layered effect, and wanted to use a similar style at the state level. But first things first, I needed to get the data into a useable format.
From there, I jumped into D3, and started mashing away until I was able to get the chart to look how I wanted it. This part honestly took me the longest, because I'm still learning to use D3 in an efficient way. I still need to add a scale to the chart, because without scales, charts are sort of meaningless. When I get that added, I'll update the GH repo and this post. With that, have a look at the chart below, and let me know what you think.
Note: Please excuse the wonky styles on the select boxes below. I'm working on migrating the styles on this blog, and have run into a few issues like this. Hopefully they'll be resolved soon.
2016-04-11 2pm Edit: I've added a quick and dirty legend using the great d3-legends module by Susie Lu. It still needs work, since the legend covers the viz on small screens. I'm sure there's room for improvement on my data viz game. Let me know in the comments below!