American History in Formula 1 Racing

Posted on Thu 29 September 2022 in Data Analysis

Joshua_on_simulator.jpg

Me on the simulator at the 2022 Formula E New York City E-Prix

With the return of Formula 1 to America to the U.S. with the United States Grand Prix at the Circuit of the Americas in 2012 and Netflix releasing his acclaimed Drive to Survive series, Formula 1’s popularity has exploded in the United States. After watching the Netflix series myself and the infamous Abu Dhabi ending to the 2021 championship, I’ve been hooked and have watched every qualifying session and race day in the 2022 season (unfortunately I choose to support Scuderia Ferrari and after several strategy mistakes and reliability issues, I’m starting to wonder if I backed the wrong horse). Since I’m new to motorsports, I was curious about the history of F1 and specifically the history of American drivers, constructors and circuits within the pinnacle of motorsports. I found a site that publishes a dataset containing a list drivers, constructors, circuits and race results. I downloaded the csv files, created tables (which can be found here) and relationships in a PostgreSQL database and loaded the csv files to perform some analysis.

#import libraries
import os
import pandas as pd
import psycopg2
import matplotlib.pyplot as plt
%load_ext sql
pd.set_option('display.max_rows', 9999)
# grab environment variables and connect to locally created database
user = os.getenv('USER')
password = os.getenv('PASSWORD')
host = os.getenv('HOST')
database = os.getenv('DATABASE')
connection_string = f"postgresql://{user}:{password}@{host}/{database}"

%sql $connection_string

Drivers

With silly season underway thanks to Fernando Alonso shock move to Aston Martin, there are rumors circulating about the potential of American drivers Colton Herta and Logan Sargeant getting a seat with an F1 team. Between the rumors and the fact there are no current American driver on the grid, I was curious about how many American drivers have there been in F1 and whether or not they’ve been successful.

%%sql 

SELECT nationality, COUNT(nationality) as Count 
FROM drivers 
GROUP BY nationality 
ORDER BY Count DESC
 * postgresql://joshuaacosta:***@localhost/Formula1
42 rows affected.
nationality count
British 165
American 157
Italian 99
French 73
German 50
Brazilian 32
Argentine 24
South African 23
Swiss 23
Belgian 23
Japanese 20
Australian 17
Dutch 17
Spanish 15
Austrian 15
Canadian 14
Swedish 10
New Zealander 9
Finnish 9
Mexican 6
Irish 5
Danish 5
Rhodesian 4
Uruguayan 4
Russian 4
Monegasque 4
Portuguese 4
Venezuelan 3
East German 3
Colombian 3
Thai 2
Indian 2
Indonesian 1
Liechtensteiner 1
Chinese 1
Polish 1
Chilean 1
Czech 1
Hungarian 1
Malaysian 1
Argentine-Italian 1
American-Italian 1
driver_nationality = _
driver_nationality_df = driver_nationality.DataFrame()
ax = driver_nationality_df.plot(kind='barh', x="nationality", y="count", title="Drivers By Nationality", legend=False, figsize=(9,9), xlabel="Nationality")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()

png

%%sql 

SELECT forename || ' ' || surname as "driver name", 
       dob,
       d."driverId",
       MIN(Year) as First_Year, 
       MAX(year) as Last_Year, 
       COUNT(CASE WHEN position = 1 THEN 1 END) as total_wins,
       COUNT(CASE WHEN position = 1 or position = 2 or position = 3 THEN 1 END) as total_podiums
FROM results r
LEFT JOIN drivers d on r."driverId" = d."driverId"
LEFT JOIN races on r."raceId" = races."raceId"
WHERE nationality = 'American'
GROUP BY d."driverId"
ORDER BY 6 DESC, 7 DESC
LIMIT 10
 * postgresql://joshuaacosta:***@localhost/Formula1
