Site
Home / Forum / Developers / Formula 1 Results

Formula 1 Results


Posted: 24 Feb 2018 21:38

edalex
Posts: 88
Joined: Mar 2017

Hi!
I've been thinking of presenting f1 event results on screen.
What I have as source:
1\t44\tUnited Kingdom Lewis Hamilton\tMercedes\t53\t1:15:32.312\t1\t25\r\n2\t77\tFinland Valtteri Bottas\tMercedes\t53\t+4.471\t4\t18\r\n3\t5\tGermany Sebastian Vettel\tFerrari\t53\t+36.317\t6\t15\r\n4\t3\tAustralia Daniel Ricciardo\tRed Bull Racing-TAG Heuer\t53\t+40.335\t16\t12\r\n5\t7\tFinland Kimi Räikkönen\tFerrari\t53\t+1:00.082\t5\t10\r\n6\t31\tFrance Esteban Ocon\tForce India-Mercedes\t53\t+1:11.528\t3\t8\r\n7\t18\tCanada Lance Stroll\tWilliams-Mercedes\t53\t+1:14.156\t2\t6\r\n8\t19\tBrazil Felipe Massa\tWilliams-Mercedes\t53\t+1:14.834\t7\t4\r\n9\t11\tMexico Sergio Pérez\tForce India-Mercedes\t53\t+1:15.276\t10\t2\r\n10\t33\tNetherlands Max Verstappen\tRed Bull Racing-TAG Heuer\t52\t+1 lap\t13\t1\r\n11\t20\tDenmark Kevin Magnussen\tHaas-Ferrari\t52\t+1 lap\t9\t\r\n12\t26\tRussia Daniil Kvyat\tToro Rosso\t52\t+1 lap\t8\t\r\n13\t27\tGermany Nico Hülkenberg\tRenault\t52\t+1 lap\t14\t\r\n14\t55\tSpain Carlos Sainz Jr.\tToro Rosso\t52\t+1 lap\t15\t\r\n15\t8\tFrance Romain Grosjean\tHaas-Ferrari\t52\t+1 lap\t20\t\r\n16\t94\tGermany Pascal Wehrlein\tSauber-Ferrari\t51\t+2 laps\t12\t\r\n171\t14\tSpain Fernando Alonso\tMcLaren-Honda\t50\tGearbox\t19\t\r\n181\t9\tSweden Marcus Ericsson\tSauber-Ferrari\t49\tGearbox\t11\t\r\nRet\t2\tBelgium Stoffel Vandoorne\tMcLaren-Honda\t33\tEngine\t18\t\r\nRet\t30\tUnited Kingdom Jolyon Palmer\tRenault\t29\tEngine\t17\t\r\n

I could easily split this data by \r\n to get single driver results and by \t to get position, team, driver number, and gap but not clean Driver name since it's mixed with Country. Could you update data to let me split them?
Or maybe you could even make api call for proper results with team id so I could place team logo not name in result to make it look more cool Maybe import data from erdgast? Currently splitted team name is givnig only partial result when I'm searching it by name in api.
I hope you could understand me.

Posted: 26 Feb 2018 12:06

zag
Posts: 1,558
Joined: Oct 2016

At the moment I have just copy and pasted it from the F1 site, what kinds of format would you like?

Maybe I can do something magical with the text processing on submission.

Posted: 26 Feb 2018 12:21

edalex
Posts: 88
Joined: Mar 2017

At the moment I have just copy and pasted it from the F1 site, what kinds of format would you like?

Maybe I can do something magical with the text processing on submission.

In ideal world it would be the same data but with addition of team id, driver id to make possible lookups after and small team badge/jercey and maybe country icons instead of text

Posted: 26 Feb 2018 12:25

zag
Posts: 1,558
Joined: Oct 2016

I think just showing the text block is the best we are going to get until I find an API that does the results nicely formatted.

EDIT: Check this at some point
https://ergast.com/api/f1/current/last/results

Posted: 26 Feb 2018 12:52

edalex
Posts: 88
Joined: Mar 2017

I think just showing the text block is the best we are going to get until I find an API that does the results nicely formatted.

Maybe split country and driver at least?
In this case I could lookup driver by name. I'm doing this in event resluts screen with splitted goal scorers info.


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 5 (Total: 5)