Monday, March 30, 2015

The Shelter Problem (Total Homeless Population vs. Shelter Provided)

Yesterday, Gartner hosted a BI bake-off at the Business Intelligence & Analytics Summit. As a part of the bake-off, a data set was made available to representatives from Qlik, SAS, Tableau and TIBCO to be used to demonstrate the power of their respective tools.

The same data set was made available for exhibitors to use for displaying BI solutions at their booths. The data set was provided by The US Department of Housing and Urban Development (HUD). It included data from 2007 - 2013 on the homeless population and can be found here.

For the Slalom exhibit, a team of Peter Gilks, Chris Toomey and yours truly decided to focus on the gap between the total homeless population in each Continuum of Care (CoC) and the number of individuals that are provided shelter.

Alteryx was used to consolidate the tabs for each year, add geospatial data for each CoC, and export the data to a Tableau extract.

Mapbox was used to add a map layer to display each CoC and provide a more stylized map.

The results were visualized using Tableau.

Items that jumped out were a higher percentage of sheltered individuals in the colder northern climates vs. warmer climates. This is most exemplified by NYC, which has the largest homeless population but provides shelter for 95% of homeless individuals. On the other hand, a warmer climate like LA only provides shelter for 24%. Check out the viz below (or if you're at the conference stop by the Slalom booth) to find your own insights. Feel free to share your thoughts in the comments area below.

For more information on how you can help, check out HUD's volunteering page.

Friday, October 31, 2014

Conditional Formatting w/ MIN(1)

Dan Montgomery is officially my favorite vizzer right now, with his brilliant post yesterday on using MIN(1) as a place holder for multiple measures. Check out his blog post and then come back here to learn how you can use this trick for conditional formatting.

In my example I used my college football weekly (most weeks, not this one, sorry sports fans!) data set to show the average rank, points for and points against for each of the football conferences with a team that's been in the top 25 over the course of the season. Keep going after the viz to see how I did it.

The first step was to add 3 MIN(1) place holders in the columns shelf and conference in the rows shelf:

I used a simple text label for the average ranking, and then switched the marks to gantt bars for my next two columns. The trick here is to put MIN(1) on the size shelf for your gantt bars giving you an axis of 0-3 with a gantt bar from 1-2. To make this fit your window, just change the size of your axis to be fixed from 1-2. You'll also click over to the "Tick Marks" tab and check None for both options.

Now that you have your bars, add your measure of choice to both color and label. Here is what your marks pane should look like when you're done:

Make sure you center those labels and format accordingly! You can see in the example, that my two measures are actually using two different color scales (since more points scored is good and more points against is bad) to give the effect of conditional formatting for two different measures. There you go folks. Thanks to Dan Montgomery, I am going to have lots of happy customers!

Tuesday, October 21, 2014

Week 8 - College Football Weekly Wrap-up

Finally a week that made sense! Not a lot of movement this week as only one team moved up more than 3 rankings. This week I've added the ability to see your team's or conference's movements throughout the whole season. You can also select a range of weeks to view. Check out the viz to see the scores from this week and the resulting movement.

What do you think next week's new feature should be?

Monday, October 13, 2014

College Football Weekly Wrap-up and Evolving Viz

We had another crazy one this week, with some more movement and big time playoff implications. Check out the viz below for this week's story points and slopegraph on the week's biggest games.

I've also decided that in addition to doing a weekly update I will add one feature to the weekly viz. First up, I've added all the games for the year and a parameter which allows you to pick which week you want to view on the final story point. Now you can track your favorite team through the whole season. Let me know in the comments if you have any suggestions for next week's new feature!

Monday, October 6, 2014

College Football Weekly Wrap-up

This week in college football left me no choice but to slopegraph it. Check out this handy tutorial by Ben Jones (@dataremixed) for a tutorial on throwing together your own slopegraph. Don't get any ideas, about a weekly college football wrap-up, because that's my plan! Check out the viz below for what is a completely unbiased and not at all highlighting Auburn's accomplishments and Bama's loss viz of all the movement after this week's wild college football games. Hope all you sports/viz fans enjoy my first venture in to story points.

Monday, September 22, 2014

Think Outside the Box!

I am long overdue for both a viz and a post to Viz For a Cause, so I decided to kill two birds with one stone. In August, my wife and I spent two weeks in Haiti working at an orphanage, so adoption has been at the top of my mind lately. The final viz is just below. Keep scrolling if you want details on how I built the radial menu.

TC14 actually had a pretty huge impact on this viz, specifically the “Designing Vizzes That Stop Traffic” session by (in order of appearance) Dan Montgomery’s legs (@DanRMonty), Paul Banoub (@paulbanoub), and Anya A’Hearn (@datablick). If you aren’t following these guys yet, you should really evaluate some of your life decisions. Definitely catch a replay of the session if you can get access to it. A few of the themes throughout the session were keep it simple, viz what’s important to you, cup stacking, explore other layouts besides a grid and steal like an artist (the idea for the household grid came from Dan's "Show Me the Money" viz). 

I was really intrigued by the idea of a viz that wasn’t built on a grid. Maybe it was a random idea, or maybe it was Paul's donut viz, but I really wanted to find a way to do a radial menu in Tableau. I wanted to stay away from pie charts, so a scatter-plot and a quick geometry refresher from our good friend google were my only options. For those of you that want to repeat this, here’s what you need to know.

Note: Before you begin, you'll need to decide how many points you want on your radial menu, or at least provide a parameter to let users pick.

To determine the (X,Y) coordinates of a certain number of points on a circle with a radius of one, centered on 0,0, the first step is to figure out the number of radians between each point. For those of you unfamiliar with radians (example: me), it is essentially a fancy way to measure an angle. A circle is composed of 360 degrees or 2π radians. Knowing this, you can graph a circle using the following formula, nπ/(z/2) where n is the current point being graphed (ex. The first point will be 1, the second point will be 2 and so on) and z is the total number of points, in our example it will be 40. To put this in to practice, on a 40 point circle the first point would be  determined by an angle of π/20 radians. The 37th point would be determined by an angle of 37π/20 radians.

Now that you know how to determine the angle for each point you can determine the (X,Y) coordinates using the following formulas:
X – SIN(radians)
Y – COS(radians)

Here’s how these formulas looked in Tableau (in italics below). Though you won’t see it in the final viz, I originally used a parameter to allow the user to select anywhere between 20-40 countries. This allows the circle to dynamically re-plot points if you want to vary the number of items on the menu. I really liked this feature, but in the end decided it wasn't really adding anything to the viz (as Dan would say "Keep it Simple Stupid!")

Points (z/2 from our formulas above) - [Countries to Display Parameter]/2

Note in the below that RANK_UNIQUE was used because some countries had the same number of adoptions, and you’ll need to have all numbers between 1 and 40, no room for a tie! This field just identifies which point in the circle is being graphed.

Rank (n from our formulas above) - RANK_UNIQUE(SUM([Adoptions]))

The X and Y formulas will look something like this:

X - COS([Rank]*PI()/[Points])
Y - SIN([Rank]*PI()/[Points])

These are table calcs, and after adding them to your viz, you should be computing along your dimension of choice, in my example they use country.

That's it! Place X in the columns shelf and Y in the rows shelf and your dimension (whatever is determining your points) on shape and color and remove all headers and gridlines. If you've done everything right, you should have something that looks like the screenshot below:

Another point of interest here that didn’t play a factor in the final viz but is a cool trick was my "Size" measure. This comes in handy if you are going to be changing the number of points in your circle. The formulas is, 10/[# of  Countries Parameter]. You can see in the screenshot (bottom left, Size menu) that as the user switched from 10 to 20 to 30 to 40 the value of this size measure would change from 1 to .5 to .75 to .25, allowing for larger shapes with fewer points and smaller shapes with more points.

Finally, there is the household grid. This was a HUGE thorn in my side. This was another semi-complicated math solution so I am going to cover that one in a second blog post. However, I do want to give a shout out to Dan Montgomery who came up with a really killer way to make an X by X square that would plot points dynamically based on a variable number of shapes. It was also set up in such a way that the shapes would resize to fill the entire viewing area. This solution didn’t make the final viz, but inspired the 10x10 house grid you see in the final viz. Dan is going to be doing a full write-up on the solution that he came up with so head over to his blog and check out his past posts while you wait for that!

A few other people to thank for this viz, most of all my talented and beautiful wife who provided the title logo, country shapes and the "LEARN MORE" icon. It was a much different looking dashboard before her files were added! Also special thanks to everybody at Slalom that provided input and feedback!

Family and Child icons designed by Jens Tärning from the Noun Project

Friday, March 21, 2014

NFL Fantasy Football Card Collection

I put this viz together for the Iron Viz sports competition. I wanted to capture the theme of a football card collection, focusing on the only part that us data gurus care about, the back! I'll be providing more detail in a later post on how I built this viz. I hope you enjoy it!