Monday, 22 August 2016

The Rise of Malaria in The Democratic Republic of Congo



The Democratic Republic of Congo is the 2nd largest country in Africa. In 2014, a quarter of African malaria deaths occured in the DRC. The 10 countries that surround it equated to another quarter. Since 2006 the surrouding countries malaria victims have been on the decline, by the DRC has continued to rise, peaking at nearly 31,000 in 2013. Civil war prevents medical supplies reaching those that need it. Refugees fleeing conflcit leave behind vital mosquito nets.

This viz looks at the issue. 

Wednesday, 10 August 2016

Celebrate the upcoming release of Tableau 10, get my Udemy course for $10




Hi,
To celebrate the up coming release of Tableau 10 I'm giving away my Udemy course on Vizzing data with Tableau for just $10, see what i did there. Be sure to follow the link below to get it at the discounted price.
https://www.udemy.com/learn-data-visualisation-with-tableau-9/?couponCode=TABLEAU_10

Tuesday, 2 August 2016

How to filter data when you don't have the data?



Filters in Tableau are great, they let you get rid of data that you are not interested in a hone in on the data that you do. They do however have one big flaw. You can only create a filter if you have the data. What do I mean by this? Well lets look at an example. 





We want to create a sales dashboard per state. Our sales areas are divided by regions and we want to create sales dashboards one that just looks at just one region at a time Central,West,East and South.

So we could do that using a filter right? Well lets see what filter options we have. Dragging region onto the filter shelf shows us this



We only have 3 regions to choose from, its not possible to select the West region. The reason for that is that filters Only filter the values in our data. If the data isn't present, we cannot filter it out. We haven't yet had any sales for the West region, so we don't yet have that in our data, so we cannot create a filter on it yet. We do know though, that we will be getting data for it, so how can we set up filtering for data that we haven't got yet?

So what do we do in this instance? Well we can create the East/South/Central dashboard as those three regions are present in the data, but what about the West?



Well we could use and exclude filter and select East/South/Central to be excluded, leaving the other two regions. Then when we do get the sales for West arrive in the data the filter will still work and our dashboard will filter the data. 

But, and its a big but, the sort that Sir Mixalot would like, are we certain no more regions would ever be added? What would happen if a North region got created and data started to be associated with a North region? Well the East/South/West dashboards would be fine, its including the East,West and South regions so any new regions would just be ignored. However, what happens to the West? That filter is only excluding Central,East and South, any other value of Region is welcome. This means that the North region data will be included, silently. Using Exclude filters are only good if you don't care about extra data being added, sometimes that what you want, but its better to include if possible. 

So, theres the problem, how can we create a filter for data that isn't yet in our data source? The answer like most things is parameters. 


We need to create a parameter and then tell Tableau to match it to the Regions and then add that to the filters. 

First, lets create a Region parameter


Now we create a calculated field based on the value of the parameter. 


Add this to the filter shelf



and then test it out.


We can now select a region and the filter works. When we select West, we get a blank sheet, which is correct, there is no data, so nothing is going to be shown. However, when the West's data starts to get added this filter will become "active" and only show the wests data. 

Parameters are a great way to take control of your data viz, you can ensure that filters work how they should and that the only the data that you want to be seen, is seen. 







Thursday, 28 July 2016

40 Years of Executions, 50,000 Wasted Years


This viz was part of MakeOverMonday looking at executions since 1979. I decided to take a look at the wasted years of the executed people, based on their life expectancy according to their race and state. In 40 years over 1400 people were executed, a total of nearly 50,000 wasted years that never were because of the crimes the committed. If the death penalty is the ultimate deterrent, then maybe looking at the data this way might do just that. This viz was inspired by the superb Gun Deaths viz by Periscopic.

Wednesday, 27 July 2016

Don't use network drives with Tableau, use Network Locations

We have users that need to use Excel workbooks as datasources in their Tableau dashboards which are then published to Tableau server. However the problem lies with how Windows and Tableau use the network path names. 
Most people will connect to a shared drive by mapping a network drive, like this




And map the network drive to a letter, in this case Z. 