10 rows affected.
driver name dob driverId first_year last_year total_wins total_podiums
Mario Andretti 1940-02-28 207 1968 1982 12 19
Dan Gurney 1931-04-13 364 1959 1970 4 19
Phil Hill 1927-04-20 403 1958 1966 3 16
Peter Revson 1939-02-27 309 1964 1974 2 8
Bill Vukovich 1918-12-13 657 1951 1955 2 2
Richie Ginther 1930-08-05 386 1960 1967 1 14
Jim Rathmann 1928-07-16 509 1950 1960 1 4
Sam Hanks 1914-07-13 611 1950 1957 1 4
Jimmy Bryan 1926-01-28 525 1952 1960 1 3
Rodger Ward 1921-01-10 449 1951 1963 1 2
american_drivers = _
american_drivers_df = american_drivers.DataFrame()
ax = american_drivers_df.plot(kind='barh', x="driver name", y="total_wins", title="Total 10 American Drivers By Wins", legend=False, figsize=(8,8), xlabel="Nationality")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()

png

american_podiums_df = american_drivers.DataFrame().sort_values(by=['total_podiums'], ascending=False)
ax = american_podiums_df.plot(kind='barh', x="driver name", y="total_podiums", title="Total 10 American Drivers By Podiums", legend=False, figsize=(8,8), xlabel="Nationality")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()

png

I ran some SQL queries (see above) and discovered America has had the second-most drivers compete in F1 with only Great Britain slightly producing more drivers. Most American drivers competed in the early years of F1 (1950s-70s) and most were unsuccessful in reaching the podium.

Mario Andretti, Dan Gurney and Phil Hill are the most successful American drivers in F1 history. Andretti won 12 races while Gurney won four and Hill won three. Andretti and Gurney have a total of 19 total podiums each while Hill has 16. Andretti won the 1976 Driver's World Championship while Hill won in 1961. While Gurney doesn't have any F1 championships to his name, he does get the credit for starting the champagne spraying celebration custom at the podium after winning 24 Hours of Le Mans competition in 1967.

Constructors

With all the talk of Andretti Global's interest in joining F1 as a constructor, I was curious how successful other American constructors have been.

constructor_nat_result = %sql SELECT nationality, COUNT(*) as Count FROM constructors GROUP BY 1 ORDER BY 2 DESC

df = constructor_nat_result.DataFrame()
ax = df.plot(kind='barh', x="nationality", y="count", title="Constructors By Nationality", legend=False, figsize=(8,8), xlabel="Nationality")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()
 * postgresql://joshuaacosta:***@localhost/Formula1
24 rows affected.

png

%%sql 

SELECT 
    constructors.name as "Constructor Name", 
    SUM(r.points) as "Total Points", 
    MIN(Year) as First_Year, 
    MAX(year) as Last_Year, 
    COUNT(CASE WHEN position = 1 THEN 1 END) as Total_wins,
    COUNT(CASE WHEN position = 1 or position = 2 or position = 3 THEN 1 END) as Total_podiums
FROM 
    results r
LEFT JOIN constructors
USING("constructorId")
LEFT JOIN races on races."raceId" = r."raceId"
GROUP BY 1 
ORDER BY 6 DESC
LIMIT 10
 * postgresql://joshuaacosta:***@localhost/Formula1
10 rows affected.
Constructor Name Total Points first_year last_year total_wins total_podiums
Ferrari 9802.2705 1950 2022 241 798
McLaren 6049.5 1968 2022 179 478
Williams 3593.0 1975 2022 114 313
Mercedes 6562.64 1954 2022 124 267
Red Bull 5843.0 2005 2022 80 215
Team Lotus 995.0 1958 1994 45 114
Renault 1777.0 1977 2020 35 103
Benetton 861.5 1986 2001 27 102
Brabham 631.0 1962 1992 23 78
Tyrrell 711.0 1970 1998 23 77
%%sql 

SELECT 
    constructors.name as "Constructor Name", 
    SUM(r.points) as "Total Points", 
    MIN(Year) as First_Year, 
    MAX(year) as Last_Year, 
    COUNT(CASE WHEN position = 1 THEN 1 END) as Total_wins,
    COUNT(CASE WHEN position = 1 or position = 2 or position = 3 THEN 1 END) as Total_podiums
FROM 
    results r
LEFT JOIN constructors
USING("constructorId")
LEFT JOIN races on races."raceId" = r."raceId"
WHERE nationality = 'American'
GROUP BY 1 
ORDER BY 2 DESC
 * postgresql://joshuaacosta:***@localhost/Formula1
