https://github.com/marksmurphy/fantasy-f1-analyzer
A command line utility which retrieves the latest Fantasy F1 results and analyses all possible constructor and driver combinations and suggests an optimum Fantasy F1 Team.
https://github.com/marksmurphy/fantasy-f1-analyzer
Last synced: 4 months ago
JSON representation
A command line utility which retrieves the latest Fantasy F1 results and analyses all possible constructor and driver combinations and suggests an optimum Fantasy F1 Team.
- Host: GitHub
- URL: https://github.com/marksmurphy/fantasy-f1-analyzer
- Owner: markSmurphy
- Created: 2022-06-01T09:39:48.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T03:47:51.000Z (about 2 years ago)
- Last Synced: 2025-01-24T06:46:53.440Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/fantasy-f1-analyzer
- Size: 3.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Fantasy F1 Analyser


[](https://www.codacy.com/gh/markSmurphy/fantasy-f1-analyzer/dashboard?utm_source=github.com&utm_medium=referral&utm_content=markSmurphy/fantasy-f1-analyzer&utm_campaign=Badge_Grade)







A command line utility which retrieves the latest Fantasy F1 results and analyses all possible constructor and driver combinations and suggests an optimum Fantasy F1 Team.

## Overview
I started playing Fantasy F1 for the first time this season (2022) and, like most players, I'd juggle my team around before each race weekend's qualifying session. There were a few obvious front-runners but the rest of my team selection lacked any satisfactory analysis, and instead was borne from drivers I'd like to see do well who fell inside the budget cap restrictions.
So I wrote this tool.
The **Fantasy F1 Analyser** consumes the Fantasy F1 League's public APIs to retrieve the latest driver & constructor standings. It then works through >150,000 permutations of possible Fantasy F1 teams and tallies their score. The team combination(s) with the highest points tally to date (and which falls with the budget cap) are reported back.
If multiple team combinations result the same highest points tally then they are all reported back. The current qualifying and finishing streaks are also reported in case that helps your selection.

### Disclaimer
This tool is not affiliated with the Fantasy F1 League. It is a personal project I've open sourced.
This tool is not a predictor; it uses historical data to retrospectively suggest what would have been a optimal team selection to this point, and is intended for use a baseline for your own team selection.
## Installation
Install globally via `npm` using:
```shell
npm install -g fantasy-f1-analyzer
```
## Usage
Start an analysis via the command:
```shell
ff1 [options]
```
## Options
There are a few command line options you can use:
```text
--export Exports the results to the specified filename
--year Override the default season. Default: 2022
--budget Override the default budget cap. Default: 100
--worst Displays the team with the worst points tally instead of the best
--progressinterval Update analysis progress every nth team. Default: 5
--verbose Enables verbose output.
--debug Enables debugging output.
--no-color Switches off colour output.
--version Display version number.
--help Display help screen.
```
### export
`--export `
The **export** option allows you write the results to the specific `filename`. The output format the `CSV` and `filename` will be automatically appended with `.csv` if needed.
### year
`--year `
Specifies the season's year in case there's a need to override the default.
Default: The current date's four digit year (e.g. `2022`).
### budget
`--budget `
Specifies the budget cap in case there's a need to override the default.
Default: `100`.
### worst
`--worst` displays the Fantasy F1 team with the worst points tally, instead of displaying the best.
This might be more interesting than actually useful.

### progress interval
`--progressinterval `
Update the analysis progress spinner every *n*th team that's analysed. The higher the number `n`, the less frequently the screen is updated and the faster the analysis completes.
Default: `5` (updates progress spinner for each team that's analysed).
### Verbose
`--verbose`
Enables verbose output.
Default: `false`
### Debug
`--debug`
Enables debugging output.
Default: `false`
### No-color
`--no-color`
Switches off colour output.
### Version
`--version`
Displays the version number.
### Help
`--help`
Displays the help screen.
## Change Log
The **Change Log** can be found [here](CHANGELOG.md)