Now all that works fine and Tableau desktop will happily connect and all is right in the world. But if you then publish that workbook to the server, the problem arises with that drive letter. Tableau server has no idea what that Z drive is, it thinks it's a local drive on the server box somewhere and so it cannot find the correct file. This makes for a sad panda.



Instead we need to make sure that Tableau uses the UNC path name. The UNC path in this example is \\fastnfs\tableau_data_sources, the same that we used when we mapped the drive to the letter Z. 

Even though from here it knows the UNC path..



You can see the path that the data source is using by right clicking on the name in the data window and selecting properties




and if we click on the filename in the data connection window we can see it's defaulted back to use the drive letter. 



To fix this we need to edit that path to be the full UNC one



And then if we publish, Tableau server knows where to go and look for the file, assuming you have giving the Tableau Services user access to the directory.

This all works fine, except it relies on someone remembering to manual edit the path name to the full UNC path and not the driver letter name. 

The good news is that there is an easy solution to this and it's how you set up your access to the shared network drive in the first place. Instead mapping a network drive you map a network location. The process is the same as mapping a drive, except it doesn't get a drive letter. 



Choose the custom network location, click next.

Put in the UNC path for your shared drive



Give it a name



click finish and voila



We now have a new network location, note the different icon. 

Now if we create a data connection and use that instead of a lettered drive



And then check the data source properties we see it's got the correct UNC path, we havent typed a thing, not had to edit anything. 




Hope this helps anyone using files on a network share as a data source, if you need any help setting this up, just give me a shout. 

Thursday, 21 July 2016

Bizare Tableau server behaviour

We were looking at using Excel sheets as a data source with Tableau server. The idea is that we have a central repository that mirrors the Tableau server project structure, one folder per project per reporting team. People can then place their Excel, csv etc into their folder, create a dashboard and publish it to the server. This is going to be very popular once Tableau 10 is released as we will be able to use cross database joins to enable joining MySql databases and Excel sheets into one single datasource. What we would then encourage people to do is not only publish their workbooks but also publish their data sources, so that they can be used by other people to build their own dashboards. 

As part of a test to check that this all works i have come across a very very strange issue. 

I have an Excel workbook that contains a sheet called Title, with two rows of data


This is used to create the title of the Tableau workbook when it gets published. 
I create a simple viz just to check that its able to find the file, ensuring that i used the correct UNC path name.
I then published this to the data server, ensuring i unticked the "External file" checkbox and gave the data source a completely new name. 

I then connected to the newly published data source, and looked at the data from it, and to my surprise, its different to the original 


Now this is very strange, by publishing and then connecting to the new source the data has changed some how. To check this i got someone else to try it on their machine and got the same results. Then I opened up Tableau and used the web editor to connect to the published data source and do the same thing, and guess what, i got a different result


Now it says June 2018, not June 2019, or June 2016 - Original as it should do. 

Very odd i thought, so the next step was to create a local copy of the published data source and see what that did, maybe that would show me where the data in the published datasource was coming from. 

So, the local copy of the published datasource has the correct UNC path, and pulls back the correct information. So the information contained within the published datasource must be correct, else the local copy would be wrong, but its not. 

This means that i no longer trust Excel sources published as a data source outside of a workbook, which is a real bummer as thats one thing we planned on doing. I haven't yet looked to see if this still breaks if we use an extract, but we want to have live connections to the Excel sheets so people can see their updates in real time without having to wait on a schedule. 

Tuesday, 12 July 2016

How Long will Theresa May Be Prime Minister?



On the 13th July Theresa May will become the 13th Prime Minister to serve under Queen Elizabeth II. I thought i would take a look back at the other 12 and see how long they lasted in office and see how long Theresa might last. Seems like less than a year is the low point to beat, and 11 and half years in the record. This is a simple gantt chart using two dates and a datediff calculation. The donut chart was made using the tutorial on Andy Kriebels blog here http://www.vizwiz.com/2014/12/donutcharts.html


Thursday, 7 July 2016

Zens On Tour - A 470 Mile Tableau Odyssey


Wow. Just Wow. What a week, well 4 days it has been. The Zen Master UK Tour is at an end and I am on my final leg of travel back home. Its been an amazing experience and am so glad that I was asked to take part. Its by far the best thing I have done as part of the Zen Program. 

