Skip to content

Commit f2ac527

Browse files
clarkdclaude
andcommitted
Add OpenF1 plugin
New community plugin for the free OpenF1 API (https://openf1.org). Indexes F1 meetings, sessions, and the current driver grid, with dashboards for session results, laps, pit stops, tyre stints, weather, race control, overtakes, and championship standings. No authentication required (public historical data). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent eb6d864 commit f2ac527

28 files changed

Lines changed: 1795 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"steps": [
3+
{
4+
"displayName": "Connect to OpenF1",
5+
"dataStream": { "name": "connectionCheck" },
6+
"required": true,
7+
"error": "Could not reach the OpenF1 API (https://api.openf1.org). Check your network connection or agent egress.",
8+
"success": "Connected to OpenF1 successfully."
9+
}
10+
]
11+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"name": "F1 Meeting",
4+
"sourceType": "F1 Meeting",
5+
"icon": "flag-checkered",
6+
"singular": "Meeting",
7+
"plural": "Meetings"
8+
},
9+
{
10+
"name": "F1 Session",
11+
"sourceType": "F1 Session",
12+
"icon": "stopwatch",
13+
"singular": "Session",
14+
"plural": "Sessions"
15+
},
16+
{
17+
"name": "F1 Driver",
18+
"sourceType": "F1 Driver",
19+
"icon": "helmet-safety",
20+
"singular": "Driver",
21+
"plural": "Drivers"
22+
}
23+
]
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "championshipDrivers",
3+
"displayName": "Championship Drivers",
4+
"description": "Current drivers' championship standings",
5+
"tags": [
6+
"Championship",
7+
"Driver"
8+
],
9+
"baseDataSourceName": "httpRequestUnscoped",
10+
"config": {
11+
"httpMethod": "get",
12+
"endpointPath": "/championship_drivers",
13+
"getArgs": [
14+
{
15+
"key": "session_key",
16+
"value": "latest"
17+
}
18+
]
19+
},
20+
"matches": "none",
21+
"timeframes": false,
22+
"defaultShaping": {
23+
"sort": {
24+
"by": [
25+
[
26+
"position_current",
27+
"asc"
28+
]
29+
]
30+
}
31+
},
32+
"metadata": [
33+
{
34+
"name": "position_current",
35+
"displayName": "Position",
36+
"shape": "number",
37+
"role": "value"
38+
},
39+
{
40+
"name": "driver_number",
41+
"displayName": "Driver #",
42+
"shape": "number",
43+
"role": "label"
44+
},
45+
{
46+
"name": "driverName",
47+
"displayName": "Driver",
48+
"sourceId": "driver_number",
49+
"sourceType": "F1 Driver",
50+
"objectPropertyPath": "name"
51+
},
52+
{
53+
"name": "driverTeam",
54+
"displayName": "Team",
55+
"sourceId": "driver_number",
56+
"sourceType": "F1 Driver",
57+
"objectPropertyPath": "team_name"
58+
},
59+
{
60+
"name": "points_current",
61+
"displayName": "Points",
62+
"shape": "number"
63+
},
64+
{
65+
"name": "position_start",
66+
"displayName": "Prev Position",
67+
"shape": "number"
68+
},
69+
{
70+
"name": "points_start",
71+
"displayName": "Prev Points",
72+
"shape": "number"
73+
}
74+
]
75+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "championshipTeams",
3+
"displayName": "Championship Teams",
4+
"description": "Current constructors' championship standings, one row per team",
5+
"tags": ["Championship", "Results"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "/championship_teams",
10+
"getArgs": [{ "key": "session_key", "value": "latest" }]
11+
},
12+
"matches": "none",
13+
"timeframes": false,
14+
"defaultShaping": { "sort": { "by": [["position_current", "asc"]] } },
15+
"metadata": [
16+
{ "name": "position_current", "displayName": "Position", "shape": "number", "role": "value" },
17+
{ "name": "team_name", "displayName": "Team", "shape": "string", "role": "label" },
18+
{ "name": "points_current", "displayName": "Points", "shape": "number" },
19+
{ "name": "position_start", "displayName": "Prev Position", "shape": "number" },
20+
{ "name": "points_start", "displayName": "Prev Points", "shape": "number" }
21+
]
22+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "connectionCheck",
3+
"displayName": "Connection Check",
4+
"description": "Most recent session, used to confirm the OpenF1 API is reachable",
5+
"tags": ["Session"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "/sessions",
10+
"getArgs": [{ "key": "session_key", "value": "latest" }]
11+
},
12+
"matches": "none",
13+
"timeframes": false,
14+
"visibility": { "type": "hidden" },
15+
"metadata": [
16+
{ "name": "session_key", "displayName": "Session Key", "shape": "string", "role": "id" },
17+
{ "name": "session_name", "displayName": "Session", "shape": "string", "role": "label" },
18+
{ "name": "country_name", "displayName": "Country", "shape": "string" },
19+
{ "name": "year", "displayName": "Year", "shape": "number" }
20+
]
21+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "drivers",
3+
"displayName": "Drivers",
4+
"description": "Current Formula 1 drivers with car number, team, nationality and headshot, from the latest session",
5+
"tags": ["Driver"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "/drivers",
10+
"getArgs": [{ "key": "session_key", "value": "latest" }]
11+
},
12+
"matches": "none",
13+
"timeframes": false,
14+
"visibility": { "type": "hidden" },
15+
"metadata": [
16+
{ "name": "driver_number", "displayName": "Number", "shape": "number", "role": "id" },
17+
{ "name": "full_name", "displayName": "Driver", "shape": "string", "role": "label" },
18+
{ "name": "name_acronym", "displayName": "Code", "shape": "string" },
19+
{ "name": "team_name", "displayName": "Team", "shape": "string" },
20+
{ "name": "team_colour", "displayName": "Team Colour", "shape": "string" },
21+
{ "name": "country_code", "displayName": "Country", "shape": "string" },
22+
{ "name": "headshot_url", "displayName": "Headshot", "shape": "url" }
23+
]
24+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"name": "laps",
3+
"displayName": "Laps",
4+
"description": "Lap-by-lap timing for each driver in a session",
5+
"tags": [
6+
"Session",
7+
"Laps"
8+
],
9+
"baseDataSourceName": "httpRequestScopedSingle",
10+
"config": {
11+
"httpMethod": "get",
12+
"endpointPath": "/laps",
13+
"getArgs": [
14+
{
15+
"key": "session_key",
16+
"value": "{{object.rawId}}"
17+
}
18+
]
19+
},
20+
"matches": {
21+
"sourceType": {
22+
"type": "oneOf",
23+
"values": [
24+
"F1 Session"
25+
]
26+
}
27+
},
28+
"timeframes": false,
29+
"defaultShaping": {
30+
"sort": {
31+
"by": [
32+
[
33+
"lap_number",
34+
"asc"
35+
]
36+
]
37+
}
38+
},
39+
"metadata": [
40+
{
41+
"name": "date_start",
42+
"displayName": "Lap Start",
43+
"shape": "date",
44+
"role": "timestamp"
45+
},
46+
{
47+
"name": "driver_number",
48+
"displayName": "Driver Number",
49+
"shape": "number",
50+
"role": "label"
51+
},
52+
{
53+
"name": "driverName",
54+
"displayName": "Driver",
55+
"sourceId": "driver_number",
56+
"sourceType": "F1 Driver",
57+
"objectPropertyPath": "name"
58+
},
59+
{
60+
"name": "lap_number",
61+
"displayName": "Lap",
62+
"shape": "number"
63+
},
64+
{
65+
"name": "lap_duration",
66+
"displayName": "Lap Time",
67+
"shape": "seconds",
68+
"role": "value"
69+
},
70+
{
71+
"name": "duration_sector_1",
72+
"displayName": "Sector 1",
73+
"shape": "seconds"
74+
},
75+
{
76+
"name": "duration_sector_2",
77+
"displayName": "Sector 2",
78+
"shape": "seconds"
79+
},
80+
{
81+
"name": "duration_sector_3",
82+
"displayName": "Sector 3",
83+
"shape": "seconds"
84+
},
85+
{
86+
"name": "i1_speed",
87+
"displayName": "Speed I1 (km/h)",
88+
"shape": "number"
89+
},
90+
{
91+
"name": "i2_speed",
92+
"displayName": "Speed I2 (km/h)",
93+
"shape": "number"
94+
},
95+
{
96+
"name": "st_speed",
97+
"displayName": "Speed Trap (km/h)",
98+
"shape": "number"
99+
},
100+
{
101+
"name": "is_pit_out_lap",
102+
"displayName": "Pit Out Lap",
103+
"shape": "boolean"
104+
}
105+
]
106+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "meetingSessions",
3+
"displayName": "Meeting Sessions",
4+
"description": "Sessions that make up a race weekend",
5+
"tags": ["Session"],
6+
"baseDataSourceName": "httpRequestScopedSingle",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "/sessions",
10+
"getArgs": [{ "key": "meeting_key", "value": "{{object.rawId}}" }]
11+
},
12+
"matches": { "sourceType": { "type": "oneOf", "values": ["F1 Meeting"] } },
13+
"timeframes": false,
14+
"defaultShaping": { "sort": { "by": [["date_start", "asc"]] } },
15+
"metadata": [
16+
{
17+
"name": "session_name",
18+
"displayName": "Session",
19+
"shape": "string",
20+
"role": "label",
21+
"sourceId": "session_key",
22+
"sourceType": "F1 Session"
23+
},
24+
{ "name": "session_type", "displayName": "Type", "shape": "string" },
25+
{ "name": "date_start", "displayName": "Start", "shape": "date", "role": "timestamp" },
26+
{ "name": "date_end", "displayName": "End", "shape": "date" },
27+
{ "name": "session_key", "displayName": "Session Key", "shape": "number", "visible": false }
28+
]
29+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "meetings",
3+
"displayName": "Meetings",
4+
"description": "Formula 1 race weekends with circuit, country and dates",
5+
"tags": ["Meeting"],
6+
"baseDataSourceName": "httpRequestUnscoped",
7+
"config": {
8+
"httpMethod": "get",
9+
"endpointPath": "/meetings"
10+
},
11+
"matches": "none",
12+
"timeframes": false,
13+
"visibility": { "type": "hidden" },
14+
"metadata": [
15+
{ "name": "meeting_key", "displayName": "Meeting Key", "shape": "string", "role": "id" },
16+
{ "name": "meeting_name", "displayName": "Meeting", "shape": "string" },
17+
{ "name": "objectName", "displayName": "Name", "shape": "string", "role": "label", "computed": true, "valueExpression": "{{ $['meeting_name'] }} {{ $['year'] }}" },
18+
{ "name": "meeting_official_name", "displayName": "Official Name", "shape": "string" },
19+
{ "name": "year", "displayName": "Year", "shape": "number" },
20+
{ "name": "country_name", "displayName": "Country", "shape": "string" },
21+
{ "name": "country_code", "displayName": "Country Code", "shape": "string" },
22+
{ "name": "location", "displayName": "Location", "shape": "string" },
23+
{ "name": "circuit_short_name", "displayName": "Circuit", "shape": "string" },
24+
{ "name": "circuit_type", "displayName": "Circuit Type", "shape": "string" },
25+
{ "name": "date_start", "displayName": "Start", "shape": "date" },
26+
{ "name": "date_end", "displayName": "End", "shape": "date" }
27+
]
28+
}

0 commit comments

Comments
 (0)