


We’ll tidy this up later, in the meantime we can create our other two charts, which are much easier.įirst our horizontal bar chart, using the same sorting trick: Our last step here will be to order the Pesticides by adding a discrete pill to the right of that orders them in descending order, in my case I use an inline calculation -CountD(). Our final step should be to clean up the visualisation by making the Index a dual-axis and syncronising the axis. Now change the Mark Type of this second Mark to Line, and drop Country onto Path to link up different countries with a line. Now to add the lines: duplicate Index by holding down the Ctrl key and move it to the right of itself. Now we can build our first plot, as below – note the Mark Type is set to circle and that we have filtered our status to 3, i.e. Note that Index should be a Dimension, not a Measure, as it will be used with aggregations and so move it up to the Dimensions area. Two more calculations are now needed to break up the combinations of Countries, and also to give each country a position in the combination plot – these two calculations will form the basis for that plot The calculations below will give each row in the data a column which indicates the status of each country. Our next job is to create some calculations that “unpivot” the data too. We then rename the fields to make them easier to follow later: Our first step in Tableau is to Pivot the data so that we have a row per “Country”/Pesticide combination (from here I will refer to the EU as a country for brevity). The data, above, is structured such that each row is a pesticide and the columns indicate its status in each region. I recommend downloading the above example from Tableau Public (using the Share icon in the bottom right) to follow along and aid in understanding this tutorial and its calculations. Finding this information is simple as its right there at the top of the chart. We then note in the next two rows that there are a lot of pesticides that are approved in Brazil, China and the USA but not the EU, and also there are a lot that are only approved in the USA. We can quickly see the biggest combination is pesticides used in all four regions, which makes sense. The bar chart at the top of the combination plot shows the number of pesticides for each country/region. The bar chart to the right showing the number of pesticides in this combination. Firstly the combination dot plot on the left of the viz contains dots to show which countries/regions are grouped in each combination. The visualisation has three main elements.
