Search⌘ K

Finding the number of Institutes from each state

Explore how to extract and count the number of institutes from each state in a university ranking dataset using Bash shell commands. Learn to isolate relevant columns, sort data, and use uniq to count unique entries, gaining practical skills in text processing and data analysis.

We'll cover the following...

At this point we want to calculate how many Institutes have been ranked from each of the US states in the dataset. Let’s watch the following video lecture to understand the lesson goal fast!

Video thumbnail
Video lecture: Finding the number of Institutes from a given state

Let’s start by extracting only the part of each line that is relevant to us. In our case, notice that we are interested in column #1 and 3 (university and state names, respectively). ...