How to create a Parliament Chart in Tableau?

In this Skillpill, you will learn how to create a Parliament Chart in Tableau.

A Parliament Chart, or semicircular chart, represents the distribution of parliamentary seats. It is not a standard chart type in Tableau but can be manually created using calculations and customizations.

This type of chart is ideal for visualizing proportional distributions, such as parliamentary seats, votes, or other categories, in a way that is engaging and appealing.

 

Step 1: Prepare Your Data

→ Start by preparing your data and ensure it’s in a format that includes, in this case: the party and the number of seats occupied by each

 

Pasul 2: Create parameters

→ Create 2 parameters: “Rows” and “Rows from Center,” as integers with default values of 12 and 10.

Next, create several calculated fields that will help correctly display the data, i.e., the members on the semicircular parliament layout:

→ Calculated field INDEX with the formula: INDEX() - 1

→ Calculated field Total (total number of members) with the formula: {FIXED : COUNTD([Seat #])}

→ Calculated field Item with the formula: INT(INDEX / Rows)

→ Calculated field Steps, which account for the half-circle representation, with the formula: 180 / (MAX(Total) / Rows - 1)

→ Calculated field Distance with the formula: (INDEX % Rows) + Rows from Center

 

Step 3: Calculate the Coordinates

→ Calculate the X and Y coordinates using the following formulas:

X Coordinate: COS(RADIANS(Item) * Steps) * Distance Y Coordinate: SIN(RADIANS(Item) * Steps) * Distance

 

Step 4: Visualize the Data

→ Now you can visualize the data by adding all members to Details as a dimension and dragging Party onto the Color card to differentiate by party or category.

→ Change the mark type to Circle.

→ Drag X to Columns and Y to Rows.

→ To display all circles properly, select “Edit Table Calculation” for the X field and choose “Specific Dimensions”, ensuring you select both dimensions.

 

Now the chart is ready, and you need to refine it.

Remove the axes and gridlines. You can increase the size of the circles and change the colors for each party.

You also have the option to sort by the party using “Edit Table Calculation”.

Similarly, if desired, you can adjust the number of rows or the distance from the center.

 

Here, you can view the result in Tableau Public:

Watch the video tutorial here:

About btProvider:

We hold all possible technical and sales certifications for all products:

Tableau Desktop, Tableau Public, Tableau Server, Tableau Prep, and Tableau Data Management.

With Tableau Software – the best data visualization platform – you can always understand your business or your job better. Using Tableau, you will make intelligent and strategic decisions and quickly understand the data flow, numbers, and the results it produces. See other #skillpill video tutorials here:

How to display multiple insights on a dashboard in #Tableau

How to create Stacked Bars on Grand Totals in Tableau

How to create a Buffer Zoom in a Tableau Map

Are you interested in learning more about Tableau Software – one of the best analytics tools and implementing the solution in the entire company?

Contact us!

See how Tableau works, by downloading a free trial here: