{"id":13449620,"url":"https://github.com/totalhack/zillion-baseball","last_synced_at":"2025-03-22T22:33:23.567Z","repository":{"id":114283522,"uuid":"289360921","full_name":"totalhack/zillion-baseball","owner":"totalhack","description":"Use Zillion to analyze Baseball Statistics","archived":false,"fork":false,"pushed_at":"2020-08-21T20:47:04.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T16:45:14.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/totalhack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-08-21T20:40:27.000Z","updated_at":"2020-09-08T20:33:16.000Z","dependencies_parsed_at":"2023-07-16T03:30:40.723Z","dependency_job_id":null,"html_url":"https://github.com/totalhack/zillion-baseball","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totalhack%2Fzillion-baseball","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totalhack%2Fzillion-baseball/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totalhack%2Fzillion-baseball/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totalhack%2Fzillion-baseball/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totalhack","download_url":"https://codeload.github.com/totalhack/zillion-baseball/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245029263,"owners_count":20549675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T06:00:46.755Z","updated_at":"2025-03-22T22:33:23.182Z","avatar_url":"https://github.com/totalhack.png","language":"Python","funding_links":[],"categories":["Warehouses"],"sub_categories":[],"readme":"Zillion Baseball\n================\n\nThis is an example repo showing how one can use\n[Zillion](https://github.com/totalhack/zillion) to analyze data from the\n[Baseball Data Bank](https://github.com/chadwickbureau/baseballdatabank).\n\nThe `zillion` warehouse is defined in `zillion_baseball/baseball_warehouse.json`.\n\nTo see the available warehouse metrics, dimensions, and datasources try the\nfollowing from the `zillion_warehouse` directory:\n\n```shell\n$ python warehouse.py\n\n\"\"\"\n---- Warehouse\nmetrics:\n  {\n      'at_bats': \u003cMetric name='at_bats' type='integer'\u003e,\n      'batting_average': \u003cFormulaMetric name='batting_average'\nformula='1.0*{hits}/{at_bats}' aggregation='mean' technical=None\u003e,\n      'caught_stealing': \u003cMetric name='caught_stealing' type='integer'\u003e,\n      'doubles': \u003cMetric name='doubles' type='integer'\u003e,\n      'games': \u003cMetric name='games' type='integer'\u003e,\n      ...\n\"\"\"\n```\n\nTo run reports on the command line use the `run_report.py` helper script. \n\n```shell\n$ python run_report.py -m hits home_runs -d franchise_name -c '[(\"year\", \"=\", \"2018\")]'\n\n\"\"\"\n                                  H   HR\nFranchise Name                          \nArizona Diamondbacks           1283  176\nAtlanta Braves                 1433  175\nBaltimore Orioles              1317  188\nBoston Red Sox                 1509  208\nChicago Cubs                   1453  167\nChicago White Sox              1332  182\n...\n\"\"\"\n```\n\nUse `--help` for more information. The output is simply a printed dataframe,\nso data may be truncated in the terminal. \n\n\u003e **Note:** this is meant to be a quick example. Zillion is still in its\ninfancy and is subject to rapid changes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotalhack%2Fzillion-baseball","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotalhack%2Fzillion-baseball","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotalhack%2Fzillion-baseball/lists"}