https://github.com/spwareing/f1_statistics
Azure Data Studio notebook of F1 Statistics using the Erdgast API
https://github.com/spwareing/f1_statistics
azure azuresql azuresqldb data-studio formula1 sql t-sql
Last synced: 3 months ago
JSON representation
Azure Data Studio notebook of F1 Statistics using the Erdgast API
- Host: GitHub
- URL: https://github.com/spwareing/f1_statistics
- Owner: SPWareing
- License: gpl-3.0
- Created: 2021-11-17T08:53:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-27T15:24:54.000Z (over 3 years ago)
- Last Synced: 2025-01-20T06:35:23.934Z (5 months ago)
- Topics: azure, azuresql, azuresqldb, data-studio, formula1, sql, t-sql
- Language: Jupyter Notebook
- Homepage:
- Size: 5.85 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
F1 Statistics
As an alternative to generating statistics using Python and Pandas, this notebook is driven by
SQL queries using the [Erdgast API](http://ergast.com/mrd/) and [Azure Data Studio](https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15). As such the notebook needs to be viewed in Azure Data Studio as only raw code will be visible on GitHub.For a quick view there is my article on [LinkedIn](https://www.linkedin.com/pulse/asking-different-questions-f1-stewart-wareing/)
This database has been built using [](https://azure.microsoft.com/) cloud services. It is an Azure SQL Database and forms part of my study for the DP 300 Exam. All queries are written in T-SQL
![]()
Photo by [Abed Ismail](https://unsplash.com/@abedismail?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/formula-1?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
---
##
Statistics List
1. Who is the most sucessful driver in a season?
2. What about the most successful constructor
3. Championships thrown away on the final race
4. Winning from the back
5. Percentage Likelihood of Winning By Qualifying Position
6. The effect of the undercut
7. It's all about consistency
8. The lack of consistency
9. Championships by Country; including most chamionships by a driver
---
## Example SQL Code:
~~~
SELECT grid as [Grid Position],
ROUND(CAST(count(*) AS FLOAT)/ (SELECT count(*) from form.results WHERE position = 1)*100,2) AS [Percentage Chance]
FROM form.results
WHERE position = 1
GROUP BY grid
ORDER by grid ASC;
~~~
---
## **TO DO LIST**- [X] Add SQL Scripts Folder
- [ ] Python Notebook---
