API initial Url: https://api.football-data.org/
API account name: [email protected]
API token information:
Please modify your client to use a HTTP header named "X-Auth-Token" with the underneath personal token as value. Your token: 12abfbaacdab48bc8948ed6061925e1f
----(Implementation)----
Create a visualization illustrating the comparative performance of soccer teams in 2020, 2021 and 2022 in the English Premier League. The KPIs they are looking for are derived from games won, drawn, lost, goals for and goals against, for the EPL teams in the desired timeframe.
python3 -m venv venv
source ./venv/bin/activatepip install -r requirements.txtpython main.pyWill run the script with default arguments
Or use --help to see usage
python main.py --help
usage: main.py [-h] [-s SEASONS] [-o OUTPUT_DIR]
options:
-h, --help show this help message and exit
-s SEASONS, --seasons SEASONS
A list of season years e.g:"['2020','2021','2022']"
-o OUTPUT_DIR, --output_dir OUTPUT_DIR
Specify the path of the output directory default = ./data/
python tests/test_csvs.pypython tests/test_season.pypython tests/test_club.pypython benchmark/time.pyIt will print out the number of seconds the script took to execute
project
│ README.md
│ main.py
│ requirements.txt
│ .env
│ .gitignore
│ .pre-commit-config.yaml
│ .pylintrc
└── benchmark
│ │ time.py
| | profiler.py
└── data
│ │ season-{year}.csv
│ │ ...
└── models
│ │ club.py
│ │ premier_league.py
│ │ season.py
└── repositories
│ │ season_repository.py
└── tests
│ │ test_club.py
│ │ test_csvs.py
│ │ test_season.py
└── utils
│ │ main_lib.py
└── venv
Execution time(s): 4.779070354
Profiling: python benchmark/profiler.py
https://google.github.io/styleguide/pyguide.html#316-naming
module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_CONSTANT_NAME, global_var_name, instance_var_name, function_parameter_name, local_var_name, query_proper_noun_for_thing, send_acronym_via_https.
To run the linter run
pylint main.pyOutput:
Your code has been rated at 10.00/10
To manually run pre-commit on all files run
pre-commit run --all-files- requests
- pylint
- python-dotenv
- pre-commit