38 rows affected.
Constructor Name Total Points first_year last_year total_wins total_podiums
Haas F1 Team 214.0 2016 2022 0 0
Kurtis Kraft 130.0 1950 1960 5 19
Epperly 44.0 1955 1960 2 5
Watson 36.0 1950 1960 3 5
Penske 23.0 1974 1977 1 3
Kuzma 21.0 1951 1960 1 3
Eagle-Weslake 13.0 1966 1968 1 2
Lesovsky 10.0 1950 1960 0 1
Deidt 10.0 1950 1952 0 2
Phillips 7.0 1954 1960 0 1
Parnelli 6.0 1974 1976 0 0
Eagle-Climax 4.0 1966 1969 0 0
Sherman 3.0 1951 1952 0 0
Schroeder 2.0 1951 1955 0 0
Trevis 1.0 1951 1960 0 0
Snowberger 0.0 1950 1950 0 0
Stevens 0.0 1950 1956 0 0
Moore 0.0 1950 1959 0 0
Turner 0.0 1953 1953 0 0
Meskowski 0.0 1960 1960 0 0
Pankratz 0.0 1954 1955 0 0
Bromme 0.0 1951 1954 0 0
Olson 0.0 1950 1950 0 0
Pawl 0.0 1951 1955 0 0
Sutton 0.0 1959 1959 0 0
Christensen 0.0 1959 1960 0 0
Scarab 0.0 1960 1960 0 0
Elder 0.0 1959 1959 0 0
Del Roy 0.0 1953 1953 0 0
Nichels 0.0 1950 1954 0 0
Hall 0.0 1951 1951 0 0
Wetteroth 0.0 1950 1950 0 0
Marchese 0.0 1950 1951 0 0
Ewing 0.0 1950 1960 0 0
Rae 0.0 1950 1950 0 0
Dunn 0.0 1957 1959 0 0
Adams 0.0 1950 1950 0 0
Langley 0.0 1950 1950 0 0
american_cons_result = _
american_points_df = pd.DataFrame(data=american_cons_result, columns=["Constructor Name", "Total Points", "First_Year", "Last_Year", "Total_Wins", "Total_Podiums"])
american_podiums_df = pd.DataFrame(data=american_cons_result, columns=["Constructor Name", "Total Points", "First_Year", "Last_Year", "Total_Wins", "Total_Podiums"]).sort_values(by=['Total_Podiums'], ascending=False)
ax = american_points_df.plot.barh(x='Constructor Name', y='Total Points', legend=False, figsize=(9,9), title="Total Points by American Constructors")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()

png

ax = american_podiums_df.plot.barh(x='Constructor Name', y='Total_Podiums', legend=False, figsize=(9,9), title="Total Podiums by American Constructors")
ax.invert_yaxis()
ax.bar_label(ax.containers[0])
plt.show()

png

It was very interesting to learn that there have been American constructors since the inception of Formula 1 in 1950. Kurtis Kraft achieved 19 podiums and a total of 130 points between 1950 and 1960. Current constructor Haas F1 has the most points earned by an American constructor mostly do the recent change in how many points are awarded but haven't won any races or even reached a podium finish. Most American constructors were unsuccessful, left the sport in the early year and none are in the top 10 of constructors in F1 history by points, wins, podiums nor championships.

Circuits

There has been a ton of speculation about which circuits will have their contracts reviewed and which will be removed from the calendar. F1 recently released the 2023 calendar which included three races in the United States: COTA (Circuit of the Americas) in Austin, Texas, the Miami Grand Prix at Miami International Autodrome and a new street circuit to be built on the main strip in Las Vegas. With more races taking place in the US, I was curious where other races have been held here.

%%sql

SELECT country, COUNT('circuitId') as Count
FROM circuits
GROUP BY country
ORDER BY 2 DESC
 * postgresql://joshuaacosta:***@localhost/Formula1
35 rows affected.
country count
USA 12
France 7
Spain 6
UK 4
Italy 4
Portugal 4
Japan 3
Austria 3
Germany 3
Belgium 3
Canada 3
South Africa 2
Australia 2
Brazil 2
Azerbaijan 1
India 1
Morocco 1
Vietnam 1
Monaco 1
Mexico 1
Malaysia 1
Singapore 1
Switzerland 1
UAE 1
Hungary 1
Russia 1
China 1
Korea 1
Sweden 1
Qatar 1
Netherlands 1
Turkey 1
Bahrain 1
Saudi Arabia 1
Argentina 1
%%sql

