Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
weiranyu authored Dec 18, 2020
1 parent c2b86c2 commit 94b1d10
Showing 1 changed file with 73 additions and 9 deletions.
82 changes: 73 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,90 @@
# pyErgast

![](https://github.com/weiranyu/pyergast/workflows/build/badge.svg) [![codecov](https://codecov.io/gh/weiranyu/pyergast/branch/main/graph/badge.svg)](https://codecov.io/gh/weiranyu/pyergast) ![Release](https://github.com/weiranyu/pyergast/workflows/Release/badge.svg) [![Documentation Status](https://readthedocs.org/projects/pyergast/badge/?version=latest)](https://pyergast.readthedocs.io/en/latest/?badge=latest)
![](https://github.com/weiranyu/pyergast/workflows/build/badge.svg) [![codecov](https://codecov.io/gh/weiranyu/pyergast/branch/main/graph/badge.svg)](https://codecov.io/gh/weiranyu/pyergast) [![Documentation Status](https://readthedocs.org/projects/pyergast/badge/?version=latest)](https://pyergast.readthedocs.io/en/latest/?badge=latest)

Python pandas wrapper for the Ergast F1 API
Python pandas wrapper for the [Ergast F1 API](http://ergast.com/mrd/). This package allows easy access to the Ergast API for anyone wishing to conduct analysis on Formula 1 data.

## Installation

```bash
$ pip install -i https://test.pypi.org/simple/ pyergast
$ pip install pyergast
```

## Features

- TODO

## Dependencies

- TODO
python = "^3.7"
pandas = "^1.1.5"
requests = "^2.25.0"

## Usage

- TODO
### Obtaining Lists of Drivers
```python
# Dataframe of all drivers
pyergast.get_drivers()

# All the drivers who drove in 2020
pyergast.get_drivers(2020)

# All the drivers who drove in race 2 of 1969
pyergast.get_drivers(1969, 2)
```

### Obtaining Lists of Constructors
```python
# All constructors in the 2005 season
pyergast.get_constructors(2005)

# All circuits on the 1976 calendar
pyergast.get_circuits(1976)
```

### Obtaining Race and Qualifying Results
```python
# Last race result
pyergast.get_race_result()

# Qualifying result of the 3rd race of 1996
pyergast.get_qualifying_result(1996, 3)
```

### Obtaining Season Schedules
```python
# 1954 schedule
pyergast.get_schedule(1954)
```

### Drivers and Constructor Standings
```python
# 1978 end-of-year drivers standings
pyergast.driver_standings(1978)

# Constructor standings after the 16th race of 2007
pyergast.constructor_standings(2007, 16)
```

### ID Lookup
```python
# Find the ID for Emerson Fittipaldi
pyergast.find_driverid('Emerson', 'Fittipaldi')

# ID of Honda, note no case sensitivity
pyergast.find_constructorid('HONDA')

# Circuit ID for Catalunya, done 3 ways
pyergast.find_circuitid('Catalunya')
pyergast.find_circuitid('Barcelona')
pyergast.find_circuitid('Spain')
```

### Queries
```python
# Career snapshot of Jean Alesi
pyergast.query_driver('alesi')

# Snapshot of Jordan F1 Team
pyergast.query_constructor('jordan')
```

## Documentation

Expand Down

0 comments on commit 94b1d10

Please sign in to comment.