Grateful

I was writing about my journey from slacker to data scientist and I was reminded of just how fortunate I am because I had a lot of help along the way.

  • I am blessed to be working in the field of data science.
  • I am blessed to be employed a ridiculously good company.
  • I am blessed to still have a job amidst the COVID-19 crisis.

And most importantly, I truly am very fortunate to have family and friends– both professional and personal– that help me get to where I am now.

Today, I created a Kiva Team “Data Scientists for Good” with hopes of encouraging other data scientists, data analysts, and data engineers to give back. Click here if you’re interested in joining the team.

So, what are you grateful for?

Create a Network Graph in Power BI

In a previous article, I wrote a quick start guide to visualize a Pandas dataframe using networkx and matplotlib. While it was fun to learn and explore more about network graphs in Python, I got to thinking about how to present the results to others who don’t have Python or Jupyter Notebook installed in their machines. At TaskUs, we use Power BI for most of our reporting so I began to search for a custom Power BI visualization that can take the data and transform it into a meaningful network graph.

Enter Network Navigator.

Network Navigator is a custom visual in Power BI that is created by Microsoft. It allows you to “explore node-link data by panning over and zooming into a force-directed node layout (which can be precomputed or animated live).”¹ In this post, we’ll walk through the steps needed to create a network graph using the custom visual.

First, let’s get our data. You can download the sample dataset here. Then, we could load the data into Power BI Desktop as shown below:

Select Text/CSV and click on “Connect”.

Select the file in the Windows Explorer folder and click open:

Click on “Transform Data”.

Click on “Use first Row as Headers”.

Click on “Close & Apply”.

Next, find the three dots at the end of the “Visualizations” panel.

And select “Get more visuals”.

Point your mouse cursor inside the search text box and type in “network” and hit the “Enter” key and click on the “Add” button.

Wait a few moments and you’ll see the notification below. Click on the “OK” button to close the notification.

You’ll see a new icon appear at the bottom of the “Visualizations” panel as shown below.

Click on the new icon and you will see something similar to the picture below.

With the new visual placeholder selected, click on “Reporter” and “Assignee” in the “Fields” panel and it will automatically assign the columns as the Source and Target Node.

Let’s add labels by clicking on the paintbrush icon.

Click on “Layout” to expand the section and scroll down until you see the “Labels” section.

Click on the toggle switch under “Labels” to turn it on

and voila!

That’s it! With a few simple clicks of the mouse, we’re able to create a network graph from a csv file.


I hope you enjoy today’s post on one of Power BI’s coolest visuals. Network graph analysis is a big topic but I hope this gentle introduction will encourage you to explore more and expand your repertoire.

In the next article, I’ll share my journey from slacker to data scientist and I hope it’ll inspire others instead of being dissuaded by haters.

Stay tuned!

You can reach me on Twitter or LinkedIn.

[1]: Business Apps — Microsoft AppSource. (May 16, 2020). Network Navigator Chart https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380795?src=office&tab=Overview

How to put two or more dataframes together

The Pandas function below takes a list of dataframes and concatenates them into. This basic flavor of concat()joins the dataframes vertically. In other words, the rows of one dataframe gets added on to the previous one.

df = pd.concat([df1,df2,df3])

Or if you want, you can store the list of dataframes into a variable first and then call the concat function. Like so:

# we must import pandas first
# put it in the beginning of your file
import pandas as pd

frames = [df1, df2, df3, df4, df5]
df = pd.concat(frames)

On the other hand, if I want to join the dataframes horizontally, then I can use merge().

For example, in the code below, we are merging df1 with df2 using ‘column_name’ as the common column. This is the column from which to base the merge. If there are any other identical columns that exist between the two dataframes, the suffixes are then appended to the each of the column names accordingly.

This particular flavor of merge() joins the dataframes horizontally. In the words, the columns of the dataframes gets added together to make one big mamma jamma of a dataframe;

df_merged = df1.merge(df2,
                      left_on='column_name',
                      right_on='column_name',
                      suffixes=('_left', '_right'))

Highlights- The First 90 Days: Chapter 1, Prepare Yourself

Michael Watkins

It’s a mistake to believe that you will be successful in your new job by continuing to do what you did in your previous job, only more so.

Preparing yourself means letting go of the past and embracing the imperatives of the new situation to give yourself a running start.

Getting Promoted

You must figure out what it takes to be excellent in the new role, how to exceed the expectations of those who promoted you, and how to position yourself for still greater things.

Balance Between Breadth and Depth

You also need to learn to strike the right between keeping the wide view and drilling down into the details.

Rethink What You Delegate

