Inbound Border Crossings at US Ports of Entry, 1996-2019

By Jared Marangolo

From the source: The Bureau of Transportation Statistics Border Crossing Data provides summary statistics for inbound crossings at the U.S.-Canada and the U.S.-Mexico border at the port level. The data reflects the number of vehicles, containers, passengers or pedestrians entering the United States via ports of entry.

There are 8 columns and 346,733 rows.

The columns are as follows:

  • Port Name
    -Name of the Port of Entry.

  • State
    -US State that the port is in.

  • Port Code
    -Port code as given by Customs and Border Protection (CBP)

  • Border
    -Differentiates between the US-Canadian border and the US-Mexican border.

  • Date
    -Year & Month

  • Measure
    -Whether the imbound traffic was a personal vehicle, container, truck, etc.

  • Value
    -Count

  • Location
    -Longitude and Lattitude

Importing important libraries:

In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

First 10 rows:

In [2]:
data = pd.read_csv('border.csv')  # Read into CSV data file
data.head(10)  # Show the first 10 rows
Out[2]:
Port Name State Port Code Border Date Measure Value Location
0 Calexico East California 2507 US-Mexico Border 03/01/2019 12:00:00 AM Trucks 34447 POINT (-115.48433000000001 32.67524)
1 Van Buren Maine 108 US-Canada Border 03/01/2019 12:00:00 AM Rail Containers Full 428 POINT (-67.94271 47.16207)
2 Otay Mesa California 2506 US-Mexico Border 03/01/2019 12:00:00 AM Trucks 81217 POINT (-117.05333 32.57333)
3 Nogales Arizona 2604 US-Mexico Border 03/01/2019 12:00:00 AM Trains 62 POINT (-110.93361 31.340279999999996)
4 Trout River New York 715 US-Canada Border 03/01/2019 12:00:00 AM Personal Vehicle Passengers 16377 POINT (-73.44253 44.990010000000005)
5 Madawaska Maine 109 US-Canada Border 03/01/2019 12:00:00 AM Trucks 179 POINT (-68.3271 47.35446)
6 Pembina North Dakota 3401 US-Canada Border 03/01/2019 12:00:00 AM Bus Passengers 1054 POINT (-97.24333 48.96639)
7 Progreso Texas 2309 US-Mexico Border 03/01/2019 12:00:00 AM Truck Containers Empty 1808 POINT (-97.94889 26.061670000000003)
8 Portal North Dakota 3403 US-Canada Border 03/01/2019 12:00:00 AM Rail Containers Empty 6685 POINT (-102.54917 48.99583)
9 Champlain-Rouses Point New York 712 US-Canada Border 03/01/2019 12:00:00 AM Trucks 24759 POINT (-73.44694 44.98639)

Busiest Port of Entry

The port at El Paso, Texas was the only port shown when sorting the data for the busiest port crossings into the U.S.

Almost 4.5 million people entered the US in El Paso in March of 2001 via Personal Vehicles, and the months slightly before and after aren't too far off that number either.

In [23]:
busyPorts = data.sort_values('Value', ascending=False).head(15) # Shows the top 15 imbound crossings at ports of entry
busyPorts                                                       #  by Value (count)
Out[23]:
Port Name State Port Code Border Date Measure Value Location
269576 El Paso Texas 2402 US-Mexico Border 03/01/2001 12:00:00 AM Personal Vehicle Passengers 4447374 POINT (-106.45 31.76)
278590 El Paso Texas 2402 US-Mexico Border 08/01/2000 12:00:00 AM Personal Vehicle Passengers 4291774 POINT (-106.45 31.76)
270431 El Paso Texas 2402 US-Mexico Border 02/01/2001 12:00:00 AM Personal Vehicle Passengers 4281175 POINT (-106.45 31.76)
267985 El Paso Texas 2402 US-Mexico Border 04/01/2001 12:00:00 AM Personal Vehicle Passengers 4252128 POINT (-106.45 31.76)
280760 El Paso Texas 2402 US-Mexico Border 06/01/2000 12:00:00 AM Personal Vehicle Passengers 4235244 POINT (-106.45 31.76)
284873 El Paso Texas 2402 US-Mexico Border 03/01/2000 12:00:00 AM Personal Vehicle Passengers 4157988 POINT (-106.45 31.76)
276834 El Paso Texas 2402 US-Mexico Border 09/01/2000 12:00:00 AM Personal Vehicle Passengers 4139166 POINT (-106.45 31.76)
272258 El Paso Texas 2402 US-Mexico Border 01/01/2001 12:00:00 AM Personal Vehicle Passengers 4118534 POINT (-106.45 31.76)
299482 El Paso Texas 2402 US-Mexico Border 03/01/1999 12:00:00 AM Personal Vehicle Passengers 4099560 POINT (-106.45 31.76)
290337 El Paso Texas 2402 US-Mexico Border 10/01/1999 12:00:00 AM Personal Vehicle Passengers 4061990 POINT (-106.45 31.76)
275203 El Paso Texas 2402 US-Mexico Border 10/01/2000 12:00:00 AM Personal Vehicle Passengers 4050300 POINT (-106.45 31.76)
283669 El Paso Texas 2402 US-Mexico Border 04/01/2000 12:00:00 AM Personal Vehicle Passengers 4041977 POINT (-106.45 31.76)
279869 El Paso Texas 2402 US-Mexico Border 07/01/2000 12:00:00 AM Personal Vehicle Passengers 4038981 POINT (-106.45 31.76)
281486 El Paso Texas 2402 US-Mexico Border 05/01/2000 12:00:00 AM Personal Vehicle Passengers 3986253 POINT (-106.45 31.76)
274581 El Paso Texas 2402 US-Mexico Border 11/01/2000 12:00:00 AM Personal Vehicle Passengers 3968185 POINT (-106.45 31.76)

