Python: Impact-effort Chart

FeaImg Impact Effort Chart

Hey folks! By the end of this tutorial, you will end up learning how to implement an impact-effort chart using the Python programming language. We will first start off by understanding what impact-effort charts are and why are they important.

Introduction to Impact – Effort Chart

Let’s quickly understand what an impact effort chart actually is. And based on that, create a code in python to implement an impact effort chart.

NOTE: This is a complex process and requires technical expertise. If you’re looking for an easier solution, use a customer feedback management tool that performs these calculations and visualizations without any hassles.

What are Impact-Effort Chart?

The Impact-Effort Decision Making Chart is a tool that may help a team determine which areas of improvement to focus on. The chart can assist a person in categorizing the quality improvement “to-do” list based on the effect of the task and the quantity of work required to reach each goal.

Effort Impact Chart Demo
Effort Impact Chart Demo

Being productive boils down to managing your time as effectively as possible. You may filter out irrelevant chores and focus your attention on the key goals you have for each day by running all of your tasks through an impact vs. effort analysis. This is very useful when you are receiving customer feedback for your product and want to create tasks to improve your product quality. There are many customer feedback management software in the market, one of them I have used personally is UserWell that solves all feedback-related challenges for B2B companies.

Importance of Impact-Effort Chart

There are various benefits of the impact-effort chart. Some of them are listed below:

  1. Helps to optimize limited time and resources
  2. Provids a visual touch to the daily to-do lists and even complex strategic plans
  3. Help to prioritize tasks based on what will be of most help in achieving goals
  4. Help to align the goals and priorities

Now that we are aware of what impact-effort charts are, let’s move to the code implementation of the same.

Implementing Impact-Effort Chart

In order to implement the chart, we will be following a number of steps. The steps are listed in the diagram shown below.

ImpactEffortChart Implementation
ImpactEffortChart Implementation

Step 1 – Importing Modules/Libraries

Just like any other program, the initial step is importing all the necessary modules/libraries into our code. For this implementation, we would require only two modules namely pandas and matplotlib.

import pandas as pd
import matplotlib.pyplot as plt

I hope you are familiar with both of them. If not, then check out the tutorials mentioned below:

  1. Python Pandas Module Tutorial
  2. Python Matplotlib Tutorial

Step 2 – Loading and Cleaning of Data

The next step is to load either a custom-made or random dataset into our program. A snapshot of the data used is shown below.

TaskList Snap ImpactMatrix
TaskList Snap ImpactMatrix

For this tutorial, we will be making use of the dataset which contains a number of tasks including the start and end date along with the priority of each task. There are some additional attributes but we don’t need them.

Along with loading, we need to make sure that we drop the nan values (if any). The code for the same is shown below.

data = pd.read_csv("Task_List.csv")
data =data.dropna()
ImpactEffortChart Loaded Data
ImpactEffortChart Loaded Data

Step 3 – Extracting Required Information from the Data

The next step involves obtaining the necessary information from the data. In order to achieve that, we would be making a dictionary that will contain the priority and the number of days assigned for each task.

I have assumed that the priority defines the impact the task will make and the efforts will be determined by the number of days the task has.

A major task here is to calculate the number of days one has for each task. In order to achieve the same, we would require datetime module and get the date function.

We start off by splitting the start and end date for each task and extracting the dates, creating two date objects. In the end, we find the difference between the two and return the number of days from the difference.

The code implementation for the same is shown below. If you are unaware of how the datetime module works, check this tutorial out.

from datetime import date
def get_time (start,end):
    start = (start.split()[0]).split('-')
    end = (end.split()[0]).split('-')
    start = date(int(start[2]), int(start[1]),int(start[0]))
    end = date(int(end[2]),int(end[1]),int(end[0]))
    diff = end - start
    return diff.days

Now that we have the function to compute the number of days i.e. the time we have for each task. We will move on to creating the dictionary which will store the same along with the priority against each task in the list.

all_tasks = data['Task']
final_data = {}
for i in range(len(all_tasks)):
    l = list()
    # priority
    # get_no_days
    l.append(get_time(data['Start Date'][i],data['End Date'][i]))
    final_data[all_tasks[i]] = l

The final dictionary has values in the form displayed below.

Extracted Data ImpactEffortChart
Extracted Data ImpactEffortChart

Step 4 – Assigning Each Task a Quadrant

Now the next task is to assign each task a quadrant in the plot we will be plotting in the next stage.

The quadrants are defined according to certain rules and assumptions as shown in the table below.

