APEX demos – Formula 1 Racing Data ?

Posted by

Naturally there was an overwhelming urge to title this post “The Need for Speed” and sprinkle Maverick and Goose references throughout it, but since Top Gun is about fighter jets and not about motor racing I resisted that urge.Smile

If you have been attending any of the APEX Office Hours sessions of late, you will have noticed that many of the demos have been using data from the Formula 1 motorsport.



You might be thinking we have some secret relationship with Formula 1 due to our partnership with Red Bull Racing Honda but we’re getting the data from a source that is freely available to you as well.

If you head on over to https://ergast.com/mrd/ you can see this is an experimental facility to gain access to Formula 1 racing data. As long as you abide by the terms and conditions you can use this data as well. Rather than build a full API to the site, it is probably easiest just to download the data from time to time and load it into your database. If you take a look at the downloads page you’ll see the following formats


I’ve put together a script that will make creating the data in your Oracle Database a trivial exercise. Head on over to my github repo and the F1 scripts can take care of everything for you. All you’ll need to do is create a schema in which to put the tables. As per the README below, simply download the three F1 scripts and run F1.SH (or rename it to F1.CMD for Windows). This will download the latest Formula1 data in ANSI sql format, decompress it, push it through some SED filters to convert the SQL into something that Oracle is happy with. You just then call F1_WRAPPER in SQLcl or SQLplus and you’ll be good to go.


Because we’re converting a bare bones ANSI SQL script, we don’t take advantage of all of the Oracle-specific features that would make the data more rich and flexible, but its more than enough to build your own APEX apps on for educational and research purposes.

Note: The site https://ergast.com/mrd/ is not affiliated in any way with Oracle, so the availability of the data might cease at any moment. Thus don’t be building production applications on this data, which of course, you would not do anyway, because you read the T&Cs right? 

One comment

Got some thoughts? Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.