Wednesday, 25 January 2012

How To Generate Weighted Centroids in Alteryx

Just before Christmas I received a query from a colleague I used to work with at Experian UK who now works for Experian Norway.  He knew he could find the centroid of a polygon in Alteryx using the spatial info tool, but wanted to be able to calculate the Population Weighted Centroid of a polygon.  Well, off the top of my head I didn't know how to do that, but a quick ask around the office yeilded a fairly simple algorithm for the calculation and now a few weeks later I have packaged that algorithm up into a simple to use macro.  So here it is:

http://downloads.chaosreignswithin.com/macros/6.0/SpatialWeightedAverage.yxzp


The module is actually fairly simple and works by taking a weighted average on the x and y co-ordinates of the spatial points.  To test it out I took the US Census Data 2010 Population estimates at Block Group level for the states of Colorado, Wyoming and Utah and calculated the Population Weighted Centroids  for those states.  The results of which you can see below:

The blue diamonds are the spatial centers of the state and the red stars are the population weighted centroids as generated by my macro.  I was very pleased with the results, in each case you can see how the population centroid is "pulled" towards the state capital.




Saturday, 7 January 2012

Happy New Year

So 2012 is finally here and what a great year for Alteryx it is going to be.  We are now less than two months away from the annual conference: Inspire 2012 and the launch of Alteryx 7.0.

Inspire as always promises to be a great learning event, with the chance to see first hand the new Alteryx 7.0 features and learn how you can leverage them in your business.  If you are looking for some reasons to justify to management why you should go, check out the excellent template letter on the Alteryx website here. Remember that Alteryx 7.0 is going to be a huge release packed full of new tools and features so there will be plenty to learn and take back to your company.

If you are already planning on attending, then application is still open for the annual Alteryx Grand Prix.  For more information take a look at the recent post on the Alteryx Engine Works blog here.


Also if you haven't checked it out recently: Ron House's All About Alteryx Blog has some really interesting posts on using Alteryx 7.0 to leverage some online Location-Based APIs.  So head over there and take a look.

(First day back in the office after Christmas break, found this awesome mug waiting for me.  Great way to drink my morning coffee!)