Friday 22 November 2013

Tableau Mapping Using Alteryx

Back in July Alteryx released Alteryx for Visual Analytics; a version of Alteryx Desktop specifically tailored
to deliver data natively to Tableau Software.  Since then I have begun to explore what Tableau is all about and in my opinion the two products are a beautiful pairing:  Alteryx allows you to do all of the preparation, heavy lifting, cleaning, blending and reformatting of your source data; and Tableau provides you with beautiful interactive visualizations and dashboards of that data.

One particular area that I looked into early on was the interactive mapping capabilities of Tableau.  You can create some great looking interactive maps in Tableau using a number of built in geocoding levels:


But what if your data isn't at one of those levels?  Well here I have to say a big thanks to +Craig Bloodworth a Tableau Zen Master from The Information Lab; a Tableau and Alteryx partner based here in the UK.  Craig has set up the website http://tableaumapping.bi/ where Tableau users can download spatial datasets for use in Tableau and he was kind enough to educate me in what format these files needed to be in.

Which for those of you interested is this:


Where each row is an ordered point in the outline of the polygon it is going to draw.  Effectively a dot-to-dot for Tableau to follow and render the polygons.

We quickly realized that creating this format using Alteryx would be straightforward using the spatial tools available and put together the below workflow to do just that:



Next step?  Wrap into a macro of course so we can reuse it time and time again by dragging a single tool to the canvas:



If you want the macro to use in your own modules you can download it here.

From there I decided it was time to contribute some mapping files to the site.  Using Wikipedia I quickly found a description of the Administrative Divisions of France and a quick Google search found an open source site where I could download the data (http://professionnels.ign.fr/geofla).  The only problem was that the site only contained four of the geographical levels listed on the Wikipedia page.  I was missing the highest geography level, Regions.  But the problem was quickly fixed when I realized the next level down (departments) included a region field, so I just used a summarize tool in Alteryx to summarize the departments into the Regions and problem solved:



From there it was just a case of selecting which fields I wanted on my output and getting the files off to Craig to publish.

On this coming Monday myself, Craig and +Allan Walker are challenging ourselves to see how many mapping datasets we can add to http://tableaumapping.bi/ in one day.  So if you have any requests for datasets you would like to see then let us know in the comments below or on twitter.  Follow our progress on Twitter during the day with the hashtag #tableaumapping.

Friday 15 November 2013

Dynamic Formula Macro

DynamicFormula.yxmc

The Dynamic Formula Tool allows you to dynamically create formulas using a data feed. Effectively allowing you to write formulas by using other formulas, the summarize tool or other techniques. Great for when you need to write a long or complex formula or create a lot of formulas and don't want to do it manually.

Download
Help

What Does it Do?


Ever wanted to generate formulas using formulas?  Then the Dynamic Formula macro might be just what you are looking for.

How Does it Work?


First released on this blog back in May 2010 http://www.chaosreignswithin.com/2010/05/dynamic-formula.html; that blog post provides some more background to the tool.  This release sees the module upgraded to horizontal layout and makes use of some of the new Alteryx features that have been added since it was first written:

EscapeXMLMetacharacters()


This new method is ideal for when you are building your own XML as it correctly escapes the XML meta characters.Which are " ' < > &.

So now the tool can dynamically build formulas with greater than or less than comparisons.

Output fields change based on the data input into the macro


This is a new check-box on the macro properties window and the dynamic formula macro is a perfect example of what it is for.  So at configuration time we don't know what fields will come out of the macro because the field names of the new fields are determined by the data that is input into the bottom input.  Without this check-box checked the macro forgets what fields it is outputting whenever the module config is refreshed.  With it checked then after the first run it remembers its output fields, which is exactly what you want.

Dynamic Replace Tool


It is also worth mentioning that since I originally wrote this macro the dynamic replace tool has appeared in the Tool Palette, which with a bit of manipulation I believe can be made to perform the same functionality as this macro.  However I still like the Dynamic Formula for its simplicity.



Tuesday 12 November 2013

Another New Alteryx Blog

As if one new Alteryx blog (inspiringingenuity.net) wasn't enough, there is now another Alteryx themed blog by no other than the reigning Alteryx Grand Prix Champion - Chris Love.

Check it out here http://sciolisticramblings.wordpress.com.

His latest blog post creates a bi-variate themed map macro using some great custom XML manipulation.


He also has some great posts on:
The interactive maps post makes use of some of the experimental work that Ned Harding (Alteryx's CTO) has being doing over on his blog around interactive charting.  If you haven't been following these posts I would highly recommend that you take a look.  He is just wrapping the series up so a great time to read the whole lot at once. http://inspiringingenuity.net/2013/11/11/alteryx-a-reusable-nvd3-macro/

Look out for a macro from me using some of his techniques coming soon...