smog-usage-stats


Namesmog-usage-stats JSON
Version 1.0.3 PyPI version JSON
download
home_page
Summary
upload_time2023-12-11 17:22:57
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Stu-Gotz 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 pokemon usage pokemon showdown smogon
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # smog_usage_stats

A Python wrapper for interacting with Smogon's Pokemon Showdown usage stats data [found here](https://smogon.com/stats) and making it accessible in usable data structures.

## Quick Rundown

### Installing:

`pip install smog_usage_stats`

If your system uses `pip3` instead of `pip`, use that.

### How it all works

`BaseStatsSearch` -> Retrieves metagame usage statistics for non-Monotype metagames.

> `import smog_usage_stats.UsageStatsLookup as smogU`
>
> `baseSearch = smogU.BaseStatsSearch(2022, '06', 8, 'ou')`
>
> `results = baseSearch.search()`
>
> `print(results[0:5]) #truncated for brevity`
>
> [['rank', 'pokemon', 'usage_pct', 'raw_usage', 'raw_pct', 'real', 'real_pct', 'date', 'tier'], ['1', 'landorus-therian', '36.09686', '1001664', '34.149', '864772', '37.018', '2022-06', 'gen8ou'], ['2', 'ferrothorn', '22.27247', '641619', '21.874', '558654', '23.914', '2022-06', 'gen8ou'], ['3', 'dragapult', '18.41922', '532433', '18.152', '404433', '17.313', '2022-06', 'gen8ou'], ['4', 'heatran', '17.30305', '484022', '16.501', '405868', '17.374', '2022-06', 'gen8ou']]

`MonotypeStatsSearch` -> searches the monotype usage statistics

> `import smog_usage_stats.UsageStatsLookup as smogU`
>
> `monoSearch = smogU.MonotypeStatsSearch(2022, '06', 8, 'psychic')`
>
> `results = monoSearch.search()`
>
> `print(results[0:5]) #truncated for brevity`
>
> [['rank', 'pokemon', 'usage_pct', 'raw_usage', 'raw_pct', 'real', 'real_pct', 'date', 'tier'], ['1', 'tapulele', '60.25678', '8747', '56.924', '6738', '57.948', '2022-06', 'monopsychic'], ['2', 'victini', '52.14959', '7783', '50.651', '5705', '49.064', '2022-06', 'monopsychic'], ['3', 'slowbro', '45.34912', '6538', '42.548', '5106', '43.913', '2022-06', 'monopsychic'], ['4', 'mew', '35.13163', '5353', '34.837', '4247', '36.525', '2022-06', 'monopsychic']]

`BaseChaosSearch` -> searches the "Chaos" data contained within a certain month's stats
data

> `import smog_usage_stats.IndividualLookup as smogI`
>
> `baseChaos = smogI.BaseChaosSearch(year="2022", month="07", gen=8, tier="uu", name="SKARMORY")`
>
> `results = baseChaos.search()`
>
> {'Moves': {'': 41.8139391939, 'drillpeck': 375.2124391148, 'steelwing':
> 88.1257211624, 'rest': 8.5, 'autotomize': 33.465277165, 'steelbeam': 19.5408454477,
> 'sandtomb': 5.6841618934, 'xscissor': 37.8061940503, 'facade': 4.0263726246,
> 'attract': 0.2582478962, 'substitute': 64.9610651538, 'detect': 8.9170089777,
> 'tailwind': 208.4057975296, 'payback': 7.0, 'aircutter': 6.5070926138, 'aerialace':
> 11.8265479941, 'swordsdance': 178.0771715149, 'sleeptalk': 4.5, 'metalsound':
> 6.6025485193, 'airslash': 120.7352163352, 'toxic': 1946.992820672, 'swagger': 0.5,
> 'confide': 46.0, 'assurance': 0.5, ...}, 'Checks and Counters': ... (truncated) }

