Hmm, that is a tough challenge. If I had my Stephen Few hat on, I would start by asking whether area charts around a circular reference frame are really the best way to display your data etc etc but hey, if it's good enough for Florence Nightingale then it's good enough for me.
Despite Andy Cotgreave saying in San Diego that it wasn't possible to recreate Flo's viz in Tableau (he recreated the other 4 in his presentation) I think you can... I've been meaning to prove it but haven't had the time. The solution is to use a polygon chart where you can define all the vertices and then overlay your data (wind speeds) on top.
I have attached an example (not my work, can't recall where it came from) which might help kick you off in the right direction. Let us know how you get on!
Clock example.twbx.zip 29.1 KB
Damien, this certainly is an interesting challenge. First let me say I am not normally a fan of circular visualizations (pie charts, gauges, etc.) but this one has a compelling reason for being circular, the compass rose metaphor. It works well. It's a good thing you mentioned the 'animation', I didn't notice the control at first. Anyway, let me suggest how I think you'll probably end up doing this:
- You'll probably end up with 3 layers, a background image, a polygon layer and then a 'calm' circle on top
- The background image is straight-forward. The mapping training video will get you started.
- The polygon layer will be the tricky one, but the good news is the slices are all 10 degrees with only the length changing. It'll probably end up being easiest to make the end straight rather than curved, but maybe not.
- The calm circle will most likely be created using a dual axis chart, but I haven't messed with custom polygons enough to know if that's going to cause more problems than it's worth. I'm also not sure 1% will always be the calm figure, so I'm wondering if that circle isn't going to get bigger and smaller.
- The animation is fairly straight-forward, at least in desktop. You'll put the months pill on the page shelf. But I'm not sure how long each set of polygons will take to draw, so it's hard to tell if it will be as smooth as the original.
- It's probably best to do this as 3 separate sheet for each element, and then collect them on a dashboard.
It'll be some work, but I think it is doable. And I think it'll be some fun working it all out. Keep us posted, interesting project.
Thanks for your quick answers.
It will definitely get me started and I'll get in touch when I have some results.
A couple of points to add to what Shawn & Robin wrote:
- Totally do-able in Tableau, if you're willing to take the time to get the calculations right. The first time I did this kind of thing I had to relearn some geometry and trigonometry.
- Stick with drawing triangles, so you'll only need three points * 36 directions = 108 rows per circle per month.
- For the calm circle, I'd suggest adding a single row to the data, then plotting that on a dual axis as a circle mark. Or you could make another polygon for the circle, but that would add 100 to 360 rows (depending on how smooth you wanted the circle's edges to be).
- For these few marks, the animation will be really fast, but jumpy because Tableau doesn't make smooth transitions between positions.
- The slowest part will probably be the load time before the viz appears as Tableau loads everything into memory. For maximal speed, do as much pre-calculating as possible and use an extract.
- You probably know this already, there is no play button for the Pages Shelf on Tableau Public or Tableau Server.
- If you wanted to get really fancy, you might be able to use a background map, do the circular grids as shape marks on a dual axis, then plot the triangles and circles on top of that.
1 of 1 people found this helpful
What Jonathan & Robin said. So taking the workbook Robin posted [which I suspect is a Richard creation turned out to be an Andrew Ball creation] I did a bit of surgery (deconstruction then reconstruction) and I was able to get this far:
(See attached). The biggest challenges you're going to face are scale and registration. (That outside circle is for registration purposes only. Once we get everything worked out we can turn it white, so it disappears.) You'll notice that not all the 'lengths' hit the kts. radius circles perfectly, but for now this was the best I could do. There are a few little 'fudges' and adjustments necessary to get things this close, and I suspect that our old enemy 'monitor aspect ratio' will rear it's ugly head with this viz, but let's see how far we can get.
The next step is to add the month animation, which is where I got stuck . It's going to need either a join or a custom SQL, which this 'graphics guy' is still trying to learn. I've included the workbook and an Excel file with a couple of unused worksheets (wind speeds by month and that sheet reshaped). I was sort of hoping one of our Forum Friends will point us in the right direction to either merge or join or whatever these sheets so we can get the animation working.
This was great fun to work on. Thanks for posting this Damien.
Message was edited by: Shawn Wallwork
That's more than I initially expected. I've some other important assigned tasks due on Monday, but I'll get back to you soon. I feel confident that I can adapt this method with my data. All your answers are going to save me a lot of time. Thank you.
About the animation, my first message was certainly misleading. I won't implement animation on that chart. The view is going to be published on Tableau Server and I don't think it would be that relevant anyway. At best, I will use a filter.
The data being on the secondary data sources from what I've seen, using a parameter might help (at least in Tableau 7).
The circle at the center is of the viz is indeed an additional element I might not include in the final chart. My purpose was not to reproduce this chart made with d3 but just to illustrate something close to what I need to achieve.
I'll try to get back to you with an overview of my result by next Tuesday. I'll have a look about the animation part just for the play. It would be unfair that you had all the fun from my issue
I didn't have much time to reply. I provide an example of animation based on Shawn's Wallwork's workbook. There is actually no real difficulty when you understand JOIN. There is no need for Custom SQL.
I would also like to precise that in my data, the wind direction (equivalent to the dimension "Degrees" in the previous workbook) was not a discrete dimension but a numeric (taking values such as 23.34, 304,34, 245,34, etc.). Data Blending being not possible on bins, I had to create a new dimension as follow:
- IF [WindDirection]>= 0 and [WindDirection]< 10 THEN 10
- ELSEIF [WindDirection]>= 10 and [WindDirection]< 20 THEN 20
- ELSEIF [WindDirection]>= 20 and [WindDirection]< 30 THEN 30
- ELSEIF [WindDirection]>= 30 and [WindDirection]< 40 THEN 40
- ELSEIF [WindDirection]>= 40 and [WindDirection]< 50 THEN 50
- ELSEIF [WindDirection]>= 50 and [WindDirection]< 60 THEN 60
- ELSEIF [WindDirection]>= 60 and [WindDirection]< 70 THEN 70
- ELSEIF [WindDirection]>= 70 and [WindDirection]< 80 THEN 80
- ELSEIF [WindDirection]>= 80 and [WindDirection]< 90 THEN 90
- ELSEIF [WindDirection]>= 90 and [WindDirection]< 100 THEN 100
- ELSEIF [WindDirection]>= 100 and [WindDirection]< 110 THEN 110
- ELSEIF [WindDirection]>= 110 and [WindDirection]< 120 THEN 120
- ELSEIF [WindDirection]>= 120 and [WindDirection]< 130 THEN 130
- ELSEIF [WindDirection]>= 130 and [WindDirection]< 140 THEN 140
- ELSEIF [WindDirection]>= 140 and [WindDirection]< 150 THEN 150
- ELSEIF [WindDirection]>= 150 and [WindDirection]< 160 THEN 160
- ELSEIF [WindDirection]>= 160 and [WindDirection]< 170 THEN 170
- ELSEIF [WindDirection]>= 170 and [WindDirection]< 180 THEN 180
- ELSEIF [WindDirection]>= 180 and [WindDirection]< 190 THEN 190
- ELSEIF [WindDirection]>= 190 and [WindDirection]< 200 THEN 200
- ELSEIF [WindDirection]>= 200 and [WindDirection]< 210 THEN 210
- ELSEIF [WindDirection]>= 210 and [WindDirection]< 220 THEN 220
- ELSEIF [WindDirection]>= 220 and [WindDirection]< 230 THEN 230
- ELSEIF [WindDirection]>= 230 and [WindDirection]< 240 THEN 240
- ELSEIF [WindDirection]>= 240 and [WindDirection]< 250 THEN 250
- ELSEIF [WindDirection]>= 250 and [WindDirection]< 260 THEN 260
- ELSEIF [WindDirection]>= 260 and [WindDirection]< 270 THEN 270
- ELSEIF [WindDirection]>= 270 and [WindDirection]< 280 THEN 280
- ELSEIF [WindDirection]>= 280 and [WindDirection]< 290 THEN 290
- ELSEIF [WindDirection]>= 290 and [WindDirection]< 300 THEN 300
- ELSEIF [WindDirection]>= 300 and [WindDirection]< 310 THEN 310
- ELSEIF [WindDirection]>= 310 and [WindDirection]< 320 THEN 320
- ELSEIF [WindDirection]>= 320 and [WindDirection]< 330 THEN 330
- ELSEIF [WindDirection]>= 330 and [WindDirection]< 340 THEN 340
- ELSEIF [WindDirection]>= 340 and [WindDirection]< 350 THEN 350
- ELSEIF [WindDirection]>= 350 and [WindDirection]<= 360 THEN 360
The formula might not be optimized and is quite repetitive but it works.
Clock example-SW-5.zip 159.7 KB
2 of 2 people found this helpful
Lovely! With some more annotation/information this could be a good viz for Tableau Public, I think. And I'm fascinated by why there are consistent outliers to the ENE and WSW.
Here's an alternate to the giant IF statement:
IF [Wind Direction] < 360 THEN INT([Wind Direction]/10)*10+10 ELSE 360 END
This is mock-up data, so we can't learn anything from this Viz. It would however be interesting to find a proper dataset with this kind of information (unfortunately, I can't publish mine). I'll have a look. I would like first to improve this Viz.
Thanks for the formula. It's that simple... I feel shameful I thought of the big one first
I'm just proposing a small change to the formula because my dataset has some missing values:
ELSEIF [WindDirection] < 360
You're welcome for the formula, I only learned that from some other folks after having made my own enormous IF/THEN statements.
Hi, i've tried to create this rose plot, but i have problems when it comes to use my own data of wind direction/degree. I don't know what went wrong. My data is a daily data.
Okay now, i have the polygon info in one sheet and in another sheer i have wind direction and wind degree. I have follow exactly as the clock example, but the length of my rose plot has exceed the compass image.