We started out in Edinburgh, my first trip to the city and although we didn’t get to do much sight seeing, the venue offered an amazing view Athur’s Seat. 

The first of the #MakeOverMonday sessions went so well, people got really engaged with the idea and got stuck into the data. Some people were total beginners, their first time with Tableau, but even so were able to create something, within an hour that they could share with the rest of the group. Its amazing that you can get such variety of views from the same simple dataset. Everyone really enjoyed the chance to play with a dataset that was different from their usual one, and I think that is one of the best things about #Makeovermonday. It allows people to play with data, to just experiment, in a safe environment. Nothing that they produce is going to be used to make a big decision, so it can be used as a learning experience, try something new without risk of failure. 

In the afternoon, everyone was treated to yours truly giving a talk on the role of colour in data visualisation. I think they liked it, no one walked out or fell asleep so that’s a result in my book. I was then joined onstage my my fellow Zen Masters for a great Q&A that started with colour but soon went off into other areas. We then had some networking, which was a great way to char to people, hear their stories and try to give back some of the enthusiasm that we feel as Zens. 

We then all jumped on the Zen Bus, our ride for the week. Imagine Iron Maiden Tour Bus, well it was nothing like that, more Spinal Tap. It was a great ride down to Leeds, involving a few board games, magic tricks, conversations, beers and sleep. Even had time for a stop at the Golden Arches. 

We had another great session with people in Leeds, building fun vizzes for #MakeoverMonday, sharing their work and there was a real buzz in the room and hopefully the start of the Leeds TUG. Rob gave a terrific keynote about the challenge of making dataviz mean something to people that don’t see the value in it, how to make people see beyond just pixels on a screen and see the data, and the people behind it. 
We had another great Q&A following the keynote, people engaged with the subject and wanted to know more about how to drive that take up. 

After a wonderful curry and walk though Leeds, and a decent nights sleep it was an early start to get to our next stop Birmingham. 

As for the bus journey to Brum, well lets just say, you weren’t there man, you don’t know what it was like. It was an epic journey, full of thrills, a few spills, some grey hair, swearing, frantic looking up of routes, but eventually, and I don’t know how we made it. 

More makeovers, Q&A and a great talk by Andy on his Dear Data 2 project with Jeff Shafer closed out the day and after a great night watching the football it was off to London, on the train this time. 

We had a great turnout for the London event, in a very swanky hotel. Saw some great makeovers from people with very little experience, but all got something out of it, which was great, new connections made, info passed on. 

Chris Love did a great, and very thought provoking talk on the art of keeping data viz simple. His arguments against overly complex data viz were well made, and I mostly agreed with them. It made me think about some of my earlier dashboards and how I would throw everything at them, and now I don’t. Hopefully he will get to give that talk again as I think its great to hear how reducing the complexity of a viz can be a really powerful design choice. 

And that was that, the end of an epic week. Its been amazing talking to so many people to have so many people come out to see us, to take part in the makeovers, to see the talks. I really hope that this is something that happens again, it was a great way to spread the enthusiasm that we Zens have, and its what we do and why we do it. 

We, have to say a huge thank you to 3 and a half people for all their help in making this dream a reality. 

First Louis Archer, the guy that came up with the crazy idea of putting the band on the road. He played the role of tour manager superbly, kept us on time, told us where to go and organised it so well, it just made the whole thing a total joy. 

2nd Andy Cotgreave, the un-offical leader of the Zens and the Andy of Andy and the Zens. His boundless energy and enthusiasm is what keeps the Zen program the amazing thing it is. Without this, we just wouldn’t be the group of people that we are. Thank you for doing a great job (mostly) of the role of MC for the week, you set each day up a treat.

To Jacob Clarke



(the half I was talking about, as he only did two days) You played the role of roadie so well, and assisted in the Q&A with the microphone, helped out with the makeovers, but more than that, brought the fun to the group. Every successful Tableau event needs one Clarke, and you were ours. Its evident in the fact that it all went downhill when you left us. 

The unsung hero though, was Marcus Wong. He went ahead of us each day, got the venue set-up, put out the badged and made sure that when we arrived, we didn’t have anything to do. 
You know all those awesome Tableau events we go to? You know how well they are run and work so so smoothly? Its because of the backroom guys like Marcus, they are they heroes, so Marcus, thank you, from all of us.

