Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add country code to the race location #106

Open
JakubHanko opened this issue Nov 14, 2024 · 4 comments
Open

Add country code to the race location #106

JakubHanko opened this issue Nov 14, 2024 · 4 comments
Labels
data Related to the data returned enhancement New feature or request

Comments

@JakubHanko
Copy link

Hi,

right now when querying https://api.jolpi.ca/ergast/f1/2024/races/, there are some countries' values which are populated inconsistently. For example Las Vegas GP is listed in the United States whereas the Austin GP is listed in the USA (neither of which respects the ISO country standard as far as I know). Silverstone and Yas Marina are another offenders. This leads to slightly more cumbersome data processing than it has to be.

Changing the country name itself could be a breaking change (I guess) so that's why I am proposing to use e.g. ISO 3166-1 alpha-2 country codes.

This is by no means a huge issue for me. It's just an idea to have the API a little bit tidier.

@jolpica
Copy link
Owner

jolpica commented Nov 18, 2024

Thanks for the suggestion, this is definitely something we'd be interested in doing in the future. Right now we're focused on data ingest for existing ergast compatible endpoints, but next year we hope to start implementing new endpoints / data such as this.

@jolpica jolpica added enhancement New feature or request data Related to the data returned labels Nov 18, 2024
@jolpica jolpica added this to the New API Endpoint Ideas milestone Feb 24, 2025
@MrBiscuit921
Copy link

I'm very bored right now so i thought i would start on this, i think the script will work, lmk if there are any issues or @jolpica if you share the json that matches your current import schema, i can get to implementing that.

script
output

@jolpica
Copy link
Owner

jolpica commented Mar 4, 2025

Thanks, completely missed this issue when implementing the other two.

the schema would be:

{
  "object_type": "Circuit",
  "foreign_keys": {},
  "objects": [
    { "reference": "<circuitId>", "country_code": "<country code here>"},
    ... 
  ]
}

@MrBiscuit921
Copy link

Thanks, completely missed this issue when implementing the other two.

the schema would be:

{
  "object_type": "Circuit",
  "foreign_keys": {},
  "objects": [
    { "reference": "<circuitId>", "country_code": "<country code here>"},
    ... 
  ]
}

script
output

@antoinedmns antoinedmns marked this as a duplicate of #156 Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Related to the data returned enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants