baseballquery


Namebaseballquery JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/jso8910/baseballquery
SummaryA library to query MLB stats including on a game level
upload_time2024-09-07 09:24:23
maintainerNone
docs_urlNone
authorJason R
requires_pythonNone
licenseMIT
keywords python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Baseball Query

It's a stathead replacement, plain and simple.

When you install this package and import it for the first time, it will download many GB of data from retrosheet. Eventually, it will be deleted, but you will get a total of 12 GB of data in the form of an hdf5 file. This is a lot of data, but it's necessary. This whole process (including calculating linear weights) can take upwards of half an hour so start running this in the background once you install it before you use it.

Not implemented (as of when I finish this):
- Park factors
- Full game stats (saves, holds, shutouts, etc.) for pitchers. This one is probably important
- GB%, LD%, FB%, and PU% will deviate from fangraphs due to differences in data and it being quite subjective. Also, Fangraphs FB is more similar to FB+PU so that's what I used in HR/FB% calculations.
    - This probably is impossible to fix
- With splits, ERA is pretty much nonsense. Just because, even if a pitcher leaves the game, they are credited with an earned run if a runner they left on base scores. Even if they aren't eligible for the split.
    - In general, it's not really possible to coherently calculate ERA for splits. For example: if two hits come against righties then a lefty hits a homer, scoring 3 runs, is the earned runs against righties 0? or 1? or 2? It's not really possible to say. So, if you set any significant splits which eliminate PAs (basically anything other than set_split and set_subdivision), ignore ERA.


Recipients of Retrosheet data are free to make any desired use of
the information, including (but not limited to) selling it,
giving it away, or producing a commercial product based upon the
data.  Retrosheet has one requirement for any such transfer of
data or product development, which is that the following
statement must appear prominently:

     The information used here was obtained free of
     charge from and is copyrighted by Retrosheet.  Interested
     parties may contact Retrosheet at "www.retrosheet.org".

Retrosheet makes no guarantees of accuracy for the information 
that is supplied. Much effort is expended to make our website 
as correct as possible, but Retrosheet shall not be held 
responsible for any consequences arising from the use of the 
material presented here. All information is subject to corrections 
as additional data are received. We are grateful to anyone who
discovers discrepancies and we appreciate learning of the details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jso8910/baseballquery",
    "name": "baseballquery",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python",
    "author": "Jason R",
    "author_email": "mail4jasonr@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5a/3e/55895189d0395e2612ff8a9c1a0bbf925ca0e9265120fb1c45e8c76587e7/baseballquery-0.0.3.tar.gz",
    "platform": null,
    "description": "# Baseball Query\n\nIt's a stathead replacement, plain and simple.\n\nWhen you install this package and import it for the first time, it will download many GB of data from retrosheet. Eventually, it will be deleted, but you will get a total of 12 GB of data in the form of an hdf5 file. This is a lot of data, but it's necessary. This whole process (including calculating linear weights) can take upwards of half an hour so start running this in the background once you install it before you use it.\n\nNot implemented (as of when I finish this):\n- Park factors\n- Full game stats (saves, holds, shutouts, etc.) for pitchers. This one is probably important\n- GB%, LD%, FB%, and PU% will deviate from fangraphs due to differences in data and it being quite subjective. Also, Fangraphs FB is more similar to FB+PU so that's what I used in HR/FB% calculations.\n    - This probably is impossible to fix\n- With splits, ERA is pretty much nonsense. Just because, even if a pitcher leaves the game, they are credited with an earned run if a runner they left on base scores. Even if they aren't eligible for the split.\n    - In general, it's not really possible to coherently calculate ERA for splits. For example: if two hits come against righties then a lefty hits a homer, scoring 3 runs, is the earned runs against righties 0? or 1? or 2? It's not really possible to say. So, if you set any significant splits which eliminate PAs (basically anything other than set_split and set_subdivision), ignore ERA.\n\n\nRecipients of Retrosheet data are free to make any desired use of\nthe information, including (but not limited to) selling it,\ngiving it away, or producing a commercial product based upon the\ndata.  Retrosheet has one requirement for any such transfer of\ndata or product development, which is that the following\nstatement must appear prominently:\n\n     The information used here was obtained free of\n     charge from and is copyrighted by Retrosheet.  Interested\n     parties may contact Retrosheet at \"www.retrosheet.org\".\n\nRetrosheet makes no guarantees of accuracy for the information \nthat is supplied. Much effort is expended to make our website \nas correct as possible, but Retrosheet shall not be held \nresponsible for any consequences arising from the use of the \nmaterial presented here. All information is subject to corrections \nas additional data are received. We are grateful to anyone who\ndiscovers discrepancies and we appreciate learning of the details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library to query MLB stats including on a game level",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/jso8910/baseballquery"
    },
    "split_keywords": [
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d96e07bfd9748c387a3ca8d7107e2d05326bd63b681550f9ba2083e1ff74554c",
                "md5": "764d9f40cf4d1ef58433fc6a60ab805b",
                "sha256": "0ed0fcfe26d8a1aeda5a5a8f88bc7072c0257b43c342e511eb4c41a7c5b7ad25"
            },
            "downloads": -1,
            "filename": "baseballquery-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "764d9f40cf4d1ef58433fc6a60ab805b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16213,
            "upload_time": "2024-09-07T09:24:21",
            "upload_time_iso_8601": "2024-09-07T09:24:21.744964Z",
            "url": "https://files.pythonhosted.org/packages/d9/6e/07bfd9748c387a3ca8d7107e2d05326bd63b681550f9ba2083e1ff74554c/baseballquery-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a3e55895189d0395e2612ff8a9c1a0bbf925ca0e9265120fb1c45e8c76587e7",
                "md5": "e14c4b9b118a73797360661c98e976c9",
                "sha256": "bcdcf1cc63c7dae39c72f1cb8184860d7b966a00e0f7b3dbac80a9be26a114d8"
            },
            "downloads": -1,
            "filename": "baseballquery-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e14c4b9b118a73797360661c98e976c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16579,
            "upload_time": "2024-09-07T09:24:23",
            "upload_time_iso_8601": "2024-09-07T09:24:23.394599Z",
            "url": "https://files.pythonhosted.org/packages/5a/3e/55895189d0395e2612ff8a9c1a0bbf925ca0e9265120fb1c45e8c76587e7/baseballquery-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 09:24:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jso8910",
    "github_project": "baseballquery",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "baseballquery"
}
        
Elapsed time: 0.36283s