In closing out our 12 Days of Analytics at FortiusOne we were looking for a timely analysis to perform. Also, we wanted to demonstrate one of the most powerful tools in the platform – creating your own analytic widget that you can share with the community or just a group of users. Today was the first release of 2010 Census results. Population information is released at a state level, which is used to calculate the number of representatives by state for the House of Representatives. This process is called apportionment and the The U.S. Census Bureau has a video that shows through animation this process works.


In keeping with our final days of analytics I’m going to show how you can use GeoIQ to calculate the apportionment yourself. The University of Alabama has a decent breakdown of the equations needed for apportionment on their Math 103 website. We are using the Huntington-Hill Method for this since it is the method currently in use by the Census.

To get started I uploaded a spreadsheet of state names and populations. I then joined it to our state boundary dataset based on state name.

The first thing we need to do is calculate the Standard Divisor and the Standard Quota. I combined these into one custom equation. So I created an expression of “State Population/(Total National Population/Number of House Seats).” I then run an analysis using my custom equation and my newly uploaded state population dataset.

Next we need to calculate the geometric mean of the numbers the Standard Quota is between for each of the states. The geometric mean is the square root of the multiplication of 2 numbers. So if a state’s Standard Quota is 2.4 we need to calculate the geometric mean of 2 & 3. In order to do this I create an analysis widget that calculates the square root of the Standard Quota multiplied by the Standard Quota plus 1. Next I compare the Standard Quota to the Geometric Mean, if the Standard Quota is greater I round up if it is lower I round down this equation looks like this “if([standard_quota > [geometric_mean]) then [standard_quota].to_i else [standard_quota].to_i + 1 end”.

So now we have the predicted apportionment by state. In actuality the Census didn’t just release the population information by state today they also released the actual apportionments. We can also use GeoIQ to compare our results to those of the Census. We are going to do this with another analysis function, subtraction. Here I subtract the GeoIQ Apportionment result from the Official Apportionment.

After finishing the analysis and saving the result I check the statistics. The statistics of subtracting the two attributes should all be 0 if everything matches up. As you can see below that is the case.

One feature of the next analysis tools we have not highlighted so far is the ability to share these custom widgets. There are other ways of performing apportionment that have been used in the past. With many of them you still need to calculate the Standard Quota, by creating an analysis widget someone else can search and use this against their own data. This can be useful to collaborate on additional analysis or to run the same analysis on new data when it becomes available. It also provides lineage to how your data was created and so others can build off of your work or verify how your data was created.

Naturally I also uploaded the actual apportionment information into GeoCommons, and it is now available for download here and you can see the resulting map below.

#maker_map_42500 {width: 100%; height: 400px;}

View full map

maker_map_42500 = new F1.Maker.Map({map_id: “42500″, dom_id: “maker_map_42500″});

So that wraps up the 12 Days of Analytics here at FortiusOne. You saw how you can do very simple analysis such as addition and very complex such as the U.S. House of Representatives Apportionment.

2 Responses to On the 12 Day of Analytics — Apportion the House

  1. hollister uk says:

    hollister uk sale,I also uploaded the actual apportionment information into GeoCommons, and it is now available for download here and you can see the resulting map below.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>