… the keys to effective delegation remain much the same; you build a team of competent people whom you trust, you establish goals and metrics and monitor their progress, you translate higher-level goals into specific responsibilities for your direct reports, and you reinforce them through the process.

When you get promoted, however, what you delegate usually needs to change… it may make sense to delegate specific tasks… your focus may shift from tasks to projects and processes… entire businesses.

Influence Differently

… the decision-making game becomes much more bruising and politically charged the higher up you go. It’s critical, then, for you to become more effective at building and sustaining alliances.

Communicate More Formally

Establish new communication channels to stay connected with what is happening where the action is… all without undermining the integrity of the chain of command.

Your direct reports play a greater role in communicating your vision and ensuring the spread of critical information.

Exhibit the Right Presence

What does a leader look like at your new level in the hierarchy? How does he act? What kind of personal leadership brand do you want to have in the new role? How will you make it your own?

Four Pillars of Effective Onboarding

Business Orientation

Getting oriented to the business means learning about the company as a whole and not only your specific parts of the business. It’s beneficial to learn about the brands and products you will be supporting, whether or not you’re directly involved in sales and marketing.

Stakeholder Connection

It’s also essential to develop the right relationship wiring as soon as possible. This means identifying key stakeholders and building productive working relationships. Remember: you don’t want to be meeting your neighbors for the first time in the middle of the night when your house is burning down.

Expectations Alignment

Check and recheck expectations.

Cultural Adaptation

Think of yourself as an anthropologist sent to study a newly discovered civilization.

Identifying Cultural Norms

Influence

How do people get support? Is it more important to have support of a patron within the senior team or affirmation from peers and direct reports?

Meetings

Are meetings filled with dialogue on hard issues or are they simply forums for publicly ratifying agreements that have been reached in private?

Execution

Which matters more- a deep understanding of processes or knowing the right people?

Conflict

Can people talk openly about difficult issues without fear or retribution?

Recognition

Does the company promote stars or does it encourage team players?

Ends Versus Means

Are there any restrictions on how you achieve results? Does the organization have a well-defined, well-communicated set of values that is reinforced through positive and negative incentives?

Preparing Yourself

Take time to celebrate your move, even informally, with family and friends. Touch base with your informal advisers and counselors and to ask for advice.

Assess Your Vulnerabilities

One way to pinpoint your vulnerabilities is to assess the kinds of problems toward which you naturally gravitate.

Watch Out for Your Strengths

“To a person with a hammer, everything looks like a nail.”

Relearn How to Learn

New challenges and associated fears of incompetence can set up a vicious cycle of denial and defensiveness. Put bluntly, you can decide to learn and adapt, or you can become brittle and fail.

Relearning how to learn can be stressful… if you embrace the need to learn, you can surmount them.

Get Some Help

Engage with HR and your new boss about creating a 90-day transition plan. Ask for help in identifying and connecting with key stakeholders or finding a cultural interpreter.

Closing the Loop

You have to work constantly to ensure that you’re engaging with the real challenges of your new position and not retreating to your comfort zone.

Highlights- The First 90 Days: Introduction

Michael Watkins

The actions you take during your first few months in a new role will largely determine whether you succeed or fail.

“Success or failure during the first few months is a strong predictor of overall success or failure in the job.”

If you’re successful in building credibility and securing early wins, the momentum likely will propel you through the rest of your tenure.

The most dangerous transition can be the one you don’t recognize is happening.

Leaders also are impacted by the transitions of many others around them.

Your goal in every transition is to get as rapidly as possible to the break-even point. This is the point at which you have contributed as much value to your new organization as you have consumed from it.

The goal is the same: to get there as quickly as possible.

Avoiding Transition Traps

  • Sticking with what you know
  • Falling prey to the “action imperative”
  • Setting unrealistic expectations
  • Attempting to do too much
  • Coming in with “the” answer
  • Engaging in the wrong type of learning
  • Neglecting horizontal relationships

Understanding the Fundamental Principles

  • Prepare yourself
  • Accelerate learning
  • Match your strategy to the situation
  • Secure early wins
  • Negotiate success
  • Achieve alignment
  • Build your team
  • Create coalitions
  • Keep your balance
  • Accelerate everyone

Mapping Out Your First 90 Days

Your transition begins the moment you learn you are being considered for a new job.

Use the 90-day period as a planning horizon.

Start planning what you hope to accomplish by specific milestones.

Begin by thinking about your first day in the new job. What do you want to do by the end of that day? Then move to the first week. Then focus on the end of the first month, the second month, and finally the three-month mark.

Hitting the Ground Running

Every new leader needs to quickly become familiar with the new organization, secure early wins, and build supportive coalitions.