Border Crossings per Year

In [8]:
crossPerYear = data.groupby("Date")["Date"].count()  # Count the number of crossings for each month
plt1 = crossPerYear.plot.bar()  # Plot it

plt.title('Border Crossings Per Year');
plt.ylabel('Number of Crossings (in thousands)');
plt.xticks(np.linspace(0, 275, 24))

plt1;

*Note: The graph above shows every Measure separately, which is why there are so many lines per year.

Number of ports from Canada vs. Mexico

This graph shows the number of rows that reference a Canadian border port or a Mexican border port.

In [5]:
borderCross = data.groupby("Border")["Border"].count()
plt2 = borderCross.plot.bar();

plt.ylabel("Rows");
plt.title("Rows referencing Canada vs. Mexico");

A vast majority are Canadian border ports, which makes sense given that our northern border is much longer than our southern border in terms of pure distance.
Also, keep in mind that the data is given in rows, which does not mean there are over 250,000 ports. Because there is a different row for every Measure, the actual numbers are much smaller than that for each, but the proportions are the same.

Data by State

In [6]:
stateData = data.groupby("State")["State"].count()  # Group the data by state, and get the total count.
plt3 = stateData.plot.barh();  # Plot it

plt.ylabel("State");
plt.xlabel("Rows");
plt.title("Number of Rows per State");
plt.xticks(np.linspace(0, stateData.max(), 10));

Over 50,000 rows are dedicated solely to North Dakota, which I found very surprising. I figured a state like Texas, which shares a huge border with Mexico, would be much higher than North Dakota or Washington.
Again with this plot, the data is in rows, not ports. This means that there are NOT 57,000+ ports of entry in North Dakota, but proporsionally it is the same.

Inbound traffic by Measure

In [21]:
measure = data.groupby("Measure")["Measure"].count()
plot4 = measure.plot.bar()

plt.title("Inbound Traffic by Measure")
plt.ylabel("Rows")
plt.ylim(26500,30500)

plot4;

I separated the data by the measure and graphed it to show the proportions of what exactly is entering the country.
I manipulated the limits of the y-axis to better detail the proportions of the differenced. Unsurprisingly, there are fewer trains entering the country than buses, passenger vehicles, trucks, and even pedestrians.

What this data tells me is that a sizable majority of the traffic entering the United States is people. If you take the number of people entering via buses, trains, cars, or on foot, and compare it to any kind of cargo, it is a much larger number.
That is surprising to me because Canada and Mexico are the US's top two trade partners in the world, so there must be a lot of people coming in to dwarf the cargo coming in.

Conclusion

Given the data from the dataset, you can see that even though El Paso, Texas has the most amount of people coming through their ports into the US, Canadian border states have higher overall traffic. This tells me that it is most likely the case that we do more trade with Canada, and we therefore have more freight coming in than people from up north, but have more people than freight coming in from Mexico.

It is also very clear that the number of people and cargo coming into the United States does not differ that much at all from year to year, even since the mid 1990's. Personally, I found that to be the most interesting of everything.

Lastly, it is very interesting to see certain states so low in terms of volume entering through that state, and other so high. For instance, California I thought would be much higher given it's sizable border with Mexico and it's economy. Meanwhile, what is often thought of as a vastly uninhabited state, North Dakota, is the top state in terms of incoming traffic. I suspect this is also to do mostly with cargo vs. people.

In [ ]: