The world’s leading publication for data science, AI, and ML professionals.

The Viz for Social Good Community -  An Analysis Using Python & Tableau

Learn about the Viz for Social Good volunteers, gain helpful tips for your next visualization, & find out how to get involved!

Recently I participated in a project through Viz for Social Good (VFSG), a social enterprise that helps mission-driven organizations harness the power of Data Visualization for social change. You may have heard of some their previous projects with organizations such as Academics without Borders, Bridges to Prosperity, and Girls + Data.

VFSG’s latest project, Visualize our Community, had volunteers analyze data from a VFSG community poll to help them better understand their current volunteer base, identify efforts for recruiting, and to help determine what non-profits they should partner with going forward.

In this article, I’ll provide an overview of the project, interesting insights, and useful tips you can apply to your next dashboard!

Project Overview

For the Visualize our Community project, VFSG volunteers were provided with a dataset to help VFSG understand their current volunteers and determine future organizations to partner with.

The dataset¹ consisted of 19 fields, each representing a question from an anonymous VFSG Community Poll. Questions in the poll covered a wide range of demographic information, such as age, education level, and country of origin. Two of the questions were free text responses while several others allowed respondents to select from multiple options. The nature of the dataset led to my decision to use Python and Tableau Public to analyze the data – Python to quickly clean and manipulate the data, and Tableau Public to design effective visualizations.

Using Python I created a few new fields drawing from existing fields, including Number of Programs, which reflects the number of different technologies a volunteer has used for data visualizations, and individual Boolean columns for each technology a volunteer has used (i.e. Tableau, Excel, Cognos, Alteryx, etc.).

This Python script was then used to generate a new dataset that was uploaded into Tableau Public to develop visualizations. The full Python script and final dataset can be found here.

Insights

Once I created a clean dataset, I started developing visualizations in Tableau, which were ultimately used in a dashboard for VFSG.

Several interesting insights were obtained from this dataset, a few of which I’ve highlighted below.

Insight 1 : Tableau & Excel are the 2 tools VFSG volunteers use most.

The visualization below shows the top 7 tools that VFSG volunteers use for projects, consisting of many market leading open-source, BI, and data blending tools. Tableau and Excel are a favorite among VFSG volunteers amidst the sea of tools available on the market today.

Insight 2: The majority of VFSG volunteers are based in the US or Canada.

While the majority of VFSG volunteers are based in the US and Canada, there are several volunteers across the globe. As depicted below, several volunteers are based in Europe and Asia as well, specifically in countries such as the United Kingdom and India.

Insight 3: The majority of volunteers found VFSG through Twitter.

The below visualization shows the top 7 outlets through which volunteers found VFSG. Twitter, Tableau user groups, and LinkedIn take the top 3 spots. Interestingly, a large amount of traffic comes from Tableau user groups, and as we saw earlier, a large number of VFSG volunteers use Tableau to create data visualizations.

For more insights, view the entire dashboard on Tableau Public.

Useful Tips

While creating the visualizations and dashboard for VFSG, there were several techniques I utilized – below I’ve highlighted a few key ones that you can implement in your next visualization or dashboard!

Tip 1: Utilize Tableau’s Dual Axis feature to combine multiple measures into one chart

Dual axes are two independent axes that are layered on top of one another. They allow you to compare multiple measures within a single visualization.

The VFSG dataset contained a column with a list of the technologies each volunteered used. In Python, I split this column into multiple Boolean columns, one for each product. If a volunteer used that specific technology to create visualizations, then the value was set to 1, if not, then the value was set to 0.

To view all of these product columns in a single visualization, I utilized the Dual Axes feature in Tableau.

To create the visualization, shown above in Insight #1, I performed the following steps:

  1. On a new sheet, place two measures on the Rows shelf (such as Alteryx and Tableau)
  2. Select the drop down menu for one of the measures on the _Rows s_helf
  3. Select Dual Axis from the drop-down options
  4. Select horizontal bar chart from the Show Me tab
  5. On the Filters card, select Edit Filter
  6. Select all the measures you would like to include in the visualization and select Ok (In the case of this visualization, I selected the product specific measures.)
  7. Once all the measures are added, format and sort the visualization

Note: In Step 6, selecting measures from the Filters card allows for a quicker way to add each measure to the chart, rather than adding each one individually to the Rows shelf

Tip 2: Add visualizations to Tooltips

In Tableau, Tooltips are details that appear when you hover over a mark on a visualization. Tooltips are a great way to add additional context and information to your visualization, while utilizing the most of your dashboard space.

For the VFSG dashboard, I added visualizations to a few Tooltips, including the bar chart showing the distribution of volunteers by age range.

By adding a visualization to the Tooltip of the "What is your age?" bar chart, I was able to provide users another view to further drill down into the data. In the example above we can see the breakdown by gender, within the 18–25 year group.

To add a visualization to a Tooltip:

  1. Navigate to the sheet containing the visualization you want to add a Tooltip to (In the above example, this would be the "What is your age?" bar graph)
  2. Select Tooltip from the Marks Card on the left
  3. On the screen that follows, select Insert from the Menu options
  4. Select the sheet containing the visualization you want to add to the Tooltip (In the above example, this was the sheet containing the pie chart of the breakdown of gender identity)
  5. Select Ok, and then hover over the Marks on the visualization to see the updated Tooltip!

Tip 3: Use containers to place visualizations in your dashboard

When creating a dashboard in Tableau, there are several objects you can utilize, such as horizontal and vertical containers!

Containers are a great way to organize objects in a dashboard. Horizontal containers allow you to place visualizations in a row next to one another, while vertical containers allow you to stack visualizations in a column on top of one another. With containers you also have the option to distribute the visualizations within a container evenly.

For the VFSG dashboard, I used a vertical container to hold the VFSG logo and the dashboard description, as seen in the image below. This vertical container contains an Image object for the VFSG logo, and a Text object for the dashboard description.

I also used several horizontal containers. A horizontal container was used for the bar charts under the About the Volunteers section.

This horizontal container consists of 3 bar charts, distributed evenly across the container.

To distribute the contents of a container evenly:

  1. Select one of the visualizations or objects within the container
  2. Select the object’s drop down menu
  3. Select Select Container: Horizontal from the drop-down menu options
  4. Select the container’s drop-down menu
  5. Finally, Select Distribute Contents Evenly

Working with containers can be a bit tricky, so personally before I create a dashboard, I like to sketch out a layout to use as a guide. Having a sketch helps when working with multiple containers – and just because you sketch something out doesn’t mean it can’t be adjusted later!

Bonus Tip: Horizontal & Vertical Containers can be used within one another! I did this for the VFSG dashboard, and I would highly recommend doing this when you want to use multiple objects and visualizations in one dashboard!

Take a look at my sketch for the VFSG dashboard to see how I used horizontal and vertical containers.

View the final dashboard on Tableau Public and the code/dataset on GitHub.

Viz for Social Good has several active members. If you are interested in volunteering, sign up for the VFSG newsletter and stay informed on new projects you can participate in!


Payal is a Data & AI specialist. In her spare time, she enjoys reading , traveling, and writing on Medium. If you enjoy her work, subscribe to her list here, and never miss a story!

The above article is personal and does not necessarily represent IBM’s positions, strategies, or opinions.

References

[1]: Viz for Social Good. (January 12 2022). Viz for Social Good- Visualize our Community Dataset https://drive.google.com/drive/folders/1-YFp_09yx9uI2LRrm3CnpZEe9Aor7PJ


Related Articles