Visualizing Executive Compensation
Posted by Dave Bouwman | Posted in ASP.NET MVC, ESRI, Flex, IPhone, SQL Server | Posted on 28-02-2010
6
When we heard about the ESRI Mashup Challenge, my team and I knew we were going to enter – the question was just what should we build. About that same time there was another flare up in the righteous indignation about the bonuses paid to AIG executives. We got to talking about how awesome it must be to get a million dollar bonus, and how abstract that really is. Most of us own homes, so we c have some appreciation for numbers in the $250,000 to $500,000 range, but we’re paying those off over 30 years. Making a million dollars in one year, or even better, as a BONUS in one year (regardless of whether or not you drove the global economy off the cliff) is nearly unfathomable. Then it clicked – we’d see if we can find some data that would let us visualize executive compensation packages in a way that we (relatively average folk) can relate to.
Some quick searching took us to a census report stating that the median household income in the US was $50,233 in 2007. So, comparing compensation packages in the 10’s of millions of dollars in a way most people can relate to was going to be a challenge.
The Data
Any compelling mashup needs good data. After some Googling, we found “Pay at the Top†at the New York Times web site. This page listed the 2008 compensation packages for 200 executives at public companies. Now, a web page is not usually that convenient a data source, but this one in particular was built using reasonably clean html. We just grabbed the page source, cut out the section we were interested in, slapped in an XML header, and Jeff Germain went after in using LINQ to Xml, and loaded the data into two tables in SQL Server.
Next up was finding some aggregate income data. Since we wanted to show this on a map, and have the display make sense, we needed to find total income by county. Conveniently the IRS has just such a dataset. Unfortunately the last year they provide data for is 2007. But since we don’t see wild fluctuations in median income levels, this would be close enough (and it was a CSV file, which made loading it painless). Once the data was loaded into SQL Server, we created a spatial view linking these numbers to a county layer in ArcSDE. I prefer using spatial views as opposed to using joins in the map document or actually adding the fields to the feature class because I know I can mess with the data using SQL without any problems.
At this point we could make maps showing all the counties in the country in which the all residents cumulatively made less than any one executive.
Since there are large variations in median income at the county level, we wanted to show, for a given county, how many households does it take to make the same amount as an executive. We were able to pull this data from the aptly name ESRI Median Household Income service on ArcGIS Online.
Flexing the Mashup
We used the Flex API because it’s something we’ve been doing a lot of work with, and the R&D time would pay off on coming projects. The app is a pretty simple flex application, using the ESRI API. We load in a simple shaded relief tile cache as the background, and use a dynamic map service to show the counties.
Map Services
We are hosting the county income map service (http://204.133.225.169/ArcGIS/rest/services/Mashup/CountyIncome/MapServer), and it’s design is worth noting. We have two layers – one that shows the county outlines, and a second that shades the counties green. Of course we don’t want to show all the counties as green – just the counties where the total income is less than what the executive made. We simply setup the layer in the map with a default definition query of 1=0, which is never true, so no green counties will show up. When we have an executive, we use the Flex API to change the definition query for that layer (on a request by request basis) so that only those counties who’s total adjusted gross income (AGI) is less than the CEO’s compensation. This is a really handy technique which we use a lot.
Web App & Data Services
As usual, we built the back-end of the web app using ASP.NET MVC. The web app has two roles – first, it detects if the request is coming from an iPhone or Android device, and routes the request to a different view that’s optimized for those devices. The second thing the web app does is provide a set of data services to the Flex and Javascript apps (the mobile app is just HTML and jQuery). The data services hit the compensation data stored in SQL Server, and return it to the flex app as JSON.
Mobile View
As I noted the app will present a different view to for iPhone or Android browsers – this is much simpler, but still conveys the same information. The map used is actually OpenLayers, so you can pan & zoom. Mike Juniper and Brian Noyle will be talking more about this technology at their Dev Summit session (1:45pm – 2:15pm Wednesday March 24th)
The Video
In order to enter the contest, you have to submit a video on YouTube. Here’s ours:
Link: http://www.youtube.com/watch?v=a3dzn9ZxMw8
So that’s the app as it stands – I also wanted to give a shout out to Michael Hayden and Bob Binckes who did the bulk of the Flex coding for this – Thanks guys!
There is a lot more that could be done, and there are a few design tweaks I’d like to make, but given the time we had, it came together really well. Check it out and let us know what you think!