Finally I’d like to thank my fellow Zens, Andy, Craig, Chris and Rob for their friendship and support on this trip. We managed to get through it all without falling out, which says something about the group. All of us took time away from home, from families to do this, we don’t work for Tableau, we don’t get anything from this. 
We do this, cos this is who we are. 

We love playing with data, playing with Tableau. 

We make simple things, complex things, beautiful things, practical things. 

We write blogs, we talk on podcasts, we present. We teach and we learn. 
We will always do our best to help others join us on our Tableau and dataviz journey. 

We do it, because we want to share. We do because we love to help. 

We do it because we are the Tableau Zen Masters.  

And I've never been prouder to be one. 

A Quick way to display decades on a continuous axis without a calculation

During #Zensontour we did #Makeovermonday using the Global Temperature data from week 20. This has the median temperatures per month. Plotting it as a line chart gives something like this 


But what i wanted was to have the decades displayed on the axis. I could use a calculated field to create the decades

STR((INT((Year([Date]))/10))*10)+ "'s"

This then gives you a decade dimension that you can add which then gives you this


But what i really want is the label of decades on the axis, but with a continuous line. Well you can do that, without a calculation, by editing the axis labels.

So first, get rid of the decade, change the year to a green pill, a continuous year.


Now right click on the Year of Date axis and click on the tick marks tab


We then change it to be fixed, every 10 years, and then set the tick origin to be 1/1/1840


Click ok and you then get this


And whats really cool is that if we drill down, we still get the decades on the axis. 


Quick, easy and no calculations. 









Friday, 13 May 2016

Can you explain DataViz using the most common 1000 words?

I was having a conversation with my barber the other day and he asked me what i did for a living. Although its easy to explain to people that already know me and Tableau, explaining to a lay person was surprisingly hard to do. What was even harder was trying to explain and define data viz with out using Excel and pie charts as an example. I guess thats because for most people when they think of data Excel comes to mind and the pie is the most well known of the datavizzes. So this got me thinking, how do you explain dataviz to a lay person.

I was reminded of this excllent comic from XKCD on how to explain the Saturn 5 space rocket using only the most commen 10,000 words




So here is the challenge, how would you explain dataviz to someone, who had never come across it before, using only the most common 1000 words. 

Follow this link to the UpGoer5 editior which will help, or not. Just to make it tricky, data doesnt appear on the word list.

tweet me @Matt_Francis email ugleymatt@gmail.com and let me know what you come up with. 


Tuesday, 12 April 2016

Looking at the Winning Margins of the US Masters in Tableau

Well that was an amazing end to the 2016 US Masters.  Danny Willet beat Jordan Spieth by 3 shots to win after Spieth threw away a 5 shot lead with only a handful of holes to go.This got me wondering what the winning margins were for previous tournaments. So a quick Google here, a Wikipedia entry there and i had the data ready to go. 
This viz looks at the history of the US Masters and the winning margins by
plotting the scores for the winner and runner up. In a case of a tie the winning score is shown. 



Monday, 14 March 2016

Busting the DataViz Myths one by one

Well its been a long time but here i am blogging again. Its been a busy few months, which i will be blogging about in due course but first i want to introduce to you my new site

http://www.datavizmyths.com/

So what is this new site about i hear you ask? Well i am glad you asked.

There are many rules and guidelines around dataviz. Everyone knows the rule, but not necessarily the origin and the logic behind it. What started out as a guideline becomes a rule that gets blindly followed without understanding why. Over time, these rules become mantras and doctrine that people follow religiously, and enforce when they see others straying from the path. However as their origins have been lost in the mists of time, often this advice or criticism is un-warranted.
 This website aims to explore the myths surrounding dataviz and look for the truth behind them. To show what the rule actually means, when to apply it and when to disregard it. I want to show that it’s not enough to just know the rule, you have to know the reason why it exists in the first place, know when to bend it and not break it.

Over time i will add more myths to the list, the aim is for this to become the dataviz myth busting reference site. So, if you have a myth that you want exploring and ultimately busting, let me know.

 
biz.