gandula


Namegandula JSON
Version 0.2.7 PyPI version JSON
download
home_pageNone
SummaryGandula grabs football data and puts it back into play.
upload_time2024-12-18 00:12:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 Thiago Costa Porto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords football pff sports analytics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div style="text-align: center; padding-bottom: 8px">
    <h1>gandula</h1>
    <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Ball_boy.jpg/1200px-Ball_boy.jpg" alt="gandula" />
</div>

---

`gandula` is a specialized internal Python library developed by the Sports Analytics lab at the Federal University of Minas Gerais (UFMG). Designed to streamline our research efforts, `gandula` currently offers tools to help handling PFF data.

Gandula is the word for ball boy in brazilian portuguese. It originates from the 1930s, from the word "gandulo", that in archaic portuguese means slacker/beggar.
Back in the 30s, the word started to be used to refer to vagabond boys, who didn't nothing else to do but watch football in the pitches in Rio. These "gandulas"
would help by bringing the kicked out balls. In 1939, the Clube de Regatas Vasco da Gama hired the argentinian stricker Bernardo Gandulla, who was known to bring
back the ball as a fair play. The `gandula` then got popularized over the country. In our `gandula`, the ball is the data, and the data scientists/analysts are
the stars of the game.

---

## Quick Start
### Installation
In progress...


### Installation (for development)
To get started with `gandula`, follow these steps:

Clone the repository:
```bash
git clone git@github.com:SALabUFMG/gandula.git
cd gandula
```

Create and setup the environment. You can use python virtual environments or conda:
```bash
python3 -m venv .venv
source .venv/bin/activate
```
or:
```bash
conda create --prefix .venv python=3.10
conda activate ./.venv
```

After activating your environment, install uv
Install Poetry
```bash
pip install uv
```

Use uv to install the package:
```bash
uv pip install .
```

You're almost good to go. If you want to contribute, you'll also need to install pre-commit hooks that we use to keep the code clean.
Install pre-commit hooks:
```bash
pip install pre-commit
pre-commit install
```
Run the pre-commit before every commit
```bash
pre-commit run
```


### Setup

If you have access to the PFF API, you can use our `PFF_GQL_Client`. Create the file `.env` and add your `PFF_API_KEY` there:
```bash
PFF_API_KEY='YOUR_PFF_API_KEY'
```

If you don't have to the PFF API, but have acess to the data as json, you may want to use `PFF_JSON_Client`.

---

## Usage

We have notebooks that showcase how you can use the package.

- `pff-load-from-json.ipynb`: shows how to get event data using the JSON client.
- `pff-data-transformation.ipynb`: shows how to get data using the GQL client.
- `pff-defensive-line-height.ipynb`: gives example on how to use tracking data to define the defensive line of a team.
- `pff-search.ipynb`: gets video to watch a certain event.
- `pff-tracking.ipynb`: shows how to plot a video using tracking data.
- `pff-events-withing-tracking-to-pandas.ipynb`: passes events within the data into pandas.

---

## Development

For those looking to contribute to `gandula`, please ensure you have followed the installation steps under Quick Start. For more detailed information on setting up your development environment and contributing, refer to our contributing guidelines.


---

## License & Copyright