SELECT "circuitRef", subq."name", "location", MIN(year) as First_Year, MAX(year) as Latest_Year, COUNT("raceId") as Number_of_races
FROM 
    (SELECT * FROM circuits where country = 'USA') subq
LEFT JOIN races on races."circuitId" = subq."circuitId"
GROUP BY 1,2,3
ORDER BY number_of_races DESC
 * postgresql://joshuaacosta:***@localhost/Formula1
12 rows affected.
circuitRef name location first_year latest_year number_of_races
watkins_glen Watkins Glen New York State 1961 1980 20
indianapolis Indianapolis Motor Speedway Indianapolis 1950 2007 19
americas Circuit of the Americas Austin 2012 2022 10
long_beach Long Beach California 1976 1983 8
detroit Detroit Street Circuit Detroit 1982 1988 7
phoenix Phoenix street circuit Phoenix 1989 1991 3
las_vegas Las Vegas Street Circuit Nevada 1981 1982 2
dallas Fair Park Dallas 1984 1984 1
miami Miami International Autodrome Miami 2022 2022 1
riverside Riverside International Raceway California 1960 1960 1
sebring Sebring International Raceway Florida 1959 1959 1
port_imperial Port Imperial Street Circuit New Jersey None None 0
%%sql

SELECT "circuitRef", subq."name", "location", MIN(year) as First_Year, MAX(year) as Latest_Year, COUNT("raceId") as Number_of_races
FROM 
    (SELECT * FROM circuits) subq
LEFT JOIN races on races."circuitId" = subq."circuitId"
GROUP BY 1,2,3
ORDER BY First_Year
 * postgresql://joshuaacosta:***@localhost/Formula1
