duckstatsbomb


Nameduckstatsbomb JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA data parser for StatsBomb soccer data using duckdb
upload_time2024-09-23 16:42:34
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords football soccer statsbomb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # duckstatsbomb
A data parser for StatsBomb soccer data using duckdb

# StatsBomb open-data

### Competitions data
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_competitions = parser.competitions()
```

### Matches data
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_matches = parser.matches(2, 44)
```

### List valid data types
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
print(parser.valid_data())
```
The valid kind values are:
* 'lineup_players'
* 'events'
* 'frames'
* 'tactics',
* 'related_events'
* 'threesixty_frames'
* 'threesixty'

### Data from one match
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_lineup_players = parser.match_data(3749052, kind='lineup_players')
```

### Data from multiple matches
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_events = parser.match_data([3749052, 3749522], kind='events')
```

### Data from one competition
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_tactics = parser.competition_data(competition_id=16, kind='tactics')
```

### Data from one competition/season
```python
from duckstatsbomb import Sbopen
parser = Sbopen()
df_frames = parser.competition_data(competition_id=16, season_id=37, kind='frames')
```

# StatsBomb API

You can either provide the username and password as arguments (sb_username/ sb_password),
or set the SB_USERNAME and SB_PASSWORD environmental variables.

### Competitions data
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_competitions = parser.competitions()
```

### Matches data
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_matches = parser.matches(2, 44)
```

### List valid data types
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
print(parser.valid_data())
```
The valid kind values are:
* 'lineup_players'
* 'events'
* 'frames'
* 'tactics',
* 'related_events'
* 'threesixty_frames'
* 'threesixty',
* 'lineup_events'
* 'lineup_formations'
* 'lineup_positions',
* 'threesixty_visible_count'
* 'threesixty_visible_distance'

### Data from one match
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_lineup_players = parser.match_data(3749052, kind='lineup_players')
```

### Data from multiple matches
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_events = parser.match_data([3749052, 3749522], kind='events')
```

### Data from one competition
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_tactics = parser.competition_data(competition_id=16, kind='tactics')
```

### Data from one competition/season
```python
from duckstatsbomb import Sbapi
parser = Sbapi()
df_frames = parser.competition_data(competition_id=16, season_id=37, kind='frames')
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "duckstatsbomb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "football, soccer, statsbomb",
    "author": null,
    "author_email": "Andrew Rowlinson <rowlinsonandy@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/4b/99/9c3097261401073db23f03155aa8a7c6a929f9a804ea87fe01cee13a356b/duckstatsbomb-0.1.0.tar.gz",
    "platform": null,
    "description": "# duckstatsbomb\nA data parser for StatsBomb soccer data using duckdb\n\n# StatsBomb open-data\n\n### Competitions data\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_competitions = parser.competitions()\n```\n\n### Matches data\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_matches = parser.matches(2, 44)\n```\n\n### List valid data types\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\nprint(parser.valid_data())\n```\nThe valid kind values are:\n* 'lineup_players'\n* 'events'\n* 'frames'\n* 'tactics',\n* 'related_events'\n* 'threesixty_frames'\n* 'threesixty'\n\n### Data from one match\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_lineup_players = parser.match_data(3749052, kind='lineup_players')\n```\n\n### Data from multiple matches\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_events = parser.match_data([3749052, 3749522], kind='events')\n```\n\n### Data from one competition\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_tactics = parser.competition_data(competition_id=16, kind='tactics')\n```\n\n### Data from one competition/season\n```python\nfrom duckstatsbomb import Sbopen\nparser = Sbopen()\ndf_frames = parser.competition_data(competition_id=16, season_id=37, kind='frames')\n```\n\n# StatsBomb API\n\nYou can either provide the username and password as arguments (sb_username/ sb_password),\nor set the SB_USERNAME and SB_PASSWORD environmental variables.\n\n### Competitions data\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_competitions = parser.competitions()\n```\n\n### Matches data\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_matches = parser.matches(2, 44)\n```\n\n### List valid data types\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\nprint(parser.valid_data())\n```\nThe valid kind values are:\n* 'lineup_players'\n* 'events'\n* 'frames'\n* 'tactics',\n* 'related_events'\n* 'threesixty_frames'\n* 'threesixty',\n* 'lineup_events'\n* 'lineup_formations'\n* 'lineup_positions',\n* 'threesixty_visible_count'\n* 'threesixty_visible_distance'\n\n### Data from one match\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_lineup_players = parser.match_data(3749052, kind='lineup_players')\n```\n\n### Data from multiple matches\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_events = parser.match_data([3749052, 3749522], kind='events')\n```\n\n### Data from one competition\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_tactics = parser.competition_data(competition_id=16, kind='tactics')\n```\n\n### Data from one competition/season\n```python\nfrom duckstatsbomb import Sbapi\nparser = Sbapi()\ndf_frames = parser.competition_data(competition_id=16, season_id=37, kind='frames')\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A data parser for StatsBomb soccer data using duckdb",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com/andrewRowlinson/duckstatsbomb/blob/main/README.md",
        "Issues": "https://github.com/andrewRowlinson/duckstatsbomb/issues",
        "Source": "https://github.com/andrewRowlinson/duckstatsbomb"
    },
    "split_keywords": [
        "football",
        " soccer",
        " statsbomb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9a799a56f76861da8c43a0fafa5c7ea313e0711661fc2f142c508c166b818d1",
                "md5": "1f5c55ed8f12912dfb12e18bbaaa392e",
                "sha256": "f840adf8a2597aa0ae4896b00edf15f4170d39e5f39f6b18e5da2ebc6c747771"
            },
            "downloads": -1,
            "filename": "duckstatsbomb-0.1.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f5c55ed8f12912dfb12e18bbaaa392e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 26766,
            "upload_time": "2024-09-23T16:42:32",
            "upload_time_iso_8601": "2024-09-23T16:42:32.244802Z",
            "url": "https://files.pythonhosted.org/packages/e9/a7/99a56f76861da8c43a0fafa5c7ea313e0711661fc2f142c508c166b818d1/duckstatsbomb-0.1.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b999c3097261401073db23f03155aa8a7c6a929f9a804ea87fe01cee13a356b",
                "md5": "121d4cb02d54dbbd8323a6366df58b00",
                "sha256": "87ddfbdc097c5c52cd1dd1722095ec19e782d34d2abb59aae000b10dfa152755"
            },
            "downloads": -1,
            "filename": "duckstatsbomb-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "121d4cb02d54dbbd8323a6366df58b00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14258,
            "upload_time": "2024-09-23T16:42:34",
            "upload_time_iso_8601": "2024-09-23T16:42:34.336694Z",
            "url": "https://files.pythonhosted.org/packages/4b/99/9c3097261401073db23f03155aa8a7c6a929f9a804ea87fe01cee13a356b/duckstatsbomb-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-23 16:42:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andrewRowlinson",
    "github_project": "duckstatsbomb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "duckstatsbomb"
}
        
Elapsed time: 0.36687s