mplsoccer


Namemplsoccer JSON
Version 1.2.4 PyPI version JSON
download
home_pageNone
SummaryFootball pitch plotting library for matplotlib
upload_time2024-03-14 19:32:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords football matplotlib mplsoccer soccer visualization
VCS
bugtrack_url
requirements matplotlib numpy seaborn scipy pandas requests Pillow
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![mplsoccer logo](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/source/logo.png)

**mplsoccer is a Python library for plotting soccer/football charts in Matplotlib 
and loading StatsBomb open-data.**

---

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install mplsoccer.

```bash
pip install mplsoccer
```

Or install via [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).

```bash
conda install -c conda-forge mplsoccer
```

---

## Docs

Read more in the [docs](https://mplsoccer.readthedocs.io/) and see some 
examples in our [gallery](https://mplsoccer.readthedocs.io/en/latest/gallery/index.html).

---

## Quick start

Plot a StatsBomb pitch

```python
from mplsoccer import Pitch
import matplotlib.pyplot as plt
pitch = Pitch(pitch_color='grass', line_color='white', stripe=True)
fig, ax = pitch.draw()
plt.show()
```
![mplsoccer pitch](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/quick_start.png)

Plot a Radar
```python
from mplsoccer import Radar
import matplotlib.pyplot as plt
radar = Radar(params=['Agility', 'Speed', 'Strength'], min_range=[0, 0, 0], max_range=[10, 10, 10])
fig, ax = radar.setup_axis()
rings_inner = radar.draw_circles(ax=ax, facecolor='#ffb2b2', edgecolor='#fc5f5f')
values = [5, 3, 10]
radar_poly, rings, vertices = radar.draw_radar(values, ax=ax,
                                               kwargs_radar={'facecolor': '#00f2c1', 'alpha': 0.6}, 
                                               kwargs_rings={'facecolor': '#d80499', 'alpha': 0.6})
range_labels = radar.draw_range_labels(ax=ax)
param_labels = radar.draw_param_labels(ax=ax)
plt.show()
```
![mplsoccer radar](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/quick_start_radar.png)

---

## What is mplsoccer?
In mplsoccer, you can:

- plot football/soccer pitches on nine different pitch types
- plot radar charts
- plot Nightingale/pizza charts
- plot bumpy charts for showing changes over time
- plot arrows, heatmaps, hexbins, scatter, and (comet) lines
- load StatsBomb data as a tidy dataframe
- standardize pitch coordinates into a single format

I hope mplsoccer helps you make insightful graphics faster,
so you don't have to build charts from scratch.

---

## Want to help?
I would love the community to get involved in mplsoccer.
Take a look at our [open-issues](https://github.com/andrewRowlinson/mplsoccer/issues) 
for inspiration.
Please get in touch at rowlinsonandy@gmail.com or 
[@numberstorm](https://twitter.com/numberstorm) on Twitter to find out more.

---

## Recent changes

View the [changelog](https://github.com/andrewRowlinson/mplsoccer/blob/master/CHANGELOG.md) 
for a full list of the recent changes to mplsoccer.

---

## Inspiration

mplsoccer was inspired by:
- [Peter McKeever](https://petermckeever.com/) heavily inspired the API design
- [ggsoccer](https://github.com/Torvaney/ggsoccer) influenced the design and Standardizer
- [lastrow's](https://twitter.com/lastrowview) legendary animations
- [fcrstats'](https://twitter.com/FC_rstats) tutorials for using football data
- [fcpython's](https://fcpython.com/) Python tutorials for using football data
- [Karun Singh's](https://twitter.com/karun1710) expected threat (xT) visualizations
- [StatsBomb's](https://statsbomb.com/) great visual design and free open-data
- John Burn-Murdoch's [tweet](https://twitter.com/jburnmurdoch/status/1057907312030085120) got me 
interested in football analytics

---

## License

[MIT](https://choosealicense.com/licenses/mit)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mplsoccer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "football,matplotlib,mplsoccer,soccer,visualization",
    "author": null,
    "author_email": "Andrew Rowlinson <rowlinsonandy@gmail.com>, Anmol Durgapal <slothfulwave10@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/04/b8/c07a74b11a70ffd2947414567a3549378326fd21d0ae7a0772114523f28c/mplsoccer-1.2.4.tar.gz",
    "platform": null,
    "description": "![mplsoccer logo](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/source/logo.png)\n\n**mplsoccer is a Python library for plotting soccer/football charts in Matplotlib \nand loading StatsBomb open-data.**\n\n---\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install mplsoccer.\n\n```bash\npip install mplsoccer\n```\n\nOr install via [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).\n\n```bash\nconda install -c conda-forge mplsoccer\n```\n\n---\n\n## Docs\n\nRead more in the [docs](https://mplsoccer.readthedocs.io/) and see some \nexamples in our [gallery](https://mplsoccer.readthedocs.io/en/latest/gallery/index.html).\n\n---\n\n## Quick start\n\nPlot a StatsBomb pitch\n\n```python\nfrom mplsoccer import Pitch\nimport matplotlib.pyplot as plt\npitch = Pitch(pitch_color='grass', line_color='white', stripe=True)\nfig, ax = pitch.draw()\nplt.show()\n```\n![mplsoccer pitch](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/quick_start.png)\n\nPlot a Radar\n```python\nfrom mplsoccer import Radar\nimport matplotlib.pyplot as plt\nradar = Radar(params=['Agility', 'Speed', 'Strength'], min_range=[0, 0, 0], max_range=[10, 10, 10])\nfig, ax = radar.setup_axis()\nrings_inner = radar.draw_circles(ax=ax, facecolor='#ffb2b2', edgecolor='#fc5f5f')\nvalues = [5, 3, 10]\nradar_poly, rings, vertices = radar.draw_radar(values, ax=ax,\n                                               kwargs_radar={'facecolor': '#00f2c1', 'alpha': 0.6}, \n                                               kwargs_rings={'facecolor': '#d80499', 'alpha': 0.6})\nrange_labels = radar.draw_range_labels(ax=ax)\nparam_labels = radar.draw_param_labels(ax=ax)\nplt.show()\n```\n![mplsoccer radar](https://raw.githubusercontent.com/andrewRowlinson/mplsoccer/main/docs/quick_start_radar.png)\n\n---\n\n## What is mplsoccer?\nIn mplsoccer, you can:\n\n- plot football/soccer pitches on nine different pitch types\n- plot radar charts\n- plot Nightingale/pizza charts\n- plot bumpy charts for showing changes over time\n- plot arrows, heatmaps, hexbins, scatter, and (comet) lines\n- load StatsBomb data as a tidy dataframe\n- standardize pitch coordinates into a single format\n\nI hope mplsoccer helps you make insightful graphics faster,\nso you don't have to build charts from scratch.\n\n---\n\n## Want to help?\nI would love the community to get involved in mplsoccer.\nTake a look at our [open-issues](https://github.com/andrewRowlinson/mplsoccer/issues) \nfor inspiration.\nPlease get in touch at rowlinsonandy@gmail.com or \n[@numberstorm](https://twitter.com/numberstorm) on Twitter to find out more.\n\n---\n\n## Recent changes\n\nView the [changelog](https://github.com/andrewRowlinson/mplsoccer/blob/master/CHANGELOG.md) \nfor a full list of the recent changes to mplsoccer.\n\n---\n\n## Inspiration\n\nmplsoccer was inspired by:\n- [Peter McKeever](https://petermckeever.com/) heavily inspired the API design\n- [ggsoccer](https://github.com/Torvaney/ggsoccer) influenced the design and Standardizer\n- [lastrow's](https://twitter.com/lastrowview) legendary animations\n- [fcrstats'](https://twitter.com/FC_rstats) tutorials for using football data\n- [fcpython's](https://fcpython.com/) Python tutorials for using football data\n- [Karun Singh's](https://twitter.com/karun1710) expected threat (xT) visualizations\n- [StatsBomb's](https://statsbomb.com/) great visual design and free open-data\n- John Burn-Murdoch's [tweet](https://twitter.com/jburnmurdoch/status/1057907312030085120) got me \ninterested in football analytics\n\n---\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Football pitch plotting library for matplotlib",
    "version": "1.2.4",
    "project_urls": {
        "Documentation": "https://mplsoccer.readthedocs.io",
        "Issues": "https://github.com/andrewRowlinson/mplsoccer/issues",
        "Source": "https://github.com/andrewRowlinson/mplsoccer"
    },
    "split_keywords": [
        "football",
        "matplotlib",
        "mplsoccer",
        "soccer",
        "visualization"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2e642f7ca21b33d0bf9fe48a65103782e7b14b412efb7e8bac5ecccf063d0dd4",
                "md5": "010d1d495d11395e708999e77f0aeb1c",
                "sha256": "5c88f19a2fe8876ff4ddd12c0723cfd891d430d3437817d8dbd668834279cb1f"
            },
            "downloads": -1,
            "filename": "mplsoccer-1.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "010d1d495d11395e708999e77f0aeb1c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 79390,
            "upload_time": "2024-03-14T19:32:57",
            "upload_time_iso_8601": "2024-03-14T19:32:57.037765Z",
            "url": "https://files.pythonhosted.org/packages/2e/64/2f7ca21b33d0bf9fe48a65103782e7b14b412efb7e8bac5ecccf063d0dd4/mplsoccer-1.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "04b8c07a74b11a70ffd2947414567a3549378326fd21d0ae7a0772114523f28c",
                "md5": "8e9b16603ab435768aefb79261818ae1",
                "sha256": "0d4412f0dd6cfd3575fe8ed32fd19693529b6b2168ad45550fdab8c5ae52ccbb"
            },
            "downloads": -1,
            "filename": "mplsoccer-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "8e9b16603ab435768aefb79261818ae1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 817361,
            "upload_time": "2024-03-14T19:32:54",
            "upload_time_iso_8601": "2024-03-14T19:32:54.570669Z",
            "url": "https://files.pythonhosted.org/packages/04/b8/c07a74b11a70ffd2947414567a3549378326fd21d0ae7a0772114523f28c/mplsoccer-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-14 19:32:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andrewRowlinson",
    "github_project": "mplsoccer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.6"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "seaborn",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "Pillow",
            "specs": []
        }
    ],
    "lcname": "mplsoccer"
}
        
Elapsed time: 0.23486s