The main image is "Ballkid at soccer, China" by [Micah Sittig](https://www.flickr.com/photos/35468134321@N01), licensed under CC BY 2.0


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gandula",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Thiago Costa Porto <thiagocostaporto@gmail.com>, Ricardo Furbino <ricardofurbino@gmail.com>",
    "keywords": "football, pff, sports analytics",
    "author": null,
    "author_email": "Thiago Costa Porto <thiagocostaporto@gmail.com>, Ricardo Furbino <ricardofurbino@gmail.com>, Luiza Chagas <luiza.chagas@dcc.ufmg.br>, Leo Martins <leomartins@dcc.ufmg.br>",
    "download_url": "https://files.pythonhosted.org/packages/78/b1/563ea2a96148a1b779a3194eddb4a5b79d2f6d66716a41e5e832aac59e4b/gandula-0.2.7.tar.gz",
    "platform": null,
    "description": "<div style=\"text-align: center; padding-bottom: 8px\">\n    <h1>gandula</h1>\n    <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Ball_boy.jpg/1200px-Ball_boy.jpg\" alt=\"gandula\" />\n</div>\n\n---\n\n`gandula` is a specialized internal Python library developed by the Sports Analytics lab at the Federal University of Minas Gerais (UFMG). Designed to streamline our research efforts, `gandula` currently offers tools to help handling PFF data.\n\nGandula is the word for ball boy in brazilian portuguese. It originates from the 1930s, from the word \"gandulo\", that in archaic portuguese means slacker/beggar.\nBack in the 30s, the word started to be used to refer to vagabond boys, who didn't nothing else to do but watch football in the pitches in Rio. These \"gandulas\"\nwould help by bringing the kicked out balls. In 1939, the Clube de Regatas Vasco da Gama hired the argentinian stricker Bernardo Gandulla, who was known to bring\nback the ball as a fair play. The `gandula` then got popularized over the country. In our `gandula`, the ball is the data, and the data scientists/analysts are\nthe stars of the game.\n\n---\n\n## Quick Start\n### Installation\nIn progress...\n\n\n### Installation (for development)\nTo get started with `gandula`, follow these steps:\n\nClone the repository:\n```bash\ngit clone git@github.com:SALabUFMG/gandula.git\ncd gandula\n```\n\nCreate and setup the environment. You can use python virtual environments or conda:\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\n```\nor:\n```bash\nconda create --prefix .venv python=3.10\nconda activate ./.venv\n```\n\nAfter activating your environment, install uv\nInstall Poetry\n```bash\npip install uv\n```\n\nUse uv to install the package:\n```bash\nuv pip install .\n```\n\nYou're almost good to go. If you want to contribute, you'll also need to install pre-commit hooks that we use to keep the code clean.\nInstall pre-commit hooks:\n```bash\npip install pre-commit\npre-commit install\n```\nRun the pre-commit before every commit\n```bash\npre-commit run\n```\n\n\n### Setup\n\nIf you have access to the PFF API, you can use our `PFF_GQL_Client`. Create the file `.env` and add your `PFF_API_KEY` there:\n```bash\nPFF_API_KEY='YOUR_PFF_API_KEY'\n```\n\nIf you don't have to the PFF API, but have acess to the data as json, you may want to use `PFF_JSON_Client`.\n\n---\n\n## Usage\n\nWe have notebooks that showcase how you can use the package.\n\n- `pff-load-from-json.ipynb`: shows how to get event data using the JSON client.\n- `pff-data-transformation.ipynb`: shows how to get data using the GQL client.\n- `pff-defensive-line-height.ipynb`: gives example on how to use tracking data to define the defensive line of a team.\n- `pff-search.ipynb`: gets video to watch a certain event.\n- `pff-tracking.ipynb`: shows how to plot a video using tracking data.\n- `pff-events-withing-tracking-to-pandas.ipynb`: passes events within the data into pandas.\n\n---\n\n## Development\n\nFor those looking to contribute to `gandula`, please ensure you have followed the installation steps under Quick Start. For more detailed information on setting up your development environment and contributing, refer to our contributing guidelines.\n\n\n---\n\n## License & Copyright\n\nThe main image is \"Ballkid at soccer, China\" by [Micah Sittig](https://www.flickr.com/photos/35468134321@N01), licensed under CC BY 2.0\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Thiago Costa Porto  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Gandula grabs football data and puts it back into play.",
    "version": "0.2.7",
    "project_urls": null,
    "split_keywords": [
        "football",
        " pff",
        " sports analytics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ce249dde81ffcb497252c267dc55ed86642533a210e263a9028e1c6b98e20e48",
                "md5": "7fc93fc8a8f7f624d3f19ddd29d40b74",
                "sha256": "0bed8e3fb414a29a0b501f5f1f81ada6b5312001d64f6dead240582eeb2f7d86"
            },
            "downloads": -1,
            "filename": "gandula-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fc93fc8a8f7f624d3f19ddd29d40b74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 49085,
            "upload_time": "2024-12-18T00:12:06",
            "upload_time_iso_8601": "2024-12-18T00:12:06.886933Z",
            "url": "https://files.pythonhosted.org/packages/ce/24/9dde81ffcb497252c267dc55ed86642533a210e263a9028e1c6b98e20e48/gandula-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "78b1563ea2a96148a1b779a3194eddb4a5b79d2f6d66716a41e5e832aac59e4b",
                "md5": "466a26f68e967d6bca9d1ca0d03a4dc6",
                "sha256": "462a74eebd93cc20aa8ad98e90ff4078b05388d56e2120d5185e482fc80e2614"
            },
            "downloads": -1,
            "filename": "gandula-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "466a26f68e967d6bca9d1ca0d03a4dc6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3041661,
            "upload_time": "2024-12-18T00:12:08",
            "upload_time_iso_8601": "2024-12-18T00:12:08.982714Z",
            "url": "https://files.pythonhosted.org/packages/78/b1/563ea2a96148a1b779a3194eddb4a5b79d2f6d66716a41e5e832aac59e4b/gandula-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 00:12:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gandula"
}
        
Elapsed time: 0.99726s