Quadrant NumberName of QuadrantNumber of DaysPriority
1High Impact – Low Effort>10High
2High Impact – High Efforts<10High
3Low Impact – Low Effort>10Low/Medium
4Low Impact – High Effort<10Low/Medium

In order to assign the coordinate points to each task, we require a specific range in order to assign random coordinates using the random module. If you are unaware of the random module, check this tutorial right here!

We would be making sure that our plot stays in 22 by 22 x and y values and hence we will be assigning random (x,y) values in the range of [1,20] to get a clear plot. The values are assigned according to the table mentioned above.

import random
first,second,third,fourth = 0,0,0,0
plot_data = {}
for i in final_data:
    # 1st Quadrant
    if(final_data[i][0] == 'High' and final_data[i][1] > 10):
        x = random.randint(1,10)
        y = random.randint(12,20)
        while((x,y) in plot_data.values()):
            x = random.randint(1,10)
            y = random.randint(12,20)
        plot_data[i] = (x,y)

    #2nd Quadrant
    elif(final_data[i][0] == 'High' and final_data[i][1] < 10):
        x = random.randint(12,20)
        y = random.randint(12,20)
        while((x,y) in plot_data.values()):
            x = random.randint(12,20)
            y = random.randint(12,20)
        plot_data[i] = (x,y)
    # 3rd Quadrant
    elif((final_data[i][0] == 'Low' and final_data[i][1] > 10) or (final_data[i][0]=='Medium' and final_data[i][1]>10)):
        x = random.randint(1,10)
        y = random.randint(1,10)
        while((x,y) in plot_data.values()):
            x = random.randint(1,10)
            y = random.randint(1,10)
        plot_data[i] = (x,y)
        x = random.randint(12,20)
        y = random.randint(1,10)
        while((x,y) in plot_data.values()):
            x = random.randint(12,20)
            y = random.randint(1,10)
        plot_data[i] = (x,y)

print("Quadrant 1 - High Impact but Low Efforts -" , first)
print("Quadrant 2 - High Impact and High Efforts -", second)
print("Quadrant 3 - Low Impact and Low Efforts -", third)
print("Quadrant 4 - Low Impact and High Efforts -", fourth)

After running the above code snippet, we could see the number of tasks assigned to each quadrant as shown below.

Quadrant 1 - High Impact but Low Efforts - 1
Quadrant 2 - High Impact and High Efforts - 7
Quadrant 3 - Low Impact and Low Efforts - 4
Quadrant 4 - Low Impact and High Efforts - 12

Step 5 – Visualize the Final Results

In order to visualize the final results, we need to have the x and y coordinates values under separate variables and in order to have the annotations, we would need the labels as well.

In order to avoid long texts in plots and get crisp and clear plots, we will be plotting only the first 12 characters of the string.

all_x = [plot_data[i][0] for i in plot_data]
all_y = [plot_data[i][1] for i in plot_data]
all_labels = [i[:12] for i in plot_data]

The visualization part is quite simple, and can be done with a basic scatter plot and annotations can be added later on. Along with this, we would be adding text in order to define the quadrants.'seaborn')
plt.plot([11,11],[0,21], linewidth=2, color='red')
plt.plot([0,21],[11,11], linewidth=2, color='red' )

plt.text(3,6, 'Low Impact \nLow Efforts', fontsize = 22,alpha = 0.1)
plt.text(3,15, 'High Impact \nLow Efforts', fontsize = 22,alpha = 0.1)
plt.text(15,15, 'High Impact \nHigh Efforts', fontsize = 22,alpha = 0.1)
plt.text(15,6, 'Low Impact \nHigh Efforts', fontsize = 22,alpha = 0.1)

for i in range(len(all_x)):
    plt.annotate(all_labels[i], (all_x[i], all_y[i] + 0.2))

plt.title('Impact - Effort Chart',fontsize=30)

The following tutorials would be helpful in understanding some parts of the code mentioned above:

  1. Python Matplotlib Tutorial
  2. 3 Matplotlib Plotting Tips to Make Plotting Effective
  3. Seaborn Scatter Plot – The Ultimate Guide
Final Impact Effort Chart
Final Impact Effort Chart


Congratulations! You just learned about the impact-effort chart and how to implement manually using the Python programming language from very scratch. 😇

Liked the tutorial? In any case, I would recommend you to have a look at the tutorials mentioned below:

  1. How to Plot and Customize a Pie Chart in Python?
  2. Introduction to Error Bars in Python
  3. Diagram Architecture using the diagrams module in Python
  4. How to Plot a Treemap in Python?

Thank you for taking your time out! Hope you learned something new!! 😄