79 rows affected.
circuitRef name location first_year latest_year number_of_races
bremgarten Circuit Bremgarten Bern 1950 1954 5
silverstone Silverstone Circuit Silverstone 1950 2022 57
reims Reims-Gueux Reims 1950 1966 11
monaco Circuit de Monaco Monte-Carlo 1950 2022 68
indianapolis Indianapolis Motor Speedway Indianapolis 1950 2007 19
monza Autodromo Nazionale di Monza Monza 1950 2022 72
spa Circuit de Spa-Francorchamps Spa 1950 2022 55
pedralbes Circuit de Pedralbes Barcelona 1951 1954 2
nurburgring Nürburgring Nürburg 1951 2020 41
essarts Rouen-Les-Essarts Rouen 1952 1968 5
zandvoort Circuit Park Zandvoort Zandvoort 1952 2022 32
galvez Autódromo Juan y Oscar Gálvez Buenos Aires 1953 1998 20
aintree Aintree Liverpool 1955 1962 5
pescara Pescara Circuit Pescara 1957 1957 1
boavista Circuito da Boavista Oporto 1958 1960 2
ain-diab Ain Diab Casablanca 1958 1958 1
avus AVUS Berlin 1959 1959 1
monsanto Monsanto Park Circuit Lisbon 1959 1959 1
sebring Sebring International Raceway Florida 1959 1959 1
riverside Riverside International Raceway California 1960 1960 1
watkins_glen Watkins Glen New York State 1961 1980 20
george Prince George Circuit Eastern Cape Province 1962 1965 3
rodriguez Autódromo Hermanos Rodríguez Mexico City 1963 2022 22
brands_hatch Brands Hatch Kent 1964 1986 14
zeltweg Zeltweg Styria 1964 1964 1
charade Charade Circuit Clermont-Ferrand 1965 1972 4
lemans Le Mans Le Mans 1967 1967 1
kyalami Kyalami Midrand 1967 1993 20
mosport Mosport International Raceway Ontario 1967 1977 8
jarama Jarama Madrid 1968 1981 9
tremblant Circuit Mont-Tremblant Quebec 1968 1970 2
montjuic Montjuïc Barcelona 1969 1975 4
osterreichring A1-Ring Spielberg 1970 2003 25
hockenheimring Hockenheimring Hockenheim 1970 2019 37
ricard Circuit Paul Ricard Le Castellet 1971 2022 18
nivelles Nivelles-Baulers Brussels 1972 1974 2
zolder Zolder Heusden-Zolder 1973 1984 10
anderstorp Scandinavian Raceway Anderstorp 1973 1978 6
interlagos Autódromo José Carlos Pace São Paulo 1973 2022 39
dijon Dijon-Prenois Dijon 1974 1984 6
long_beach Long Beach California 1976 1983 8
fuji Fuji Speedway Oyama 1976 2008 4
villeneuve Circuit Gilles Villeneuve Montreal 1978 2022 41
jacarepagua Autódromo Internacional Nelson Piquet Rio de Janeiro 1978 1989 10
imola Autodromo Enzo e Dino Ferrari Imola 1980 2022 30
las_vegas Las Vegas Street Circuit Nevada 1981 1982 2
detroit Detroit Street Circuit Detroit 1982 1988 7
dallas Fair Park Dallas 1984 1984 1
estoril Autódromo do Estoril Estoril 1984 1996 13
adelaide Adelaide Street Circuit Adelaide 1985 1995 11
jerez Circuito de Jerez Jerez de la Frontera 1986 1997 7
hungaroring Hungaroring Budapest 1986 2022 37
suzuka Suzuka Circuit Suzuka 1987 2022 32
phoenix Phoenix street circuit Phoenix 1989 1991 3
catalunya Circuit de Barcelona-Catalunya Montmeló 1991 2022 32
magny_cours Circuit de Nevers Magny-Cours Magny Cours 1991 2008 18
donington Donington Park Castle Donington 1993 1993 1
okayama Okayama International Circuit Okayama 1994 1995 2
albert_park Albert Park Grand Prix Circuit Melbourne 1996 2022 25
sepang Sepang International Circuit Kuala Lumpur 1999 2017 19
shanghai Shanghai International Circuit Shanghai 2004 2019 16
bahrain Bahrain International Circuit Sakhir 2004 2022 19
istanbul Istanbul Park Istanbul 2005 2021 9
valencia Valencia Street Circuit Valencia 2008 2012 5
marina_bay Marina Bay Street Circuit Marina Bay 2008 2022 13
yas_marina Yas Marina Circuit Abu Dhabi 2009 2022 14
yeongam Korean International Circuit Yeongam County 2010 2013 4
buddh Buddh International Circuit Uttar Pradesh 2011 2013 3
americas Circuit of the Americas Austin 2012 2022 10
sochi Sochi Autodrom Sochi 2014 2021 8
red_bull_ring Red Bull Ring Spielberg 2014 2022 11
BAK Baku City Circuit Baku 2016 2022 6
mugello Autodromo Internazionale del Mugello Mugello 2020 2020 1
portimao Autódromo Internacional do Algarve Portimão 2020 2021 2
losail Losail International Circuit Al Daayen 2021 2021 1
jeddah Jeddah Corniche Circuit Jeddah 2021 2022 2
miami Miami International Autodrome Miami 2022 2022 1
port_imperial Port Imperial Street Circuit New Jersey None None 0
hanoi Hanoi Street Circuit Hanoi None None 0

I was shocked to learn that the U.S. has had the most circuits on the F1 calendar since 1950. The Indianapolis Motor Speedway was in the inaugural F1 season in 1950 and has held a total of 19 races. Not only did I not know Watkins Glen International in my home state of New York has held F1 races in the past, it held the most out of all circuits in the U.S with 20 between 1961 and 1980. The most fascinating and hilarious tidbit I learned has to be about F1 race that never happened in New Jersey. There were plans announced in 2011 to create a street circuit in the Hudson Waterfront around Weehawken Port Imperial for the 2013 Grand Prix of America. According to the circuit's wiki page referencing several news reports, the race was "subject to a series of postponements and delays stemming from financial difficulties, failure to obtain approval from the FIA, a lack of preparedness from organizers, and a contractual dispute". If you're familiar with the State of New Jersey and its history with construction projects, this isn't surprising to you.

Conclusion

While some F1 fans bemoan the addiion of American circuits on the calendar, potential constructors and drivers as the Americanization of Formula 1 likes, the United States has rich history in Formula 1. America has had race winners, two separate world champions and held numerous races in different cities since the inception of F1. Can't wait to see the first American night race in Las Vegas in 2023!

Data Source

  • http://ergast.com/mrd/
  • http://ergast.com/docs/f1db_user_guide.txt
  • http://ergast.com/images/ergast_db.png