Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
/ onlyf1-db Public archive
forked from f1db/f1db

Open Source Formula 1 Database

License

Notifications You must be signed in to change notification settings

onlyf1com/onlyf1-db

 
 

Repository files navigation

⚠️ After acquiring the F1DB.com domain OnlyF1-DB has been rebranded back to F1DB and can now be found again at f1db/f1db

⚠️ Also old release artifacts can be found at the new location.

OnlyF1 OnlyF1

What is OnlyF1-DB?

OnlyF1-DB is the most comprehensive free open source database with all-time Formula 1 racing data and statistics.

Whether you are building a custom website, mobile application or just using OnlyF1-DB to query data, here is what we provide:

  • All drivers
  • All constructors
  • All engine manufacturers
  • All tyre manufacturers
  • All circuits and location data
  • All seasons from 1950 to present; including:
    • entrants
    • standings
  • All races; including:
    • free practice and warming-up results
    • qualifying and pre-qualifying results
    • sprint race results
    • starting grid positions
    • race results
    • fastest laps
    • pit stops
    • driver of the day results
    • standings

New releases will be available as soon as possible after every race. See also Versioning.

Release artifacts are available in the following formats:

  • CSV
  • JSON
  • JSON splitted (multiple data files)
  • Smile (binary variant of the JSON format)
  • SQLite

Notable Changes in v2023.22.0

  • Added abbreviation property to GrandPrix.

Notable Changes in v2023.4.0 "Sprint Shootout"

Due to the new Sprint Shootout race format introduced for the 2023 season (starting from the Azerbaijan Grand Prix) the JSON Schema is bumped to version v3.0.0 which has some backward incompatible changes:

  • Race.sprintQualifyingStartingGridPositions renamed to Race.sprintStartingGridPositions.
  • Race.sprintQualifyingResults renamed to Race.sprintRaceResults.

Besides the backward incompatible changes, the following is added:

  • Race.sprintQualifyingFormat which contains the sprint qualifying format (currently only SPRINT_SHOOTOUT).
  • Race.sprintQualifyingResults which contains the sprint qualifying results.

Above changes are also reflected in the SQLite database; which includes changing some view names.

Also the sprint related source files for previous years have been renamed.

Note that a future minor version update to the v3.x JSON schema might include Sprint related statistics like totalSprintWins.

Notable Changes in v2023.x

The project has been rebranded from F1DB to OnlyF1-DB. Old release artifacts and data version history can still be found in this repository.

From version v2023.x the CSV and JSON splitted formats are added to the available release artifacts.

Due to this and adding positions gained to the race standings the JSON Schema version is bumped to version v2.0.0 which has some backward incompatible changes:

  • DriverStanding has now separate SeasonDriverStanding/RaceDriverStanding object definitions.
  • ConstructorStanding has now separate SeasonConstructorStanding/RaceConstructorStanding object definitions.
  • SeasonDriverStanding/SeasonConstructorStanding has no round property anymore.
  • RaceDriverStanding/RaceConstructorStanding has a new positionsGained property.

Above changes are also reflected in the SQLite database as separate tables are introduced.

Because of the new JSON splitted format (which is also available for the Smile format) dedicated schema files are available for the splitted files.

Also note that the schema files itself are now part of the release artifacts.

OnlyF1-DB JSON Schema

The main onlyf1-db.schema.json schema file contains all OnlyF1-DB object definitions and serves as the main documentation.

For the splitted distributions the splitted schema files must be used.

Both the JSON and Smile artifacts validate against the OnlyF1-DB Json Schema.

Schema version compatibility / history

Version Schema Version
>= v2023.22.0 onlyf1-db.schema.json v3.2.0, onlyf1-db-*.schema.json v3.2.0 splitted
>= v2023.8.0 onlyf1-db.schema.json v3.1.0, onlyf1-db-*.schema.json v3.1.0 splitted
>= v2023.4.0 onlyf1-db.schema.json v3.0.0, onlyf1-db-*.schema.json v3.0.0 splitted
>= v2023.0.0.beta1 onlyf1-db.schema.json v2.0.0, onlyf1-db-*.schema.json v2.0.0 splitted
>= v2022.1.1 f1db-json-schema-v1.4.0.json
>= v2022.0.0 f1db-json-schema-v1.3.0.json
>= v2022.0.0.beta4 f1db-json-schema-v1.3.0.json
>= v2022.0.0.beta3 f1db-json-schema-v1.2.0.json
>= v2022.0.0.beta2 f1db-json-schema-v1.1.0.json
>= v2022.0.0.alpha1 f1db-json-schema-v1.0.0.json

OnlyF1-DB SQLite Database

The SQLite database artifact contains all data in a relational database format and can be used to directly query the data instead of processing the JSON format.

The database file could also serve students who want to learn SQL.

We suggest to use SQLiteStudio for querying the database file. Of course any SQLite compliant SQL client can be used as well.

Versioning

Releases are versioned using a "customized" CalVer versioning scheme:

YYYY.RR.MICRO(.MODIFIER)

which uses the following conventions:

  • YYYY – Full year of the season – 2023, ..
  • RR – Round number within the season – 0, 1, 2, .., 10, 11, ..
  • MICRO – Patch version – 0, 1, 2, ..
  • MODIFIER – An optional text tag like dev, alpha, beta, rc, ..

Note this is basically the YYYY.MINOR.MICRO(.MODIFIER) pattern where MINOR indicates the round number (RR).

Examples:

  • 2023.0.0.alpha – Pre-season alpha release before the 1st race round of the 2023 season.
  • 2023.0.0.beta – Pre-season beta release before the 1st race round of the 2023 season.
  • 2023.0.0 – Final pre-season release before the 1st race round of the 2023 season.
  • 2023.0.1 – First pre-season patch release before the 1st race round of the 2023 season.
  • 2023.1.0 – Final release after the 1st race round of the 2023 season.
  • 2023.2.0 – Final release after the 2nd race round of the 2023 season.
  • 2023.2.1 – First patch release after the 2nd race round of the 2023 season.
  • 2023.2.2 – Second patch release after the 2nd race round of the 2023 season.

As you can see we use a special RR 0 for pre-season releases.

Community

The OnlyF1-DB community can be found on GitHub Discussions, where you can ask and answer questions, voice ideas, and share your projects.

Keep in touch with us by following us on Twitter — @OnlyF1com.

Reporting Data Issues

We use GitHub Issues to track data issues or related problems.

If you found a data issue which is not reported yet, please create a new issue.

Building from Source

To build the distribution zips simply run:

./gradlew clean dist assemble

Requires Java 17.

Releasing

GitHub Actions is used to build and upload new releases by creating a new git tag.

Follow these steps:

  1. Update the version number in gradle.properties
  2. git commit -am "Release v<version>"
  3. git push
  4. git tag -a v<version> -m "Release v<version>"
  5. git push origin v<version>

and the release action is automatically triggered by pushing the new tag.

License

Creative Commons License

OnlyF1-DB is licensed under a Creative Commons Attribution 4.0 International License.

Packages

No packages published

Languages

  • Kotlin 100.0%