Code Monkey home page Code Monkey logo

f1pystats's Introduction

F1PyStats

F1PyStats is an open-source Python3 package that provides Formula 1 data/statistics to developers. This package obtains Formula 1 data via the Ergast Developer API, and returns results in a pandas DataFrame format.

Installation

Prerequisite

The package uses Poetry as the primary dependency management tool. To install Poetry follow their official documentation at link

// Clone the repo
$ git clone https://github.com/alec-kr/F1PyStats.git

// Install dependecies using poetry
$ cd ../F1PyStats
$ poetry install --only main

// Build the package if you would to use it in other projects (https://python-poetry.org/docs/cli/#build)
poetry build

// Install built package (https://python-poetry.org/docs/cli/#add)
poetry add ../F1Pystats/dist/f1pystats-0.1.0.whl

Usage

# Import the package
import F1PyStats as fp

The package currently contains five functions

Function Description Returned Datatype
fp.driver_standings(year) Returns the driver standings for a particular year Pandas DataFrame
fp.constructor_standings(year) Returns the constructor standings for a specified year Pandas DataFrame
fp.race_winners(year) Returns the race winners for a specified year Pandas DataFrame
fp.race_table(year) Returns the race schedule for a specific year Pandas DataFrame
fp.lap_times(year, race_round, lap_number) Returns the lap times for a specific lap in a particular race Pandas DataFrame
fp.pit_stops(year, round, stop_number) Returns the pit stop info for a specific race/pit stop Pandas DataFrame

Contributions

  • Have a feature you would like to add? Feel free to create a PR ๐Ÿ˜„.
  • Spot an issue or bug? Please let us know by creating an issue. ๐Ÿ›

f1pystats's People

Contributors

alec-kr avatar arungrace88 avatar domheadroom avatar gauravkolekar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.