`MonotypeChaosSearch` -> searches the monotype chaos data contained within a certain
month's stats data

> `import smog_usage_stats.IndividualLookup as smogI`
>
> `monoChaos = smogI.MonotypeChaosSearch(year=2022, month="11", gen=9, typing="fairy", name="Gardevoir")`
>
> `result = monoChaos.search()`
>
> {'Moves': {'trick': 3.5, 'healingwish': 8.0, 'metronome': 7.0, 'futuresight': 7.0, 'mysticalfire': 4.0, 'calmmind': 15.5, 'psychic': 14.0, 'thunderbolt': 1.0, 'focusblast': 3.5, 'psyshock': 2.0, 'aurasphere': 2.5, 'nightshade': 1.0, 'moonblast': 16.0, 'willowisp': 0.5, 'shadowsneak': 1.0, 'energyball': 0.5, 'dazzlinggleam': 5.0}, 'Checks and Counters': {}, 'Abilities': {'synchronize': 3.5, 'trace': 19.5}, 'Teammates': {'Wigglytuff': 6.090649183, 'Grimmsnarl': 9.6031403892, 'Hatterene': 13.3468947861, 'Sylveon': 12.4625263815, 'Klefki': 10.8593859923, 'Dedenne': 10.3468947861, 'Azumarill': 11.6031403892, 'Florges': 1.0, 'Mimikyu': 17.5781579769}, 'usage': 0.5768955, 'Items': {'leftovers': 2.5, 'lifeorb': 1.0, 'choicescarf': 7.5, 'rockyhelmet': 4.0, 'wiseglasses': 1.0, 'adrenalineorb': 7.0}, 'Raw count': 46, 'Spreads': {'Timid:0/0/4/252/0/252': 4.0, 'Naughty:72/40/48/252/52/44': 7.0, 'Hasty:0/4/0/252/0/252': 1.0, 'Hardy:0/0/0/252/4/252': 4.0, 'Timid:4/0/0/252/0/252': 1.0, 'Timid:0/0/0/252/4/252': 6.0}, 'Happiness': {'255': 23.0}, 'Viability Ceiling': [0, 0, 0, 0]}

`IndividualStatsSearch` -> Retrieves usage stats from a single individual pokemon
from a certain month's stats data

> `import smog_usage_stats.IndividualLookup as smogI`
>
> `individualStats = smogI.IndividualStatsSearch(2022, "11", "8", "ou", "scIzor")`
>
> `results = individualStats.search()`
>
> {'rank': '44', 'pokemon': 'scizor', 'usage_pct': '3.50114', 'raw_usage': '67725', 'raw_pct': '3.565', 'real': '51565', 'real_pct': '3.440', 'date': '2022-11', 'tier': 'gen8ou'}

## Contributing:

If you find a bug, please [make an issue](https://github.com/Stu-Gotz/smog_usage_stats/issues).

If you would like to contribute, feel free to create a fork and submit a pull request.

## License

MIT License

Copyright (c) 2023 Stu-Gotz

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "smog-usage-stats",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "pokemon,usage,pokemon showdown,smogon",
    "author": "",
    "author_email": "\"stu.gotz.dev\" <gotz.stu.dev@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "# smog_usage_stats\r\n\r\nA Python wrapper for interacting with Smogon's Pokemon Showdown usage stats data [found here](https://smogon.com/stats) and making it accessible in usable data structures.\r\n\r\n## Quick Rundown\r\n\r\n### Installing:\r\n\r\n`pip install smog_usage_stats`\r\n\r\nIf your system uses `pip3` instead of `pip`, use that.\r\n\r\n### How it all works\r\n\r\n`BaseStatsSearch` -> Retrieves metagame usage statistics for non-Monotype metagames.\r\n\r\n> `import smog_usage_stats.UsageStatsLookup as smogU`\r\n>\r\n> `baseSearch = smogU.BaseStatsSearch(2022, '06', 8, 'ou')`\r\n>\r\n> `results = baseSearch.search()`\r\n>\r\n> `print(results[0:5]) #truncated for brevity`\r\n>\r\n> [['rank', 'pokemon', 'usage_pct', 'raw_usage', 'raw_pct', 'real', 'real_pct', 'date', 'tier'], ['1', 'landorus-therian', '36.09686', '1001664', '34.149', '864772', '37.018', '2022-06', 'gen8ou'], ['2', 'ferrothorn', '22.27247', '641619', '21.874', '558654', '23.914', '2022-06', 'gen8ou'], ['3', 'dragapult', '18.41922', '532433', '18.152', '404433', '17.313', '2022-06', 'gen8ou'], ['4', 'heatran', '17.30305', '484022', '16.501', '405868', '17.374', '2022-06', 'gen8ou']]\r\n\r\n`MonotypeStatsSearch` -> searches the monotype usage statistics\r\n\r\n> `import smog_usage_stats.UsageStatsLookup as smogU`\r\n>\r\n> `monoSearch = smogU.MonotypeStatsSearch(2022, '06', 8, 'psychic')`\r\n>\r\n> `results = monoSearch.search()`\r\n>\r\n> `print(results[0:5]) #truncated for brevity`\r\n>\r\n> [['rank', 'pokemon', 'usage_pct', 'raw_usage', 'raw_pct', 'real', 'real_pct', 'date', 'tier'], ['1', 'tapulele', '60.25678', '8747', '56.924', '6738', '57.948', '2022-06', 'monopsychic'], ['2', 'victini', '52.14959', '7783', '50.651', '5705', '49.064', '2022-06', 'monopsychic'], ['3', 'slowbro', '45.34912', '6538', '42.548', '5106', '43.913', '2022-06', 'monopsychic'], ['4', 'mew', '35.13163', '5353', '34.837', '4247', '36.525', '2022-06', 'monopsychic']]\r\n\r\n`BaseChaosSearch` -> searches the \"Chaos\" data contained within a certain month's stats\r\ndata\r\n\r\n> `import smog_usage_stats.IndividualLookup as smogI`\r\n>\r\n> `baseChaos = smogI.BaseChaosSearch(year=\"2022\", month=\"07\", gen=8, tier=\"uu\", name=\"SKARMORY\")`\r\n>\r\n> `results = baseChaos.search()`\r\n>\r\n> {'Moves': {'': 41.8139391939, 'drillpeck': 375.2124391148, 'steelwing':\r\n> 88.1257211624, 'rest': 8.5, 'autotomize': 33.465277165, 'steelbeam': 19.5408454477,\r\n> 'sandtomb': 5.6841618934, 'xscissor': 37.8061940503, 'facade': 4.0263726246,\r\n> 'attract': 0.2582478962, 'substitute': 64.9610651538, 'detect': 8.9170089777,\r\n> 'tailwind': 208.4057975296, 'payback': 7.0, 'aircutter': 6.5070926138, 'aerialace':\r\n> 11.8265479941, 'swordsdance': 178.0771715149, 'sleeptalk': 4.5, 'metalsound':\r\n> 6.6025485193, 'airslash': 120.7352163352, 'toxic': 1946.992820672, 'swagger': 0.5,\r\n> 'confide': 46.0, 'assurance': 0.5, ...}, 'Checks and Counters': ... (truncated) }\r\n\r\n`MonotypeChaosSearch` -> searches the monotype chaos data contained within a certain\r\nmonth's stats data\r\n\r\n> `import smog_usage_stats.IndividualLookup as smogI`\r\n>\r\n> `monoChaos = smogI.MonotypeChaosSearch(year=2022, month=\"11\", gen=9, typing=\"fairy\", name=\"Gardevoir\")`\r\n>\r\n> `result = monoChaos.search()`\r\n>\r\n> {'Moves': {'trick': 3.5, 'healingwish': 8.0, 'metronome': 7.0, 'futuresight': 7.0, 'mysticalfire': 4.0, 'calmmind': 15.5, 'psychic': 14.0, 'thunderbolt': 1.0, 'focusblast': 3.5, 'psyshock': 2.0, 'aurasphere': 2.5, 'nightshade': 1.0, 'moonblast': 16.0, 'willowisp': 0.5, 'shadowsneak': 1.0, 'energyball': 0.5, 'dazzlinggleam': 5.0}, 'Checks and Counters': {}, 'Abilities': {'synchronize': 3.5, 'trace': 19.5}, 'Teammates': {'Wigglytuff': 6.090649183, 'Grimmsnarl': 9.6031403892, 'Hatterene': 13.3468947861, 'Sylveon': 12.4625263815, 'Klefki': 10.8593859923, 'Dedenne': 10.3468947861, 'Azumarill': 11.6031403892, 'Florges': 1.0, 'Mimikyu': 17.5781579769}, 'usage': 0.5768955, 'Items': {'leftovers': 2.5, 'lifeorb': 1.0, 'choicescarf': 7.5, 'rockyhelmet': 4.0, 'wiseglasses': 1.0, 'adrenalineorb': 7.0}, 'Raw count': 46, 'Spreads': {'Timid:0/0/4/252/0/252': 4.0, 'Naughty:72/40/48/252/52/44': 7.0, 'Hasty:0/4/0/252/0/252': 1.0, 'Hardy:0/0/0/252/4/252': 4.0, 'Timid:4/0/0/252/0/252': 1.0, 'Timid:0/0/0/252/4/252': 6.0}, 'Happiness': {'255': 23.0}, 'Viability Ceiling': [0, 0, 0, 0]}\r\n\r\n`IndividualStatsSearch` -> Retrieves usage stats from a single individual pokemon\r\nfrom a certain month's stats data\r\n\r\n> `import smog_usage_stats.IndividualLookup as smogI`\r\n>\r\n> `individualStats = smogI.IndividualStatsSearch(2022, \"11\", \"8\", \"ou\", \"scIzor\")`\r\n>\r\n> `results = individualStats.search()`\r\n>\r\n> {'rank': '44', 'pokemon': 'scizor', 'usage_pct': '3.50114', 'raw_usage': '67725', 'raw_pct': '3.565', 'real': '51565', 'real_pct': '3.440', 'date': '2022-11', 'tier': 'gen8ou'}\r\n\r\n## Contributing:\r\n\r\nIf you find a bug, please [make an issue](https://github.com/Stu-Gotz/smog_usage_stats/issues).\r\n\r\nIf you would like to contribute, feel free to create a fork and submit a pull request.\r\n\r\n## License\r\n\r\nMIT License\r\n\r\nCopyright (c) 2023 Stu-Gotz\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Stu-Gotz  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": "",
    "version": "1.0.3",
    "project_urls": null,
    "split_keywords": [
        "pokemon",
        "usage",
        "pokemon showdown",
        "smogon"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "710adaf6ee3f4fa3f6827dd604cd2aed7d33e6873ef59b4d5dfd4e9e54243ece",
                "md5": "386b434ad8cff7e8b95d63c590d203a2",
                "sha256": "7063f8a01bd29af87f64412c8b67bc9f3cbd0289ef9a4f8b076a03466627bfb3"
            },
            "downloads": -1,
            "filename": "smog_usage_stats-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "386b434ad8cff7e8b95d63c590d203a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15260,
            "upload_time": "2023-12-11T17:22:57",
            "upload_time_iso_8601": "2023-12-11T17:22:57.529371Z",
            "url": "https://files.pythonhosted.org/packages/71/0a/daf6ee3f4fa3f6827dd604cd2aed7d33e6873ef59b4d5dfd4e9e54243ece/smog_usage_stats-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 17:22:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "smog-usage-stats"
}
        
Elapsed time: 0.16998s